From c6d4cf5b59fa28ac5887b6dd8850aa9d099f8efe Mon Sep 17 00:00:00 2001 From: Jonathan Barnard Date: Wed, 12 Aug 2009 22:44:01 +0100 Subject: [PATCH] UnitMain: Fix the forms anchoring. --- UnitMain.lfm | 140 ++++++++++++++++++++++++++++++++--------------------------- UnitMain.pas | 7 --- 2 files changed, 77 insertions(+), 70 deletions(-) diff --git a/UnitMain.lfm b/UnitMain.lfm index ba041fb..a4b4f1d 100644 --- a/UnitMain.lfm +++ b/UnitMain.lfm @@ -11,13 +11,12 @@ object Form1: TForm1 Constraints.MinWidth = 600 OnClose = FormClose OnCreate = FormCreate - OnResize = FormResize Position = poDefault LCLVersion = '0.9.26.3' WindowState = wsMaximized object Label_WinePreFix: TLabel AnchorSideTop.Control = Owner - Left = 241 + Left = 200 Height = 16 Top = 5 Width = 79 @@ -28,7 +27,7 @@ object Form1: TForm1 object Label_ProgramsList: TLabel AnchorSideTop.Control = ComboBox_PreFix AnchorSideTop.Side = asrBottom - Left = 241 + Left = 9 Height = 16 Top = 53 Width = 95 @@ -39,7 +38,7 @@ object Form1: TForm1 object Label_ProgramPath: TLabel AnchorSideTop.Control = ComboBox_ProgramsList AnchorSideTop.Side = asrBottom - Left = 241 + Left = 9 Height = 16 Top = 101 Width = 87 @@ -59,32 +58,53 @@ object Form1: TForm1 ParentColor = False end object Label_WineVersion: TLabel + AnchorSideTop.Control = Owner Left = 9 Height = 16 - Top = 8 + Top = 5 Width = 80 + BorderSpacing.Top = 5 Caption = 'Wine version' ParentColor = False end + object CheckListBox_Flags: TCheckListBox + AnchorSideLeft.Control = ComboBox_TerminalName + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Label_Flags + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Button_Winecfg + Left = 241 + Height = 147 + Top = 161 + Width = 958 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 13 + ItemHeight = 0 + TabOrder = 10 + TopIndex = -1 + end object Btn_Run: TButton + AnchorSideLeft.Control = Owner AnchorSideTop.Control = Btn_Settings AnchorSideTop.Side = asrBottom - Left = 7 - Height = 25 - Top = 328 + Left = 9 + Height = 27 + Top = 282 Width = 75 + BorderSpacing.Left = 9 BorderSpacing.Top = 3 Caption = 'Run' OnClick = Btn_RunClick TabOrder = 0 end object Check_Terminal: TCheckBox + AnchorSideTop.Control = EditBox_ProgramPath AnchorSideTop.Side = asrBottom Left = 9 Height = 22 - Top = 192 + Top = 144 Width = 119 - BorderSpacing.Top = 14 + BorderSpacing.Top = 4 Caption = 'Run in Terminal' TabOrder = 1 end @@ -92,7 +112,7 @@ object Form1: TForm1 AnchorSideLeft.Control = Btn_Run AnchorSideLeft.Side = asrCenter AnchorSideRight.Control = Owner - Left = 44 + Left = 46 Height = 22 Top = 519 Width = 1 @@ -118,7 +138,7 @@ object Form1: TForm1 AnchorSideTop.Side = asrBottom Left = 27 Height = 27 - Top = 268 + Top = 220 Width = 131 AutoComplete = False Ctl3D = False @@ -136,7 +156,7 @@ object Form1: TForm1 AnchorSideTop.Side = asrBottom Left = 9 Height = 22 - Top = 246 + Top = 198 Width = 149 BorderSpacing.Top = 3 Caption = 'Use Sound Wrapper' @@ -147,8 +167,8 @@ object Form1: TForm1 AnchorSideTop.Control = ComboBox_SoundWrapper AnchorSideTop.Side = asrBottom Left = 9 - Height = 25 - Top = 300 + Height = 27 + Top = 252 Width = 75 BorderSpacing.Left = 9 BorderSpacing.Top = 5 @@ -162,7 +182,7 @@ object Form1: TForm1 AnchorSideTop.Side = asrBottom Left = 27 Height = 29 - Top = 214 + Top = 166 Width = 201 AutoComplete = False BorderSpacing.Left = 18 @@ -183,10 +203,10 @@ object Form1: TForm1 AnchorSideTop.Control = Label_WinePreFix AnchorSideTop.Side = asrBottom AnchorSideRight.Control = TogBtn_Listdrive - Left = 241 + Left = 201 Height = 29 Top = 21 - Width = 843 + Width = 883 Anchors = [akTop, akLeft, akRight] AutoComplete = False Ctl3D = False @@ -203,10 +223,10 @@ object Form1: TForm1 AnchorSideTop.Side = asrBottom AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom - Left = 241 + Left = 9 Height = 29 Top = 69 - Width = 1036 + Width = 1268 Anchors = [akTop, akLeft, akRight] AutoComplete = False BorderSpacing.Right = 3 @@ -218,31 +238,15 @@ object Form1: TForm1 Style = csDropDownList TabOrder = 9 end - object CheckListBox_Flags: TCheckListBox - AnchorSideLeft.Control = ComboBox_TerminalName - AnchorSideLeft.Side = asrBottom - AnchorSideTop.Control = Label_Flags - AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = Button_Winecfg - Left = 241 - Height = 147 - Top = 161 - Width = 958 - Anchors = [akTop, akLeft, akRight] - BorderSpacing.Left = 13 - ItemHeight = 0 - TabOrder = 10 - TopIndex = -1 - end object EditBox_ProgramPath: TEdit AnchorSideTop.Control = Label_ProgramPath AnchorSideTop.Side = asrBottom AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom - Left = 241 + Left = 9 Height = 23 Top = 117 - Width = 1036 + Width = 1268 Anchors = [akTop, akLeft, akRight] BorderSpacing.Right = 3 OnChange = EditBox_ProgramPathChange @@ -257,7 +261,7 @@ object Form1: TForm1 AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom Left = 1202 - Height = 25 + Height = 27 Top = 161 Width = 75 Anchors = [akTop, akRight] @@ -272,8 +276,8 @@ object Form1: TForm1 AnchorSideTop.Control = Button_Winecfg AnchorSideTop.Side = asrBottom Left = 1202 - Height = 25 - Top = 189 + Height = 27 + Top = 191 Width = 75 BorderSpacing.Top = 3 Caption = 'Regedit' @@ -285,38 +289,28 @@ object Form1: TForm1 AnchorSideTop.Side = asrBottom AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = ComboBox_PreFix + AnchorSideBottom.Side = asrBottom Left = 1087 - Height = 23 + Height = 29 Top = 21 Width = 190 - Anchors = [akTop, akRight] + Anchors = [akTop, akRight, akBottom] BorderSpacing.Left = 3 BorderSpacing.Right = 3 Caption = 'List programs on drive D' OnChange = TogBtn_ListdriveChange TabOrder = 14 end - object Btn_StopScan: TButton - Left = 464 - Height = 41 - Top = 312 - Width = 120 - Align = alCustom - Anchors = [akTop, akLeft, akBottom] - Caption = 'Stop Scan' - Font.Height = -18 - Font.Name = 'Sans' - OnClick = Btn_StopScanClick - ParentFont = False - TabOrder = 15 - Visible = False - end object ComboBox_WineVersion: TComboBox + AnchorSideTop.Control = Label_WineVersion + AnchorSideTop.Side = asrBottom Left = 9 Height = 29 - Top = 24 + Top = 22 Width = 188 AutoComplete = False + BorderSpacing.Top = 1 Ctl3D = False ItemHeight = 0 ItemWidth = 0 @@ -332,8 +326,8 @@ object Form1: TForm1 AnchorSideBottom.Control = Owner AnchorSideBottom.Side = asrBottom Left = 0 - Height = 593 - Top = 358 + Height = 637 + Top = 314 Width = 1280 ActivePage = Tab_Log Anchors = [akTop, akLeft, akRight, akBottom] @@ -342,12 +336,12 @@ object Form1: TForm1 TabOrder = 17 object Tab_Log: TTabSheet Caption = 'Log' - ClientHeight = 560 + ClientHeight = 604 ClientWidth = 1274 object Memo_LogOutPut: TMemo AnchorSideTop.Side = asrBottom Left = 0 - Height = 555 + Height = 599 Top = 5 Width = 1274 Align = alClient @@ -357,4 +351,24 @@ object Form1: TForm1 end end end + object Btn_StopScan: TButton + AnchorSideLeft.Control = Btn_Settings + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Btn_Settings + AnchorSideRight.Control = CheckListBox_Flags + AnchorSideBottom.Control = Btn_Run + AnchorSideBottom.Side = asrBottom + Left = 84 + Height = 57 + Top = 252 + Width = 144 + Anchors = [akTop, akLeft, akRight, akBottom] + Caption = 'Stop Scan' + Font.Height = -18 + Font.Name = 'Sans' + OnClick = Btn_StopScanClick + ParentFont = False + TabOrder = 15 + Visible = False + end end diff --git a/UnitMain.pas b/UnitMain.pas index 4f6e162..feda3c4 100644 --- a/UnitMain.pas +++ b/UnitMain.pas @@ -70,7 +70,6 @@ type procedure EditBox_ProgramPathChange(Sender: TObject); procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure FormCreate(Sender: TObject); - procedure FormResize(Sender: TObject); procedure TogBtn_ListdriveChange(Sender: TObject); procedure TimerOnTimer(Sender: TObject); @@ -144,11 +143,6 @@ begin {$ENDIF} end; -procedure TForm1.FormResize(Sender: TObject); -begin - if Btn_StopScan.Visible = true then Btn_StopScan.Left := (floor(form1.Width / 2) - floor(Btn_StopScan.Width / 2)); -end; - procedure TForm1.TimerOnTimer(Sender: TObject); var TempList:Tstrings; @@ -158,7 +152,6 @@ begin begin Timer.Enabled := true; Btn_StopScan.Visible := true; - FormResize(self); end else begin -- 2.11.4.GIT