Browse Source

Issue 2241: Find dialog file list is scaled incorrectly on some multi monitor systems with different scaling

https://winscp.net/tracker/2241

Desktop font with specific timing of handle creating breaks anchoring of the list view. Delegating the anchoring to a parent mundane panel solves it.

Source commit: d00816d5743ca2bdeeabe7d128a620635100ab1e
Martin Prikryl 1 year ago
parent
commit
068052f7f4
2 changed files with 41 additions and 31 deletions
  1. 40 31
      source/forms/FileFind.dfm
  2. 1 0
      source/forms/FileFind.h

+ 40 - 31
source/forms/FileFind.dfm

@@ -1470,43 +1470,52 @@ object FileFindDialog: TFileFindDialog
     TabOrder = 2
     OnClick = HelpButtonClick
   end
-  object FileView: TIEListView
+  object FileViewPanel: TPanel
     Left = 8
     Top = 142
     Width = 434
     Height = 252
     Anchors = [akLeft, akTop, akRight, akBottom]
-    FullDrag = True
-    ReadOnly = True
-    RowSelect = True
-    PopupMenu = FileViewPopupMenu
+    BevelOuter = bvNone
     TabOrder = 3
-    ViewStyle = vsReport
-    OnDblClick = FileViewDblClick
-    OnEnter = ControlChange
-    OnExit = ControlChange
-    NortonLike = nlOff
-    Columns = <
-      item
-        Caption = 'Name'
-        Width = 80
-      end
-      item
-        Caption = 'Directory'
-        Width = 120
-      end
-      item
-        Alignment = taRightJustify
-        Caption = 'Size'
-        Width = 80
-      end
-      item
-        Caption = 'Changed'
-        Width = 90
-      end>
-    OnCompare = FileViewCompare
-    OnContextPopup = FileViewContextPopup
-    OnSelectItem = FileViewSelectItem
+    object FileView: TIEListView
+      Left = 0
+      Top = 0
+      Width = 434
+      Height = 252
+      Align = alClient
+      FullDrag = True
+      ReadOnly = True
+      RowSelect = True
+      PopupMenu = FileViewPopupMenu
+      TabOrder = 0
+      ViewStyle = vsReport
+      OnDblClick = FileViewDblClick
+      OnEnter = ControlChange
+      OnExit = ControlChange
+      NortonLike = nlOff
+      Columns = <
+        item
+          Caption = 'Name'
+          Width = 80
+        end
+        item
+          Caption = 'Directory'
+          Width = 120
+        end
+        item
+          Alignment = taRightJustify
+          Caption = 'Size'
+          Width = 80
+        end
+        item
+          Caption = 'Changed'
+          Width = 90
+        end>
+      OnCompare = FileViewCompare
+      OnContextPopup = FileViewContextPopup
+      OnSelectItem = FileViewSelectItem
+    end
   end
   object StatusBar: TStatusBar
     Left = 0

+ 1 - 0
source/forms/FileFind.h

@@ -58,6 +58,7 @@ __published:
   TAction *EditAction;
   TButton *EditButton;
   TMenuItem *Edit1;
+  TPanel *FileViewPanel;
   void __fastcall ControlChange(TObject *Sender);
   void __fastcall StartStopButtonClick(TObject *Sender);
   void __fastcall StopButtonClick(TObject *Sender);