View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0037886||Packages||Packages||public||2020-10-07 22:42||2021-03-03 22:13|
|Reporter||Sven Barth||Assigned To||Balázs Székely|
|Product Version||2.1 (SVN)|
|Summary||0037886: OPM: rating stars are squashed in HighDPI|
|Description||When using the Online Package Manager in HighDPI (in my case 200%) the rating stars appear to be squashed together compared to being started with 100% (or scaling done by Windows).|
|Tags||No tags attached.|
|Fixed in Revision|
||Confirmed at 144 DPI (150%)|
||I cannot reproduce this issue with Lazarus trunk. See attached image at 175%.|
On Win 7 @144ppi, I see the stars similar to Pascal Riekenberg's screenshot.
The issue can be fixed by replacing the calculation of FStarSize in TVisualTree.Create (unit opkman_visualtree) by
FStarSize := FVST.Scale96ToForm(AImgList.Width)
(rather than having the ImageList calculate it which may not be ready at this early stage of creation).
There is one problem which I could not find quickly and which I leave up to you, Balázs: When I click on a star at 144ppi the message box reports always one star more than what is highlighted before clicking).
||Please test with r.64711.|
||Works correctly now.|
||It still looks like before here on Windows with 200% on revision 64725.|
Thanks for testing, please try again with r. 64727.
Excuse me to interfere again. Wondering why the FVST.Scale96ToFont does not fix the issue while Application.MainForm does, I studied the code in more detail and found out that in this early stage the VTV still runs at 96ppi. Therefore the FVST.Scale96ToFont calls are useless and obsolete. The VirtualTreeView seems to handle scaling of the internal dimensions later on its own. Therefore, I removed all these Scale96ToFont calls.
The second change is that I put the scaling of the FStarSize into a new method which is called by the DoAutoAdjustLayout method of the form, i.e. always when the screen resolution changes (for example when the user drags the OPM onto another monitor at different PPI). The old code was only active in the initialization phase.
And finally I took the freedom to remove these annoying "not inlined" hints. I hope you don't mind.
I tested with Win10 @175%. It seems to work correctly. @Sven, can you confirm?
Of course I don't mind, feel free to modify OPM whenever you like. I tested your changes and works fine at my side. Thanks.
||Revision 64741 looks correct now, you may resolve. :)|
||Thanks for fixing! :)|
|2020-10-07 22:42||Sven Barth||New Issue|
|2020-10-07 22:42||Sven Barth||File Added: lazarus-highdpi-opm-stars.png|
|2020-10-09 15:13||Pascal Riekenberg||Note Added: 0126181|
|2020-10-09 15:13||Pascal Riekenberg||File Added: Screenshot 2020-10-09 151237.png|
|2020-10-09 15:13||Pascal Riekenberg||Assigned To||=> Pascal Riekenberg|
|2020-10-09 15:13||Pascal Riekenberg||Status||new => acknowledged|
|2020-10-09 15:13||Pascal Riekenberg||LazTarget||=> -|
|2020-10-09 15:14||Pascal Riekenberg||Assigned To||Pascal Riekenberg => Balázs Székely|
|2021-03-01 07:15||Balázs Székely||Note Added: 0129263|
|2021-03-01 07:15||Balázs Székely||File Added: OPM.png|
|2021-03-01 10:26||wp||Note Added: 0129265|
|2021-03-01 16:18||Balázs Székely||Note Added: 0129285|
|2021-03-01 17:22||Balázs Székely||Status||acknowledged => assigned|
|2021-03-01 18:23||wp||Note Added: 0129287|
|2021-03-01 18:45||Balázs Székely||Status||assigned => resolved|
|2021-03-01 18:45||Balázs Székely||Resolution||open => fixed|
|2021-03-01 18:45||Balázs Székely||LazTarget||- => 2.2|
|2021-03-01 18:45||Balázs Székely||Widgetset||Win32/Win64 => Win32/Win64|
|2021-03-01 18:45||Balázs Székely||Note Added: 0129289|
|2021-03-02 21:08||Sven Barth||Status||resolved => assigned|
|2021-03-02 21:08||Sven Barth||Resolution||fixed => open|
|2021-03-02 21:08||Sven Barth||Note Added: 0129329|
|2021-03-02 22:24||Balázs Székely||Note Added: 0129334|
|2021-03-03 13:15||wp||Note Added: 0129345|
|2021-03-03 14:47||Balázs Székely||Note Added: 0129355|
|2021-03-03 21:13||Sven Barth||Note Added: 0129364|
|2021-03-03 21:46||Balázs Székely||Status||assigned => resolved|
|2021-03-03 21:46||Balázs Székely||Resolution||open => fixed|
|2021-03-03 21:46||Balázs Székely||Widgetset||Win32/Win64 => Win32/Win64|
|2021-03-03 22:13||Sven Barth||Status||resolved => closed|
|2021-03-03 22:13||Sven Barth||Note Added: 0129366|