浏览代码

Right justifying hidden and filtered counters on Commander interface + Scaling panel padding and panel image padding on the way

Source commit: b7d1aaf82633a7d96ffaa2732817bc2ac92e6e4c
Martin Prikryl 9 年之前
父节点
当前提交
bd22d2cb2c
共有 2 个文件被更改,包括 7 次插入7 次删除
  1. 4 4
      source/forms/ScpCommander.dfm
  2. 3 3
      source/packages/tbx/TBXStatusBars.pas

+ 4 - 4
source/forms/ScpCommander.dfm

@@ -1050,7 +1050,7 @@ inherited ScpCommanderForm: TScpCommanderForm
           TextTruncation = twEndEllipsis
         end
         item
-          Alignment = taCenter
+          Alignment = taRightJustify
           Framed = False
           Hint = 'Click to show hidden files'
           MaxSize = 120
@@ -1060,7 +1060,7 @@ inherited ScpCommanderForm: TScpCommanderForm
           TextTruncation = twEndEllipsis
         end
         item
-          Alignment = taCenter
+          Alignment = taRightJustify
           Framed = False
           Hint = 'Click to modify or clear the filter'
           MaxSize = 120
@@ -1348,7 +1348,7 @@ inherited ScpCommanderForm: TScpCommanderForm
           TextTruncation = twEndEllipsis
         end
         item
-          Alignment = taCenter
+          Alignment = taRightJustify
           Framed = False
           Hint = 'Click to show hidden files'
           MaxSize = 120
@@ -1358,7 +1358,7 @@ inherited ScpCommanderForm: TScpCommanderForm
           TextTruncation = twEndEllipsis
         end
         item
-          Alignment = taCenter
+          Alignment = taRightJustify
           Framed = False
           Hint = 'Click to modify or clear the filter'
           MaxSize = 120

+ 3 - 3
source/packages/tbx/TBXStatusBars.pas

@@ -809,7 +809,7 @@ var
   Flags: Integer;
   R: TRect;
 begin
-  InflateRect(ARect, -1, 0);
+  InflateRect(ARect, ScaleByTextHeightRunTime(Canvas, -3), 0);
   if (APanel.ImageIndex >= 0) and (Images <> nil) then
   begin
     R := ARect;
@@ -819,12 +819,12 @@ begin
       taLeftJustify:
         begin
           R.Right := R.Left + Images.Width;
-          ARect.Left := R.Right + 4;
+          ARect.Left := R.Right + ScaleByTextHeightRunTime(Canvas, 4);
         end;
       taRightJustify:
         begin
           R.Left := R.Right - Images.Width;
-          ARect.Right := R.Left - 4;
+          ARect.Right := R.Left - ScaleByTextHeightRunTime(Canvas, 4);
         end;
       taCenter:
         begin