Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Grid gap size rounding issue on Windows #1334

Open
1 task done
bernidb opened this issue Jan 24, 2024 · 0 comments
Open
1 task done

[Bug]: Grid gap size rounding issue on Windows #1334

bernidb opened this issue Jan 24, 2024 · 0 comments

Comments

@bernidb
Copy link

bernidb commented Jan 24, 2024

Detailed steps on how to reproduce the bug

juce::Grid's item bounds calculation with rounding leads to inconsistent behavior on Windows regarding rendering of the gap property. It seems to be independent of the DPI and monitor scaling. This is especially visible if the gap is set to 1px and the grid is resized.
To reproduce:

  • open up juce's GridDemo
  • set the grid.rowGap and grid.columnGap to 1_px
  • for better visibility, set the grid item panel colours to Colours::white
  • launch the demo and observe the behavior while resizing:

JUCE_Grid_Gap_Bug

Similarly, setting the gap to 2_px leads to rounding between 1px and 2px and still flickers while resizing.

What is the expected behaviour?

The expected behavior is that the gap is exactly as wide as set in the variable(s). In the example it should be 1px wide - but it sometimes vanishes due to rounding.

Note: It also seems that the pixel and bounds calculation greatly differs with respect to subpixel handling between juce::Grid and juce::FlexBox! FlexBox does not have this issue.

Operating systems

Windows

What versions of the operating systems?

Tested on Windows 10 x64

Architectures

64-bit

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct

  • I agree to follow the Code of Conduct
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

No branches or pull requests

1 participant