Parcourir la source

FIX: Button Help is truncated (fixes #630)

Alexander Koblov il y a 2 ans
Parent
commit
8291f84b0b

+ 1 - 0
components/KASToolBar/kasbuttonpanel.pas

@@ -70,6 +70,7 @@ end;
 procedure TKASButtonPanel.DoAutoSize;
 begin
   inherited DoAutoSize;
+  if csDesigning in ComponentState then Exit;
   if AutoSize and (FSameWidth or FSameHeight) then ButtonsAutosize;
 end;
 

+ 7 - 9
src/frames/foptionsfilesviewscomplement.lfm

@@ -129,7 +129,7 @@ inherited frmOptionsFilesViewsComplement: TfrmOptionsFilesViewsComplement
       Caption = 'Windows style filter when marking files ("*.*" also select files without extension, etc.)'
       TabOrder = 0
     end
-    object pnlDefaultAttribute: TPanel
+    object pnlDefaultAttribute: TKASButtonPanel
       AnchorSideLeft.Control = chkMarkMaskFilterWindows
       AnchorSideTop.Control = chkMarkMaskFilterWindows
       AnchorSideTop.Side = asrBottom
@@ -140,12 +140,14 @@ inherited frmOptionsFilesViewsComplement: TfrmOptionsFilesViewsComplement
       Top = 31
       Width = 600
       Anchors = [akTop, akLeft, akRight]
+      AutoSize = True
       BevelOuter = bvNone
       ChildSizing.HorizontalSpacing = 3
       ChildSizing.Layout = cclLeftToRightThenTopToBottom
       ClientHeight = 27
       ClientWidth = 600
       TabOrder = 1
+      SameWidth = False
       object lbAttributeMask: TLabel
         AnchorSideLeft.Control = pnlDefaultAttribute
         AnchorSideTop.Control = edtDefaultAttribute
@@ -160,7 +162,8 @@ inherited frmOptionsFilesViewsComplement: TfrmOptionsFilesViewsComplement
       object edtDefaultAttribute: TEdit
         AnchorSideLeft.Control = lbAttributeMask
         AnchorSideLeft.Side = asrBottom
-        AnchorSideTop.Side = asrBottom
+        AnchorSideTop.Control = btnAddAttribute
+        AnchorSideTop.Side = asrCenter
         AnchorSideRight.Control = btnAddAttribute
         AnchorSideBottom.Side = asrCenter
         Left = 189
@@ -168,13 +171,11 @@ inherited frmOptionsFilesViewsComplement: TfrmOptionsFilesViewsComplement
         Top = 0
         Width = 304
         Anchors = [akTop, akLeft, akRight]
-        AutoSize = False
         TabOrder = 0
       end
       object btnAttrsHelp: TButton
         AnchorSideLeft.Side = asrBottom
-        AnchorSideTop.Control = edtDefaultAttribute
-        AnchorSideTop.Side = asrCenter
+        AnchorSideTop.Control = btnAddAttribute
         AnchorSideRight.Control = pnlDefaultAttribute
         AnchorSideRight.Side = asrBottom
         AnchorSideBottom.Side = asrBottom
@@ -186,14 +187,12 @@ inherited frmOptionsFilesViewsComplement: TfrmOptionsFilesViewsComplement
         AutoSize = True
         BorderSpacing.InnerBorder = 1
         Caption = '&Help'
-        Constraints.MinHeight = 26
         OnClick = btnAttrsHelpClick
         TabOrder = 2
       end
       object btnAddAttribute: TButton
         AnchorSideLeft.Side = asrBottom
-        AnchorSideTop.Control = edtDefaultAttribute
-        AnchorSideTop.Side = asrCenter
+        AnchorSideTop.Control = pnlDefaultAttribute
         AnchorSideRight.Control = btnAttrsHelp
         Left = 496
         Height = 26
@@ -202,7 +201,6 @@ inherited frmOptionsFilesViewsComplement: TfrmOptionsFilesViewsComplement
         Anchors = [akTop, akRight]
         AutoSize = True
         Caption = '&Add'
-        Constraints.MinHeight = 26
         OnClick = btnAddAttributeClick
         TabOrder = 1
       end

+ 3 - 3
src/frames/foptionsfilesviewscomplement.pas

@@ -3,7 +3,7 @@
    -------------------------------------------------------------------------
    Files views complement options page
 
-   Copyright (C) 2018 Alexander Koblov ([email protected])
+   Copyright (C) 2018-2022 Alexander Koblov ([email protected])
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ unit fOptionsFilesViewsComplement;
 interface
 
 uses
-  Classes, SysUtils, StdCtrls, Graphics, ExtCtrls, fOptionsFrame;
+  Classes, SysUtils, StdCtrls, Graphics, ExtCtrls, KASButtonPanel, fOptionsFrame;
 
 type
 
@@ -45,7 +45,7 @@ type
     cbSpaceMovesDown: TCheckBox;
     cbInplaceRename: TCheckBox;
     gbMisc: TGroupBox;
-    pnlDefaultAttribute: TPanel;
+    pnlDefaultAttribute: TKASButtonPanel;
     chkMarkMaskFilterWindows: TCheckBox;
     gbMarking: TGroupBox;
     lbAttributeMask: TLabel;