mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Grid: Fix layout for very small items
Until this commit Items with a size of 1 could be rounded to bounds with a size of 0 or 2 due to floating point errors, leading to slightly too large or disappearing items. The new approach preserves the size of items.
This commit is contained in:
parent
d05333b61d
commit
44dd0649fd
1 changed files with 1 additions and 1 deletions
|
|
@ -1047,7 +1047,7 @@ void Grid::performLayout (Rectangle<int> targetArea)
|
|||
+ targetArea.toFloat().getPosition();
|
||||
|
||||
if (auto* c = item->associatedComponent)
|
||||
c->setBounds (item->currentBounds.toNearestIntEdges());
|
||||
c->setBounds (item->currentBounds.getSmallestIntegerContainer());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue