From 9ebdcd0cabe809b6a726d3b65e4a964d7b7f3606 Mon Sep 17 00:00:00 2001 From: RussKie Date: Sat, 3 Oct 2020 20:07:42 +1000 Subject: [PATCH] Update layout Reduce margins and paddings * Update `FormClone` * Update `FormInit` * Update `FormStatus` * Update `FormCheckoutBranch` Relates to #6183 Fix Accept and Cancel buttons that get unset by adding buttons to the controls panel. Resolves #8521 --- .../FormCheckoutBranch.Designer.cs | 46 ++++++------ GitUI/CommandsDialogs/FormClone.Designer.cs | 74 ++++++++++--------- GitUI/CommandsDialogs/FormClone.cs | 5 +- GitUI/CommandsDialogs/FormInit.Designer.cs | 19 +++-- GitUI/CommandsDialogs/FormInit.cs | 2 +- GitUI/GitExtensionsDialog.Designer.cs | 14 ++-- GitUI/HelperDialogs/FormStatus.Designer.cs | 21 ++++-- GitUI/HelperDialogs/FormStatus.cs | 2 + .../ConsoleEmulatorOutputControl.cs | 2 +- 9 files changed, 102 insertions(+), 83 deletions(-) diff --git a/GitUI/CommandsDialogs/FormCheckoutBranch.Designer.cs b/GitUI/CommandsDialogs/FormCheckoutBranch.Designer.cs index 1a02e525f8e..4a4f0e92c8f 100644 --- a/GitUI/CommandsDialogs/FormCheckoutBranch.Designer.cs +++ b/GitUI/CommandsDialogs/FormCheckoutBranch.Designer.cs @@ -66,10 +66,10 @@ private void InitializeComponent() // // MainPanel // - this.MainPanel.Controls.Add(this.tlpnlMain); this.MainPanel.Controls.Add(this.Ok); + this.MainPanel.Controls.Add(this.tlpnlMain); this.MainPanel.Padding = new System.Windows.Forms.Padding(14); - this.MainPanel.Size = new System.Drawing.Size(626, 243); + this.MainPanel.Size = new System.Drawing.Size(626, 228); // // flowLayoutPanel1 // @@ -85,11 +85,12 @@ private void InitializeComponent() // Ok // this.Ok.AutoSize = true; + this.Ok.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.Ok.DialogResult = System.Windows.Forms.DialogResult.OK; this.Ok.Location = new System.Drawing.Point(264, 5); - this.Ok.MinimumSize = new System.Drawing.Size(72, 23); + this.Ok.MinimumSize = new System.Drawing.Size(75, 23); this.Ok.Name = "Ok"; - this.Ok.Size = new System.Drawing.Size(118, 25); + this.Ok.Size = new System.Drawing.Size(75, 23); this.Ok.TabIndex = 1; this.Ok.Text = "Checkout"; this.Ok.UseVisualStyleBackColor = true; @@ -105,24 +106,25 @@ private void InitializeComponent() this.tlpnlMain.Controls.Add(this.tlpnlBranches, 0, 0); this.tlpnlMain.Controls.Add(this.horLine, 0, 1); this.tlpnlMain.Controls.Add(this.tlpnlRemoteOptions, 0, 2); - this.tlpnlMain.Location = new System.Drawing.Point(17, 17); + this.tlpnlMain.Location = new System.Drawing.Point(12, 12); + this.tlpnlMain.Margin = new System.Windows.Forms.Padding(0); this.tlpnlMain.Name = "tlpnlMain"; - this.tlpnlMain.Padding = new System.Windows.Forms.Padding(10); this.tlpnlMain.RowCount = 4; this.tlpnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tlpnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tlpnlMain.Size = new System.Drawing.Size(592, 215); + this.tlpnlMain.Size = new System.Drawing.Size(600, 202); this.tlpnlMain.TabIndex = 0; this.tlpnlMain.TabStop = true; // // localChangesGB // this.localChangesGB.Controls.Add(this.flpnlLocalOptions); - this.localChangesGB.Location = new System.Drawing.Point(13, 151); + this.localChangesGB.Location = new System.Drawing.Point(0, 132); + this.localChangesGB.Margin = new System.Windows.Forms.Padding(0); this.localChangesGB.Name = "localChangesGB"; - this.localChangesGB.Size = new System.Drawing.Size(571, 58); + this.localChangesGB.Size = new System.Drawing.Size(441, 58); this.localChangesGB.TabIndex = 0; this.localChangesGB.TabStop = false; this.localChangesGB.Text = "Local changes"; @@ -140,7 +142,7 @@ private void InitializeComponent() this.flpnlLocalOptions.Location = new System.Drawing.Point(3, 16); this.flpnlLocalOptions.Name = "flpnlLocalOptions"; this.flpnlLocalOptions.Padding = new System.Windows.Forms.Padding(9, 4, 9, 4); - this.flpnlLocalOptions.Size = new System.Drawing.Size(565, 39); + this.flpnlLocalOptions.Size = new System.Drawing.Size(435, 39); this.flpnlLocalOptions.TabIndex = 1; this.flpnlLocalOptions.WrapContents = false; // @@ -225,12 +227,13 @@ private void InitializeComponent() this.tlpnlBranches.Controls.Add(this.label1, 0, 1); this.tlpnlBranches.Controls.Add(this.Branches, 1, 1); this.tlpnlBranches.Controls.Add(this.lbChanges, 2, 1); - this.tlpnlBranches.Location = new System.Drawing.Point(13, 13); + this.tlpnlBranches.Location = new System.Drawing.Point(0, 0); + this.tlpnlBranches.Margin = new System.Windows.Forms.Padding(0); this.tlpnlBranches.Name = "tlpnlBranches"; this.tlpnlBranches.RowCount = 2; this.tlpnlBranches.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tlpnlBranches.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); - this.tlpnlBranches.Size = new System.Drawing.Size(571, 48); + this.tlpnlBranches.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tlpnlBranches.Size = new System.Drawing.Size(441, 54); this.tlpnlBranches.TabIndex = 0; // // LocalBranch @@ -258,7 +261,7 @@ private void InitializeComponent() this.Remotebranch.Margin = new System.Windows.Forms.Padding(2); this.Remotebranch.Name = "Remotebranch"; this.Remotebranch.Padding = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.Remotebranch.Size = new System.Drawing.Size(460, 17); + this.Remotebranch.Size = new System.Drawing.Size(330, 17); this.Remotebranch.TabIndex = 1; this.Remotebranch.Text = "Remote branch"; this.Remotebranch.UseVisualStyleBackColor = true; @@ -270,7 +273,7 @@ private void InitializeComponent() this.label1.Dock = System.Windows.Forms.DockStyle.Fill; this.label1.Location = new System.Drawing.Point(3, 21); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(85, 27); + this.label1.Size = new System.Drawing.Size(85, 33); this.label1.TabIndex = 2; this.label1.Text = "Select branch"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; @@ -284,7 +287,7 @@ private void InitializeComponent() this.Errors.SetIconAlignment(this.Branches, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); this.Branches.Location = new System.Drawing.Point(94, 24); this.Branches.Name = "Branches"; - this.Branches.Size = new System.Drawing.Size(458, 21); + this.Branches.Size = new System.Drawing.Size(328, 21); this.Branches.TabIndex = 3; this.Branches.SelectedIndexChanged += new System.EventHandler(this.Branches_SelectedIndexChanged); this.Branches.TextChanged += new System.EventHandler(this.Branches_TextChanged); @@ -297,9 +300,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.lbChanges.AutoSize = true; this.lbChanges.ForeColor = System.Drawing.SystemColors.GrayText; - this.lbChanges.Location = new System.Drawing.Point(558, 21); + this.lbChanges.Location = new System.Drawing.Point(428, 21); this.lbChanges.Name = "lbChanges"; - this.lbChanges.Size = new System.Drawing.Size(10, 27); + this.lbChanges.Size = new System.Drawing.Size(10, 33); this.lbChanges.TabIndex = 4; this.lbChanges.Text = "-"; this.lbChanges.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -310,7 +313,7 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.horLine.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.horLine.Location = new System.Drawing.Point(13, 67); + this.horLine.Location = new System.Drawing.Point(3, 57); this.horLine.Margin = new System.Windows.Forms.Padding(3); this.horLine.Name = "horLine"; this.horLine.Size = new System.Drawing.Size(684, 2); @@ -328,7 +331,8 @@ private void InitializeComponent() this.tlpnlRemoteOptions.Controls.Add(this.rbResetBranch, 0, 0); this.tlpnlRemoteOptions.Controls.Add(this.rbCreateBranchWithCustomName, 0, 2); this.tlpnlRemoteOptions.Controls.Add(this.branchName, 1, 0); - this.tlpnlRemoteOptions.Location = new System.Drawing.Point(13, 75); + this.tlpnlRemoteOptions.Location = new System.Drawing.Point(0, 62); + this.tlpnlRemoteOptions.Margin = new System.Windows.Forms.Padding(0); this.tlpnlRemoteOptions.Name = "tlpnlRemoteOptions"; this.tlpnlRemoteOptions.RowCount = 5; this.tlpnlRemoteOptions.RowStyles.Add(new System.Windows.Forms.RowStyle()); @@ -406,7 +410,7 @@ private void InitializeComponent() this.AcceptButton = this.Ok; this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(626, 288); + this.ClientSize = new System.Drawing.Size(626, 260); this.DoubleBuffered = true; this.MaximizeBox = false; this.MinimizeBox = false; diff --git a/GitUI/CommandsDialogs/FormClone.Designer.cs b/GitUI/CommandsDialogs/FormClone.Designer.cs index 955cf35fce0..7d523b8db52 100644 --- a/GitUI/CommandsDialogs/FormClone.Designer.cs +++ b/GitUI/CommandsDialogs/FormClone.Designer.cs @@ -1,6 +1,4 @@ -using System.Windows.Forms; - -namespace GitUI.CommandsDialogs +namespace GitUI.CommandsDialogs { partial class FormClone { @@ -53,10 +51,10 @@ private void InitializeComponent() // // MainPanel // + this.MainPanel.Controls.Add(this.Ok); this.MainPanel.Controls.Add(this.LoadSSHKey); this.MainPanel.Controls.Add(this.tpnlMain); - this.MainPanel.Controls.Add(this.Ok); - this.MainPanel.Size = new System.Drawing.Size(676, 343); + this.MainPanel.Size = new System.Drawing.Size(647, 319); // // Central // @@ -83,9 +81,12 @@ private void InitializeComponent() // Ok // this.Ok.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.Ok.Location = new System.Drawing.Point(23, 3); + this.Ok.AutoSize = true; + this.Ok.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.Ok.Location = new System.Drawing.Point(10, 3); + this.Ok.MinimumSize = new System.Drawing.Size(75, 23); this.Ok.Name = "Ok"; - this.Ok.Size = new System.Drawing.Size(118, 25); + this.Ok.Size = new System.Drawing.Size(75, 23); this.Ok.TabIndex = 0; this.Ok.Text = "Clone"; this.Ok.UseVisualStyleBackColor = true; @@ -116,7 +117,7 @@ private void InitializeComponent() this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(622, 122); + this.tableLayoutPanel1.Size = new System.Drawing.Size(625, 125); this.tableLayoutPanel1.TabIndex = 0; // // repositoryLabel @@ -125,7 +126,7 @@ private void InitializeComponent() this.repositoryLabel.Dock = System.Windows.Forms.DockStyle.Left; this.repositoryLabel.Location = new System.Drawing.Point(3, 0); this.repositoryLabel.Name = "repositoryLabel"; - this.repositoryLabel.Size = new System.Drawing.Size(101, 30); + this.repositoryLabel.Size = new System.Drawing.Size(101, 31); this.repositoryLabel.TabIndex = 0; this.repositoryLabel.Text = "Repository to &clone:"; this.repositoryLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -138,7 +139,7 @@ private void InitializeComponent() this._NO_TRANSLATE_From.FormattingEnabled = true; this._NO_TRANSLATE_From.Location = new System.Drawing.Point(123, 3); this._NO_TRANSLATE_From.Name = "_NO_TRANSLATE_From"; - this._NO_TRANSLATE_From.Size = new System.Drawing.Size(396, 21); + this._NO_TRANSLATE_From.Size = new System.Drawing.Size(399, 21); this._NO_TRANSLATE_From.TabIndex = 1; this._NO_TRANSLATE_From.SelectedIndexChanged += new System.EventHandler(this.FromSelectedIndexChanged); this._NO_TRANSLATE_From.TextUpdate += new System.EventHandler(this.FromTextUpdate); @@ -146,7 +147,7 @@ private void InitializeComponent() // FromBrowse // this.FromBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.FromBrowse.Location = new System.Drawing.Point(525, 3); + this.FromBrowse.Location = new System.Drawing.Point(528, 3); this.FromBrowse.Name = "FromBrowse"; this.FromBrowse.Size = new System.Drawing.Size(94, 24); this.FromBrowse.TabIndex = 2; @@ -158,9 +159,9 @@ private void InitializeComponent() // this.destinationLabel.AutoSize = true; this.destinationLabel.Dock = System.Windows.Forms.DockStyle.Left; - this.destinationLabel.Location = new System.Drawing.Point(3, 30); + this.destinationLabel.Location = new System.Drawing.Point(3, 31); this.destinationLabel.Name = "destinationLabel"; - this.destinationLabel.Size = new System.Drawing.Size(63, 30); + this.destinationLabel.Size = new System.Drawing.Size(63, 31); this.destinationLabel.TabIndex = 3; this.destinationLabel.Text = "&Destination:"; this.destinationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -172,9 +173,9 @@ private void InitializeComponent() this._NO_TRANSLATE_To.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; this._NO_TRANSLATE_To.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystemDirectories; this._NO_TRANSLATE_To.FormattingEnabled = true; - this._NO_TRANSLATE_To.Location = new System.Drawing.Point(123, 33); + this._NO_TRANSLATE_To.Location = new System.Drawing.Point(123, 34); this._NO_TRANSLATE_To.Name = "_NO_TRANSLATE_To"; - this._NO_TRANSLATE_To.Size = new System.Drawing.Size(396, 21); + this._NO_TRANSLATE_To.Size = new System.Drawing.Size(399, 21); this._NO_TRANSLATE_To.TabIndex = 4; this._NO_TRANSLATE_To.SelectedIndexChanged += new System.EventHandler(this.ToSelectedIndexChanged); this._NO_TRANSLATE_To.TextUpdate += new System.EventHandler(this.ToTextUpdate); @@ -182,7 +183,7 @@ private void InitializeComponent() // ToBrowse // this.ToBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ToBrowse.Location = new System.Drawing.Point(525, 33); + this.ToBrowse.Location = new System.Drawing.Point(528, 34); this.ToBrowse.Name = "ToBrowse"; this.ToBrowse.Size = new System.Drawing.Size(94, 24); this.ToBrowse.TabIndex = 5; @@ -194,9 +195,9 @@ private void InitializeComponent() // this.subdirectoryLabel.AutoSize = true; this.subdirectoryLabel.Dock = System.Windows.Forms.DockStyle.Left; - this.subdirectoryLabel.Location = new System.Drawing.Point(3, 60); + this.subdirectoryLabel.Location = new System.Drawing.Point(3, 62); this.subdirectoryLabel.Name = "subdirectoryLabel"; - this.subdirectoryLabel.Size = new System.Drawing.Size(114, 30); + this.subdirectoryLabel.Size = new System.Drawing.Size(114, 31); this.subdirectoryLabel.TabIndex = 6; this.subdirectoryLabel.Text = "&Subdirectory to create:"; this.subdirectoryLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -205,9 +206,9 @@ private void InitializeComponent() // this._NO_TRANSLATE_NewDirectory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this._NO_TRANSLATE_NewDirectory.Location = new System.Drawing.Point(123, 63); + this._NO_TRANSLATE_NewDirectory.Location = new System.Drawing.Point(123, 65); this._NO_TRANSLATE_NewDirectory.Name = "_NO_TRANSLATE_NewDirectory"; - this._NO_TRANSLATE_NewDirectory.Size = new System.Drawing.Size(396, 20); + this._NO_TRANSLATE_NewDirectory.Size = new System.Drawing.Size(399, 20); this._NO_TRANSLATE_NewDirectory.TabIndex = 7; this._NO_TRANSLATE_NewDirectory.TextChanged += new System.EventHandler(this.NewDirectoryTextChanged); // @@ -215,7 +216,7 @@ private void InitializeComponent() // this.brachLabel.AutoSize = true; this.brachLabel.Dock = System.Windows.Forms.DockStyle.Left; - this.brachLabel.Location = new System.Drawing.Point(3, 90); + this.brachLabel.Location = new System.Drawing.Point(3, 93); this.brachLabel.Name = "brachLabel"; this.brachLabel.Size = new System.Drawing.Size(44, 32); this.brachLabel.TabIndex = 8; @@ -227,9 +228,9 @@ private void InitializeComponent() this._NO_TRANSLATE_Branches.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this._NO_TRANSLATE_Branches.FormattingEnabled = true; - this._NO_TRANSLATE_Branches.Location = new System.Drawing.Point(123, 93); + this._NO_TRANSLATE_Branches.Location = new System.Drawing.Point(123, 96); this._NO_TRANSLATE_Branches.Name = "_NO_TRANSLATE_Branches"; - this._NO_TRANSLATE_Branches.Size = new System.Drawing.Size(396, 21); + this._NO_TRANSLATE_Branches.Size = new System.Drawing.Size(399, 21); this._NO_TRANSLATE_Branches.TabIndex = 9; this._NO_TRANSLATE_Branches.DropDown += new System.EventHandler(this.Branches_DropDown); // @@ -265,10 +266,10 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.Info.BackColor = System.Drawing.SystemColors.Info; this.Info.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.Info.Location = new System.Drawing.Point(3, 135); + this.Info.Location = new System.Drawing.Point(3, 138); this.Info.Margin = new System.Windows.Forms.Padding(3, 13, 3, 0); this.Info.Name = "Info"; - this.Info.Size = new System.Drawing.Size(616, 42); + this.Info.Size = new System.Drawing.Size(619, 42); this.Info.TabIndex = 1; this.Info.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -278,10 +279,10 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.groupBox1.Controls.Add(this.CentralRepository); this.groupBox1.Controls.Add(this.PersonalRepository); - this.groupBox1.Location = new System.Drawing.Point(3, 181); + this.groupBox1.Location = new System.Drawing.Point(3, 184); this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 0); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(616, 78); + this.groupBox1.Size = new System.Drawing.Size(619, 78); this.groupBox1.TabIndex = 2; this.groupBox1.TabStop = false; this.groupBox1.Text = "Repository type"; @@ -315,6 +316,7 @@ private void InitializeComponent() this.LoadSSHKey.Image = global::GitUI.Properties.Images.Putty; this.LoadSSHKey.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.LoadSSHKey.Location = new System.Drawing.Point(101, 3); + this.LoadSSHKey.MinimumSize = new System.Drawing.Size(75, 23); this.LoadSSHKey.Name = "LoadSSHKey"; this.LoadSSHKey.Padding = new System.Windows.Forms.Padding(8, 0, 8, 0); this.LoadSSHKey.Size = new System.Drawing.Size(118, 23); @@ -334,7 +336,8 @@ private void InitializeComponent() this.tpnlMain.Controls.Add(this.Info); this.tpnlMain.Controls.Add(this.groupBox1); this.tpnlMain.Controls.Add(this.optionsPanel); - this.tpnlMain.Location = new System.Drawing.Point(24, 24); + this.tpnlMain.Location = new System.Drawing.Point(12, 12); + this.tpnlMain.Margin = new System.Windows.Forms.Padding(0); this.tpnlMain.Name = "tpnlMain"; this.tpnlMain.RowCount = 5; this.tpnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); @@ -342,7 +345,7 @@ private void InitializeComponent() this.tpnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tpnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tpnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tpnlMain.Size = new System.Drawing.Size(622, 292); + this.tpnlMain.Size = new System.Drawing.Size(625, 295); this.tpnlMain.TabIndex = 0; // // optionsPanel @@ -352,10 +355,10 @@ private void InitializeComponent() this.optionsPanel.Controls.Add(this.cbDownloadFullHistory); this.optionsPanel.Controls.Add(this.cbLfs); this.optionsPanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.optionsPanel.Location = new System.Drawing.Point(0, 269); + this.optionsPanel.Location = new System.Drawing.Point(0, 272); this.optionsPanel.Margin = new System.Windows.Forms.Padding(0, 10, 0, 0); this.optionsPanel.Name = "optionsPanel"; - this.optionsPanel.Size = new System.Drawing.Size(622, 23); + this.optionsPanel.Size = new System.Drawing.Size(625, 23); this.optionsPanel.TabIndex = 2; // // cbLfs @@ -374,8 +377,7 @@ private void InitializeComponent() this.AcceptButton = this.Ok; this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.AutoSize = true; - this.ClientSize = new System.Drawing.Size(676, 388); + this.ClientSize = new System.Drawing.Size(647, 351); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FormClone"; @@ -421,8 +423,8 @@ private void InitializeComponent() private System.Windows.Forms.Label destinationLabel; private System.Windows.Forms.Label subdirectoryLabel; private System.Windows.Forms.TableLayoutPanel tpnlMain; - private ToolTip ttHints; - private FlowLayoutPanel optionsPanel; - private CheckBox cbLfs; + private System.Windows.Forms.ToolTip ttHints; + private System.Windows.Forms.FlowLayoutPanel optionsPanel; + private System.Windows.Forms.CheckBox cbLfs; } } diff --git a/GitUI/CommandsDialogs/FormClone.cs b/GitUI/CommandsDialogs/FormClone.cs index 5a6ca9056f6..46e43c191d2 100644 --- a/GitUI/CommandsDialogs/FormClone.cs +++ b/GitUI/CommandsDialogs/FormClone.cs @@ -52,6 +52,7 @@ public FormClone(GitUICommands commands, string url, bool openedFromProtocolHand // work-around the designer bug that can't add controls to FlowLayoutPanel ControlsPanel.Controls.Add(Ok); ControlsPanel.Controls.Add(LoadSSHKey); + AcceptButton = Ok; InitializeComplete(); _openedFromProtocolHandler = openedFromProtocolHandler; @@ -74,8 +75,8 @@ protected override void OnRuntimeLoad(EventArgs e) base.OnRuntimeLoad(e); // scale up for hi DPI - MaximumSize = DpiUtil.Scale(new Size(950, 425)); - MinimumSize = DpiUtil.Scale(new Size(450, 425)); + MaximumSize = DpiUtil.Scale(new Size(950, 398)); + MinimumSize = DpiUtil.Scale(new Size(450, 398)); Size = new Size((tpnlMain.Left * 2) + tpnlMain.Width + /* right margin */DpiUtil.Scale(16), Height); tpnlMain.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; diff --git a/GitUI/CommandsDialogs/FormInit.Designer.cs b/GitUI/CommandsDialogs/FormInit.Designer.cs index bea8d71f115..95b3c71b78d 100644 --- a/GitUI/CommandsDialogs/FormInit.Designer.cs +++ b/GitUI/CommandsDialogs/FormInit.Designer.cs @@ -46,12 +46,12 @@ private void InitializeComponent() this.MainPanel.Controls.Add(this.Browse); this.MainPanel.Controls.Add(this._NO_TRANSLATE_Directory); this.MainPanel.Controls.Add(this.label1); - this.MainPanel.Size = new System.Drawing.Size(572, 146); + this.MainPanel.Size = new System.Drawing.Size(542, 141); // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(27, 24); + this.label1.Location = new System.Drawing.Point(12, 17); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(49, 13); this.label1.TabIndex = 0; @@ -62,14 +62,14 @@ private void InitializeComponent() this._NO_TRANSLATE_Directory.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; this._NO_TRANSLATE_Directory.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystemDirectories; this._NO_TRANSLATE_Directory.FormattingEnabled = true; - this._NO_TRANSLATE_Directory.Location = new System.Drawing.Point(110, 21); + this._NO_TRANSLATE_Directory.Location = new System.Drawing.Point(95, 14); this._NO_TRANSLATE_Directory.Name = "_NO_TRANSLATE_Directory"; this._NO_TRANSLATE_Directory.Size = new System.Drawing.Size(323, 21); this._NO_TRANSLATE_Directory.TabIndex = 1; // // Browse // - this.Browse.Location = new System.Drawing.Point(439, 19); + this.Browse.Location = new System.Drawing.Point(424, 12); this.Browse.Name = "Browse"; this.Browse.PathShowingControl = this._NO_TRANSLATE_Directory; this.Browse.Size = new System.Drawing.Size(106, 25); @@ -80,7 +80,7 @@ private void InitializeComponent() // this.groupBox1.Controls.Add(this.Central); this.groupBox1.Controls.Add(this.Personal); - this.groupBox1.Location = new System.Drawing.Point(27, 48); + this.groupBox1.Location = new System.Drawing.Point(12, 41); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(518, 78); this.groupBox1.TabIndex = 3; @@ -111,9 +111,12 @@ private void InitializeComponent() // // Init // - this.Init.Location = new System.Drawing.Point(451, 106); + this.Init.AutoSize = true; + this.Init.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.Init.Location = new System.Drawing.Point(31, 7); + this.Init.MinimumSize = new System.Drawing.Size(75, 23); this.Init.Name = "Init"; - this.Init.Size = new System.Drawing.Size(118, 25); + this.Init.Size = new System.Drawing.Size(75, 23); this.Init.TabIndex = 4; this.Init.Text = "Create"; this.Init.UseVisualStyleBackColor = true; @@ -124,7 +127,7 @@ private void InitializeComponent() this.AcceptButton = this.Init; this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(572, 191); + this.ClientSize = new System.Drawing.Size(542, 173); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; diff --git a/GitUI/CommandsDialogs/FormInit.cs b/GitUI/CommandsDialogs/FormInit.cs index 5ee66b06eb4..95613c9049d 100644 --- a/GitUI/CommandsDialogs/FormInit.cs +++ b/GitUI/CommandsDialogs/FormInit.cs @@ -4,7 +4,6 @@ using GitCommands; using GitCommands.Git; using GitCommands.UserRepositoryHistory; -using GitExtUtils; using ResourceManager; namespace GitUI.CommandsDialogs @@ -33,6 +32,7 @@ public FormInit(string dir, EventHandler gitModuleChanged) // work-around the designer bug that can't add controls to FlowLayoutPanel ControlsPanel.Controls.Add(Init); + AcceptButton = Init; InitializeComplete(); diff --git a/GitUI/GitExtensionsDialog.Designer.cs b/GitUI/GitExtensionsDialog.Designer.cs index c64b6eb42b1..1ac9e9e3c4f 100644 --- a/GitUI/GitExtensionsDialog.Designer.cs +++ b/GitUI/GitExtensionsDialog.Designer.cs @@ -41,11 +41,12 @@ private void InitializeComponent() this.ControlsPanel.BackColor = System.Drawing.SystemColors.ControlLight; this.ControlsPanel.Dock = System.Windows.Forms.DockStyle.Bottom; this.ControlsPanel.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.ControlsPanel.Location = new System.Drawing.Point(0, 292); - this.ControlsPanel.MinimumSize = new System.Drawing.Size(0, 45); + this.ControlsPanel.Location = new System.Drawing.Point(0, 305); + this.ControlsPanel.Margin = new System.Windows.Forms.Padding(0); + this.ControlsPanel.MinimumSize = new System.Drawing.Size(0, 32); this.ControlsPanel.Name = "ControlsPanel"; - this.ControlsPanel.Padding = new System.Windows.Forms.Padding(8); - this.ControlsPanel.Size = new System.Drawing.Size(553, 45); + this.ControlsPanel.Padding = new System.Windows.Forms.Padding(5); + this.ControlsPanel.Size = new System.Drawing.Size(553, 32); this.ControlsPanel.TabIndex = 0; // // MainPanel @@ -53,9 +54,10 @@ private void InitializeComponent() this.MainPanel.BackColor = System.Drawing.SystemColors.Window; this.MainPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.MainPanel.Location = new System.Drawing.Point(0, 0); + this.MainPanel.Margin = new System.Windows.Forms.Padding(0); this.MainPanel.Name = "MainPanel"; - this.MainPanel.Padding = new System.Windows.Forms.Padding(24); - this.MainPanel.Size = new System.Drawing.Size(553, 292); + this.MainPanel.Padding = new System.Windows.Forms.Padding(12); + this.MainPanel.Size = new System.Drawing.Size(553, 305); this.MainPanel.TabIndex = 1; // // GitExtensionsDialog diff --git a/GitUI/HelperDialogs/FormStatus.Designer.cs b/GitUI/HelperDialogs/FormStatus.Designer.cs index 51cd9bb09c9..2236750160c 100644 --- a/GitUI/HelperDialogs/FormStatus.Designer.cs +++ b/GitUI/HelperDialogs/FormStatus.Designer.cs @@ -25,18 +25,21 @@ private void InitializeComponent() // // MainPanel // - this.MainPanel.Controls.Add(this.pnlOutput); this.MainPanel.Controls.Add(this.KeepDialogOpen); this.MainPanel.Controls.Add(this.Abort); this.MainPanel.Controls.Add(this.Ok); + this.MainPanel.Controls.Add(this.pnlOutput); this.MainPanel.Padding = new System.Windows.Forms.Padding(0); - this.MainPanel.Size = new System.Drawing.Size(549, 240); + this.MainPanel.Size = new System.Drawing.Size(549, 253); // // Ok // + this.Ok.AutoSize = true; + this.Ok.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.Ok.Location = new System.Drawing.Point(314, 234); + this.Ok.MinimumSize = new System.Drawing.Size(75, 23); this.Ok.Name = "Ok"; - this.Ok.Size = new System.Drawing.Size(118, 25); + this.Ok.Size = new System.Drawing.Size(75, 24); this.Ok.TabIndex = 0; this.Ok.Text = "OK"; this.Ok.UseCompatibleTextRendering = true; @@ -46,7 +49,7 @@ private void InitializeComponent() // ProgressBar // this.ProgressBar.Dock = System.Windows.Forms.DockStyle.Bottom; - this.ProgressBar.Location = new System.Drawing.Point(0, 240); + this.ProgressBar.Location = new System.Drawing.Point(0, 253); this.ProgressBar.Margin = new System.Windows.Forms.Padding(0); this.ProgressBar.MarqueeAnimationSpeed = 1; this.ProgressBar.Name = "ProgressBar"; @@ -60,7 +63,6 @@ private void InitializeComponent() this.KeepDialogOpen.AutoSize = true; this.KeepDialogOpen.Location = new System.Drawing.Point(178, 228); this.KeepDialogOpen.Name = "KeepDialogOpen"; - this.KeepDialogOpen.Padding = new System.Windows.Forms.Padding(0, 4, 0, 0); this.KeepDialogOpen.Size = new System.Drawing.Size(111, 22); this.KeepDialogOpen.TabIndex = 2; this.KeepDialogOpen.Text = "Keep dialog open"; @@ -70,10 +72,13 @@ private void InitializeComponent() // // Abort // + this.Abort.AutoSize = true; + this.Abort.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.Abort.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.Abort.Location = new System.Drawing.Point(444, 234); + this.Abort.MinimumSize = new System.Drawing.Size(75, 23); this.Abort.Name = "Abort"; - this.Abort.Size = new System.Drawing.Size(86, 25); + this.Abort.Size = new System.Drawing.Size(75, 24); this.Abort.TabIndex = 1; this.Abort.Text = "Abort"; this.Abort.UseCompatibleTextRendering = true; @@ -85,8 +90,8 @@ private void InitializeComponent() this.pnlOutput.Dock = System.Windows.Forms.DockStyle.Fill; this.pnlOutput.Location = new System.Drawing.Point(0, 0); this.pnlOutput.Name = "pnlOutput"; - this.pnlOutput.Padding = new System.Windows.Forms.Padding(27); - this.pnlOutput.Size = new System.Drawing.Size(549, 240); + this.pnlOutput.Padding = new System.Windows.Forms.Padding(12); + this.pnlOutput.Size = new System.Drawing.Size(549, 253); this.pnlOutput.TabIndex = 0; // // FormStatus diff --git a/GitUI/HelperDialogs/FormStatus.cs b/GitUI/HelperDialogs/FormStatus.cs index d192da7983d..a9e838360a2 100644 --- a/GitUI/HelperDialogs/FormStatus.cs +++ b/GitUI/HelperDialogs/FormStatus.cs @@ -57,6 +57,8 @@ public FormStatus(GitUICommands commands, [CanBeNull] ConsoleOutputControl conso ControlsPanel.Controls.Add(Abort); ControlsPanel.Controls.Add(Ok); ControlsPanel.Controls.Add(KeepDialogOpen); + AcceptButton = Ok; + CancelButton = Abort; Controls.SetChildIndex(ProgressBar, 1); ProgressBar.Dock = DockStyle.Bottom; diff --git a/GitUI/UserControls/ConsoleEmulatorOutputControl.cs b/GitUI/UserControls/ConsoleEmulatorOutputControl.cs index cae6dc69c08..9f0fdf00869 100644 --- a/GitUI/UserControls/ConsoleEmulatorOutputControl.cs +++ b/GitUI/UserControls/ConsoleEmulatorOutputControl.cs @@ -27,7 +27,7 @@ public ConsoleEmulatorOutputControl() private void InitializeComponent() { - Controls.Add(_panel = new Panel { Dock = DockStyle.Fill, BorderStyle = BorderStyle.FixedSingle }); + Controls.Add(_panel = new Panel { Dock = DockStyle.Fill, BorderStyle = BorderStyle.None }); } public override int ExitCode => _nLastExitCode;