Skip to content

Conversation

@HeikoKlare
Copy link
Contributor

When computing the sizes for buttons, table and tree items, some magic values for spaces defined as point values are used. As the size computation is done in pixels, they are converted to pixel values. As they need to be rounded, they may become too small when converted to pixels.

This change adapts according places to always round such values up, so that spaces are large enough. That conforms to what we already did for actual computeSize() methods to ensure that sufficient space is provided for controls.

Note that for the table implementation, the change is effectively a no-op right now, as the INSET value of 4 will be an integer value for every fractional "quarter" zoom, so that the used rounding method is irrelevant. It is just adapted for the sake of consistency and to be prepared for the case that this value may be changed at some point in the future.

This also reverts the following change which accidentally used point values in a pixel context:

Before

At 175% zoom:
image

After

At 175% zoom:
image

When computing the sizes for buttons, table and tree items, some magic
values for spaces defined as point values are used. As the size
computation is done in pixels, they are converted to pixel values. As
they need to be rounded, they may become too small when converted to
pixels.

This change adapts according places to always round such values up, so
that spaces are large enough. That conforms to what we already did for
actual computeSize() methods to ensure that sufficient space is provided
for controls.
@github-actions
Copy link
Contributor

Test Results

  118 files  ±0    118 suites  ±0   18m 10s ⏱️ + 1m 19s
4 652 tests ±0  4 635 ✅ +1  17 💤  - 1  0 ❌ ±0 
  338 runs  ±0    334 ✅ ±0   4 💤 ±0  0 ❌ ±0 

Results for commit d8f2f49. ± Comparison against base commit d4ddd4c.

@HeikoKlare HeikoKlare marked this pull request as draft November 13, 2025 14:48
@HeikoKlare HeikoKlare deleted the too-small-default-sizes branch November 13, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Too few space in trees between icon and text

1 participant