mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Added ability to hide toolbar close button
This commit is contained in:
parent
cf2de9bc0e
commit
9715c5a12f
7 changed files with 42 additions and 1 deletions
|
|
@ -162,6 +162,9 @@
|
|||
<setting name="searchPanelBorder" serializeAs="String">
|
||||
<value>Single</value>
|
||||
</setting>
|
||||
<setting name="toolbarCloseButton" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</Crypto_Notepad.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
|
|
|||
2
Crypto Notepad/MainForm.Designer.cs
generated
2
Crypto Notepad/MainForm.Designer.cs
generated
|
|
@ -1359,7 +1359,7 @@ public void InitializeComponent()
|
|||
protected internal System.Windows.Forms.TextBox fileLockedKeyTextBox;
|
||||
protected internal System.Windows.Forms.Panel richTextBoxPanel;
|
||||
protected internal System.Windows.Forms.Label searchFindNextButton;
|
||||
private System.Windows.Forms.Label closeToolbarButton;
|
||||
protected internal System.Windows.Forms.Label searchCloseButton;
|
||||
protected internal System.Windows.Forms.Label closeToolbarButton;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -534,6 +534,7 @@ private void LoadSettings()
|
|||
wordWrapMainMenu.Checked = settings.editorWrap;
|
||||
toolbarPanel.BackColor = settings.toolbarBackColor;
|
||||
toolbarPanel.Visible = settings.toolbarVisible;
|
||||
closeToolbarButton.Visible = settings.toolbarCloseButton;
|
||||
mainMenu.Visible = settings.mainMenuVisible;
|
||||
rightToLeftContextMenu.Checked = settings.editorRightToLeft;
|
||||
lineNumbers.BackColor = settings.lineNumbersBackColor;
|
||||
|
|
|
|||
13
Crypto Notepad/Properties/Settings.Designer.cs
generated
13
Crypto Notepad/Properties/Settings.Designer.cs
generated
|
|
@ -673,5 +673,18 @@ public string searchPanelBorder {
|
|||
this["searchPanelBorder"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool toolbarCloseButton {
|
||||
get {
|
||||
return ((bool)(this["toolbarCloseButton"]));
|
||||
}
|
||||
set {
|
||||
this["toolbarCloseButton"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,5 +152,8 @@
|
|||
<Setting Name="searchPanelBorder" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">Single</Value>
|
||||
</Setting>
|
||||
<Setting Name="toolbarCloseButton" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
14
Crypto Notepad/SettingsForm.Designer.cs
generated
14
Crypto Notepad/SettingsForm.Designer.cs
generated
|
|
@ -115,6 +115,7 @@ private void InitializeComponent()
|
|||
this.fontDialog = new System.Windows.Forms.FontDialog();
|
||||
this.searchBorderLabel = new System.Windows.Forms.Label();
|
||||
this.searchBorderComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.toolbarCloseButtonCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.settingsTabControl.SuspendLayout();
|
||||
this.editorTabPage.SuspendLayout();
|
||||
this.applicationTabPage.SuspendLayout();
|
||||
|
|
@ -975,6 +976,7 @@ private void InitializeComponent()
|
|||
//
|
||||
this.toolbarTabPage.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.toolbarTabPage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.toolbarTabPage.Controls.Add(this.toolbarCloseButtonCheckBox);
|
||||
this.toolbarTabPage.Controls.Add(this.toolbarOldIconsCheckBox);
|
||||
this.toolbarTabPage.Controls.Add(this.toolbarBorderCheckBox);
|
||||
this.toolbarTabPage.Controls.Add(this.toolbarBackColor);
|
||||
|
|
@ -1154,6 +1156,17 @@ private void InitializeComponent()
|
|||
this.searchBorderComboBox.TabIndex = 5;
|
||||
this.searchBorderComboBox.DropDownClosed += new System.EventHandler(this.SearchBorderComboBox_DropDownClosed);
|
||||
//
|
||||
// toolbarCloseButtonCheckBox
|
||||
//
|
||||
this.toolbarCloseButtonCheckBox.AutoSize = true;
|
||||
this.toolbarCloseButtonCheckBox.Location = new System.Drawing.Point(9, 116);
|
||||
this.toolbarCloseButtonCheckBox.Name = "toolbarCloseButtonCheckBox";
|
||||
this.toolbarCloseButtonCheckBox.Size = new System.Drawing.Size(94, 19);
|
||||
this.toolbarCloseButtonCheckBox.TabIndex = 12;
|
||||
this.toolbarCloseButtonCheckBox.Text = "Close button";
|
||||
this.toolbarCloseButtonCheckBox.UseVisualStyleBackColor = true;
|
||||
this.toolbarCloseButtonCheckBox.Click += new System.EventHandler(this.ToolbarCloseButtonCheckBox_Click);
|
||||
//
|
||||
// SettingsForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
|
@ -1287,5 +1300,6 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.Label editorBorderLabel;
|
||||
private System.Windows.Forms.ComboBox searchBorderComboBox;
|
||||
private System.Windows.Forms.Label searchBorderLabel;
|
||||
private System.Windows.Forms.CheckBox toolbarCloseButtonCheckBox;
|
||||
}
|
||||
}
|
||||
|
|
@ -53,6 +53,7 @@ private void LoadSettings()
|
|||
toolbarBorderCheckBox.Checked = settings.toolbarBorder;
|
||||
toolbarVisibleCheckBox.Checked = settings.toolbarVisible;
|
||||
toolbarOldIconsCheckBox.Checked = settings.oldToolbarIcons;
|
||||
toolbarCloseButtonCheckBox.Checked = settings.toolbarCloseButton;
|
||||
|
||||
statusPanelBackColor.BackColor = settings.statusPanelBackColor;
|
||||
statusPanelFontColor.BackColor = settings.statusPanelFontColor;
|
||||
|
|
@ -830,6 +831,12 @@ private void SearchBorderComboBox_DropDownClosed(object sender, EventArgs e)
|
|||
settings.searchPanelBorder = searchBorderComboBox.Text;
|
||||
}
|
||||
|
||||
private void ToolbarCloseButtonCheckBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainForm main = Owner as MainForm;
|
||||
main.closeToolbarButton.Visible = toolbarCloseButtonCheckBox.Checked;
|
||||
settings.toolbarCloseButton = toolbarCloseButtonCheckBox.Checked;
|
||||
}
|
||||
/*Settings Section*/
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue