Fix old-style HighDPI problems in Tracks and GridBrowser
ClosedPublic

Authored by mykolak on Aug 16 2019, 4:43 PM.

Details

Summary
  1. Fix track size — use fontSize + margin instead of 45.
  2. Moved 0.85 constant to theme, calculate height of grid cell in one place. Two different calculations were the cause of problem, mentioned in [1].

Also this fix improves Elisa looks when user selects default font size more than 9.

[1] https://phabricator.kde.org/D23132#511825

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mykolak requested review of this revision.Aug 16 2019, 4:43 PM
mykolak created this revision.
mykolak edited the summary of this revision. (Show Details)Aug 16 2019, 4:46 PM

Thanks a lot!
There is some added space in the all tracks view between the first and the second line, which imho is a little too much. Using elisaTheme.layoutVerticalMargin / 2 for the trackDelegateHeight works for me here, could please try that?

Thanks a lot!
There is some added space in the all tracks view between the first and the second line, which imho is a little too much. Using elisaTheme.layoutVerticalMargin / 2 for the trackDelegateHeight works for me here, could please try that?

Actually, my first solution was elisaTheme.layoutVerticalMargin + fontSize.height * 2 it is fine on my setup, but I checked it on 96 DPI and it looked smaller than previous 45, so I've used (elisaTheme.layoutVerticalMargin + fontSize.height) * 2. So I won't mind.

astippich accepted this revision.Aug 17 2019, 1:41 PM

Great, thanks again

This revision is now accepted and ready to land.Aug 17 2019, 1:41 PM
This revision was automatically updated to reflect the committed changes.