mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 15:58:37 +02:00
lcl: spin edit: scale UpDown with height
This commit is contained in:
parent
30789b5c94
commit
4aa7b5b350
@ -322,7 +322,6 @@ begin
|
||||
WinHandle := AWinControl.Handle;
|
||||
UpDown := GetWin32WindowInfo(WinHandle)^.UpDown;
|
||||
|
||||
UpDownWidth := GetUpDownWidth(AWinControl);
|
||||
if (AWinControl as TCustomFloatSpinEdit).BorderStyle = bsNone then
|
||||
BorderWidth := 0
|
||||
else if (WindowsVersion >= wvXP) and ThemeServices.ThemesEnabled then
|
||||
@ -330,6 +329,8 @@ begin
|
||||
else
|
||||
BorderWidth := GetSystemMetrics(SM_CXEDGE);
|
||||
|
||||
UpDownWidth := (Height - BorderWidth * 2) div 5 * 4 +1 {to get odd number}; // calculate from height to scale it
|
||||
|
||||
DWP := BeginDeferWindowPos(2);
|
||||
DeferWindowPos(DWP, UpDown, WinHandle, Left + Width - UpDownWidth - BorderWidth,
|
||||
Top+BorderWidth, UpDownWidth, Height - BorderWidth * 2, SWP_NOACTIVATE);
|
||||
|
Loading…
Reference in New Issue
Block a user