Closed F-J-S-P closed 2 months ago
It's reproducible on Android too. Even/odd vs what's happen there is probably just because of different density
@F-J-S-P could you please duplicate this issue to Google issue tracker (with main point about Android/common instead of Desktop)? Thanks
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug When using both .minimumInteractiveComponentSize() and .size()/.width()/.height() on the same composable, it is placed correctly when the value used for .size() is an even number and one pixel off (to the right for width, down for height, both for size) when it is an odd number. I noticed this when using IconButton scaling with AppTheme.fixedLineHeight (in this case 19), since IconButton has .minimumInteractiveComponentSize() integrated, but it is not restricted to them.
Affected platforms
Versions
To Reproduce Steps to reproduce the behavior: Run this code snippet:
Expected behavior 20 green boxes appear above each other without space between them and aligned with the window's left border.
Observed behavior 20 green boxes appear, every second one is shifted one pixel to the right and below, leading to unintended spaces and overlap.
Screenshots
Additional context The Column + repeat is just to make the problem and how it's tied to odd numbers more obvious (the first box is not visible as it's fully inside the second one); the problem will also appear when using just a single box.