View Issue Details

IDProjectCategoryView StatusLast Update
0037886PackagesPackagespublic2021-03-03 22:13
ReporterSven Barth Assigned ToBalázs Székely  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformX86_64OSWindows NT 
Product Version2.1 (SVN) 
Summary0037886: OPM: rating stars are squashed in HighDPI
DescriptionWhen 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).
TagsNo tags attached.
Fixed in Revision
LazTarget2.2
WidgetsetWin32/Win64
Attached Files

Activities

Sven Barth

2020-10-07 22:42

manager  

lazarus-highdpi-opm-stars.png (4,236 bytes)   
lazarus-highdpi-opm-stars.png (4,236 bytes)   

Pascal Riekenberg

2020-10-09 15:13

developer   ~0126181

Confirmed at 144 DPI (150%)

Balázs Székely

2021-03-01 07:15

developer   ~0129263

I cannot reproduce this issue with Lazarus trunk. See attached image at 175%.
OPM.png (260,763 bytes)   
OPM.png (260,763 bytes)   

wp

2021-03-01 10:26

developer   ~0129265

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).

Balázs Székely

2021-03-01 16:18

developer   ~0129285

Please test with r.64711.

wp

2021-03-01 18:23

developer   ~0129287

Works correctly now.

Balázs Székely

2021-03-01 18:45

developer   ~0129289

@wp
Thank you!

Sven Barth

2021-03-02 21:08

manager   ~0129329

It still looks like before here on Windows with 200% on revision 64725.

Balázs Székely

2021-03-02 22:24

developer   ~0129334

@Sven
Thanks for testing, please try again with r. 64727.

wp

2021-03-03 13:15

developer   ~0129345

@Balázs
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?

Balázs Székely

2021-03-03 14:47

developer   ~0129355

@wp
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.

Sven Barth

2021-03-03 21:13

manager   ~0129364

Revision 64741 looks correct now, you may resolve. :)

Sven Barth

2021-03-03 22:13

manager   ~0129366

Thanks for fixing! :)

Issue History

Date Modified Username Field Change
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