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

Mixer LEDs and labels are cropped at 2x scaling #7052

Closed
he29-net opened this issue Jan 6, 2024 · 0 comments · Fixed by #7053
Closed

Mixer LEDs and labels are cropped at 2x scaling #7052

he29-net opened this issue Jan 6, 2024 · 0 comments · Fixed by #7053
Labels

Comments

@he29-net
Copy link
Contributor

he29-net commented Jan 6, 2024

Probably related to #6591 (@sakertooth) as mentioned by M. Gregorius in #7045 -- when LMMS runs at 2x scale, the LED checkboxes in Mixer do not scale up its boundary and get cropped. Some of the longer labels also have a similar issue and their first letter is getting cropped.

Left: a few months old build, right: build from #7045, including the new mixer:

screen

The mixer also takes up quite a bit more space now, fitting only 18 buses where it previously displayed 24, and leaving space for at least one less track. Not sure if that was intentional. While it does not look as crammed as before, it would be nice to have an option to switch back to a version with more compact margins. But that would be a feature request, so unrelated to this bug report.

@he29-net he29-net added the bug label Jan 6, 2024
michaelgregorius added a commit to michaelgregorius/lmms that referenced this issue Jan 7, 2024
Fix the scaling of `PixmapButton` when used in layouts. In this case `PixmapButton::sizeHint` is queried which used `devicePixelRatio` to divide the size of the active pixmap. As a result the size is always the same in pixels regardless of the scaling factor of the application. This is fixed by removing the calls.

Example: If the scaling factor is 2 then the pixmap will also report twice the size in pixels and hence request more space in layouts, etc. However, if we divide by the device/pixel ratio then the original size of the image/pixmap will be reported and therefore it will be too small in layouts.

The calls to `devicePixelRatio` have been introduced with pull request LMMS#4950 (via commit c3b4d51) which replaced the old Spectrum Analyzer. The pixmaps of the Spectrum Analyzer still look good with this change.

Fixes LMMS#7052.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant