View Issue Details

IDProjectCategoryView StatusLast Update
0035806LazarusIDEpublic2021-03-16 20:24
ReporterSven Barth Assigned ToMichl  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformX86_64OSWindows NT 
Product Version2.1 (SVN) 
Fixed in Version2.1 (SVN) 
Summary0035806: AnchorDocking: size of close buttons very small on High DPI
DescriptionOn a High DPI system the size of the close buttons is very small and thus they're kinda hard to hit (see screenshot).
TagsNo tags attached.
Fixed in Revision64807, 64812
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

Sven Barth

2019-07-06 16:21

manager  

lazarus-anchordocking-close.png (91,664 bytes)   
lazarus-anchordocking-close.png (91,664 bytes)   

Sven Barth

2020-02-03 22:56

manager   ~0120865

I've attached a patch that improves this. The buttons themselves are now nicer sized, however the X is still rather small...
anchordocking.patch (621 bytes)   
Index: anchordocking.pas
===================================================================
--- anchordocking.pas	(revision 62608)
+++ anchordocking.pas	(working copy)
@@ -6527,6 +6527,8 @@
     inc(PreferredWidth,2);
     inc(PreferredHeight,2);
     {$ENDIF}
+    PreferredWidth:=ScaleDesignToForm(PreferredWidth);
+    PreferredHeight:=ScaleDesignToForm(PreferredHeight);
   end;
 end;
 
@@ -6566,6 +6568,8 @@
     inc(PreferredWidth,2);
     inc(PreferredHeight,2);
     {$ENDIF}
+    PreferredWidth:=ScaleDesignToForm(PreferredWidth);
+    PreferredHeight:=ScaleDesignToForm(PreferredHeight);
   end;
 end;
 
anchordocking.patch (621 bytes)   

Sven Barth

2021-03-11 22:28

manager   ~0129584

(small push for this as currently HighDPI bugs are a bit more active)

wp

2021-03-12 00:21

developer   ~0129586

But your patch only scales the size of the rectangle, not the size of the bitmap...

Sven Barth

2021-03-12 16:00

manager   ~0129608

Which I mentioned:
> The buttons themselves are now nicer sized, however the X is still rather small...

Back then I did not find any good solution while debugging through. Probably because I'm not deep enough in the matter of how the LCL renders these images.

For me that patch makes things at least useable. If someone finds something better I'm all for it of course ;)

There is also a fork of AnchorDocking which seems to have solved these problems as well (though by using different Icons I think): https://github.com/TetrisSQC/AnchorDocking

wp

2021-03-12 16:49

developer   ~0129609

> Which I mentioned:
>> The buttons themselves are now nicer sized, however the X is still rather small...

Sorry, careful reading is an art which I do not master...

Michl

2021-03-14 22:54

developer   ~0129672

Thank you for the patch, I applied it in revision 64807.

For the small "x", I changed the close button from small to normal, so it is scaled normal. Revision 64812

Please test and close if OK.

Sven Barth

2021-03-16 20:24

manager   ~0129719

Looks good now :D

Issue History

Date Modified Username Field Change
2019-07-06 16:21 Sven Barth New Issue
2019-07-06 16:21 Sven Barth File Added: lazarus-anchordocking-close.png
2020-02-03 22:56 Sven Barth File Added: anchordocking.patch
2020-02-03 22:56 Sven Barth File Added: lazarus-anchordocking-close-patched.png
2020-02-03 22:56 Sven Barth Note Added: 0120865
2021-03-11 22:28 Sven Barth Note Added: 0129584
2021-03-11 22:57 Michl Assigned To => Michl
2021-03-11 22:57 Michl Status new => assigned
2021-03-12 00:21 wp Note Added: 0129586
2021-03-12 16:00 Sven Barth Note Added: 0129608
2021-03-12 16:49 wp Note Added: 0129609
2021-03-14 20:22 Michl Fixed in Version => 2.1 (SVN)
2021-03-14 20:22 Michl Fixed in Revision => 64807
2021-03-14 20:22 Michl LazTarget => -
2021-03-14 20:22 Michl Widgetset Win32/Win64 => Win32/Win64
2021-03-14 22:54 Michl Status assigned => resolved
2021-03-14 22:54 Michl Resolution open => fixed
2021-03-14 22:54 Michl Fixed in Revision 64807 => 64807, 64812
2021-03-14 22:54 Michl Widgetset Win32/Win64 => Win32/Win64
2021-03-14 22:54 Michl Note Added: 0129672
2021-03-16 20:24 Sven Barth Status resolved => closed
2021-03-16 20:24 Sven Barth Note Added: 0129719