瀏覽代碼

Scaling Up/Down buttons width on numerical inputs

Source commit: 7eeea681a6203f82f4bcaf4f6c47d798fa54a805
Martin Prikryl 10 年之前
父節點
當前提交
0060c8a043
共有 1 個文件被更改,包括 2 次插入3 次删除
  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