Browse Source

Scaling Up/Down buttons width on numerical inputs

Source commit: 7eeea681a6203f82f4bcaf4f6c47d798fa54a805
Martin Prikryl 10 years ago
parent
commit
0060c8a043
1 changed files with 2 additions and 3 deletions
  1. 2 3
      source/packages/my/UpDownEdit.pas

+ 2 - 3
source/packages/my/UpDownEdit.pas

@@ -147,7 +147,7 @@ procedure Register;
 implementation
 
 uses
-  CommCtrl;
+  CommCtrl, PasTools, Math;
 
 procedure Register;
 begin
@@ -156,8 +156,7 @@ end;
 
 function DefBtnWidth: Integer;
 begin
-  Result := GetSystemMetrics(SM_CXVSCROLL);
-  if Result > 15 then Result := 15;
+  Result := Min(GetSystemMetrics(SM_CXVSCROLL), ScaleByPixelsPerInch(15));
 end;
 
 type