diff --git a/ShareX/Forms/ApplicationSettingsForm.Designer.cs b/ShareX/Forms/ApplicationSettingsForm.Designer.cs
index 5b30e2620..a210e4441 100644
--- a/ShareX/Forms/ApplicationSettingsForm.Designer.cs
+++ b/ShareX/Forms/ApplicationSettingsForm.Designer.cs
@@ -53,12 +53,12 @@ private void InitializeComponent()
this.cbRememberMainFormSize = new System.Windows.Forms.CheckBox();
this.lblLanguage = new System.Windows.Forms.Label();
this.tpTheme = new System.Windows.Forms.TabPage();
+ this.cbExperimentalCustomTheme = new System.Windows.Forms.CheckBox();
this.btnThemeReset = new System.Windows.Forms.Button();
this.eiTheme = new ShareX.HelpersLib.ExportImportControl();
this.btnThemeRemove = new System.Windows.Forms.Button();
this.btnThemeAdd = new System.Windows.Forms.Button();
this.cbThemes = new System.Windows.Forms.ComboBox();
- this.btnApplyTheme = new System.Windows.Forms.Button();
this.pgTheme = new System.Windows.Forms.PropertyGrid();
this.cbUseCustomTheme = new System.Windows.Forms.CheckBox();
this.tpIntegration = new System.Windows.Forms.TabPage();
@@ -155,7 +155,6 @@ private void InitializeComponent()
this.tpAdvanced = new System.Windows.Forms.TabPage();
this.pgSettings = new System.Windows.Forms.PropertyGrid();
this.tttvMain = new ShareX.HelpersLib.TabToTreeView();
- this.cbExperimentalCustomTheme = new System.Windows.Forms.CheckBox();
this.tcSettings.SuspendLayout();
this.tpGeneral.SuspendLayout();
this.tpTheme.SuspendLayout();
@@ -361,13 +360,19 @@ private void InitializeComponent()
this.tpTheme.Controls.Add(this.btnThemeRemove);
this.tpTheme.Controls.Add(this.btnThemeAdd);
this.tpTheme.Controls.Add(this.cbThemes);
- this.tpTheme.Controls.Add(this.btnApplyTheme);
this.tpTheme.Controls.Add(this.pgTheme);
this.tpTheme.Controls.Add(this.cbUseCustomTheme);
resources.ApplyResources(this.tpTheme, "tpTheme");
this.tpTheme.Name = "tpTheme";
this.tpTheme.UseVisualStyleBackColor = true;
//
+ // cbExperimentalCustomTheme
+ //
+ resources.ApplyResources(this.cbExperimentalCustomTheme, "cbExperimentalCustomTheme");
+ this.cbExperimentalCustomTheme.Name = "cbExperimentalCustomTheme";
+ this.cbExperimentalCustomTheme.UseVisualStyleBackColor = true;
+ this.cbExperimentalCustomTheme.CheckedChanged += new System.EventHandler(this.cbExperimentalCustomTheme_CheckedChanged);
+ //
// btnThemeReset
//
resources.ApplyResources(this.btnThemeReset, "btnThemeReset");
@@ -381,6 +386,7 @@ private void InitializeComponent()
resources.ApplyResources(this.eiTheme, "eiTheme");
this.eiTheme.Name = "eiTheme";
this.eiTheme.ObjectType = null;
+ this.eiTheme.SerializationBinder = null;
this.eiTheme.ExportRequested += new ShareX.HelpersLib.ExportImportControl.ExportEventHandler(this.EiTheme_ExportRequested);
this.eiTheme.ImportRequested += new ShareX.HelpersLib.ExportImportControl.ImportEventHandler(this.EiTheme_ImportRequested);
//
@@ -406,19 +412,13 @@ private void InitializeComponent()
this.cbThemes.Name = "cbThemes";
this.cbThemes.SelectedIndexChanged += new System.EventHandler(this.CbThemes_SelectedIndexChanged);
//
- // btnApplyTheme
- //
- resources.ApplyResources(this.btnApplyTheme, "btnApplyTheme");
- this.btnApplyTheme.Name = "btnApplyTheme";
- this.btnApplyTheme.UseVisualStyleBackColor = true;
- this.btnApplyTheme.Click += new System.EventHandler(this.BtnApplyTheme_Click);
- //
// pgTheme
//
resources.ApplyResources(this.pgTheme, "pgTheme");
this.pgTheme.Name = "pgTheme";
this.pgTheme.PropertySort = System.Windows.Forms.PropertySort.NoSort;
this.pgTheme.ToolbarVisible = false;
+ this.pgTheme.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.pgTheme_PropertyValueChanged);
//
// cbUseCustomTheme
//
@@ -1156,13 +1156,6 @@ private void InitializeComponent()
this.tttvMain.TreeViewSize = 175;
this.tttvMain.TabChanged += new ShareX.HelpersLib.TabToTreeView.TabChangedEventHandler(this.tttvMain_TabChanged);
//
- // cbExperimentalCustomTheme
- //
- resources.ApplyResources(this.cbExperimentalCustomTheme, "cbExperimentalCustomTheme");
- this.cbExperimentalCustomTheme.Name = "cbExperimentalCustomTheme";
- this.cbExperimentalCustomTheme.UseVisualStyleBackColor = true;
- this.cbExperimentalCustomTheme.CheckedChanged += new System.EventHandler(this.cbExperimentalCustomTheme_CheckedChanged);
- //
// ApplicationSettingsForm
//
resources.ApplyResources(this, "$this");
@@ -1339,7 +1332,6 @@ private void InitializeComponent()
private System.Windows.Forms.CheckBox cbUseCustomTheme;
private System.Windows.Forms.CheckBox cbUseWhiteShareXIcon;
private System.Windows.Forms.TabPage tpTheme;
- private System.Windows.Forms.Button btnApplyTheme;
private System.Windows.Forms.PropertyGrid pgTheme;
private System.Windows.Forms.ComboBox cbThemes;
private System.Windows.Forms.Button btnThemeRemove;
diff --git a/ShareX/Forms/ApplicationSettingsForm.cs b/ShareX/Forms/ApplicationSettingsForm.cs
index 077033824..3660a6ba9 100644
--- a/ShareX/Forms/ApplicationSettingsForm.cs
+++ b/ShareX/Forms/ApplicationSettingsForm.cs
@@ -124,7 +124,7 @@ private void UpdateControls()
// Theme
cbThemes.Items.AddRange(Program.Settings.Themes.ToArray());
cbThemes.SelectedIndex = Program.Settings.SelectedTheme;
- pgTheme.SelectedObject = Program.Settings.Themes[Program.Settings.SelectedTheme].Copy();
+ pgTheme.SelectedObject = Program.Settings.Themes[Program.Settings.SelectedTheme];
UpdateThemeControls();
// Integration
@@ -435,7 +435,7 @@ private void btnCheckDevBuild_Click(object sender, EventArgs e)
private void UpdateThemeControls()
{
cbExperimentalCustomTheme.Enabled = btnThemeAdd.Enabled = btnThemeReset.Enabled = pgTheme.Enabled = eiTheme.Enabled = Program.Settings.UseCustomTheme;
- cbThemes.Enabled = btnThemeRemove.Enabled = btnApplyTheme.Enabled = Program.Settings.UseCustomTheme && cbThemes.Items.Count > 0;
+ cbThemes.Enabled = btnThemeRemove.Enabled = Program.Settings.UseCustomTheme && cbThemes.Items.Count > 0;
}
private void ApplySelectedTheme()
@@ -477,7 +477,7 @@ private void CbThemes_SelectedIndexChanged(object sender, EventArgs e)
if (cbThemes.SelectedItem != null)
{
- pgTheme.SelectedObject = cbThemes.SelectedItem.Copy();
+ pgTheme.SelectedObject = cbThemes.SelectedItem;
}
else
{
@@ -524,20 +524,13 @@ private void BtnThemeReset_Click(object sender, EventArgs e)
cbThemes.Items.Clear();
cbThemes.Items.AddRange(Program.Settings.Themes.ToArray());
cbThemes.SelectedIndex = Program.Settings.SelectedTheme;
- pgTheme.SelectedObject = Program.Settings.Themes[Program.Settings.SelectedTheme].Copy();
+ pgTheme.SelectedObject = Program.Settings.Themes[Program.Settings.SelectedTheme];
}
- private void BtnApplyTheme_Click(object sender, EventArgs e)
+ private void pgTheme_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
{
- int index = cbThemes.SelectedIndex;
- if (index > -1)
- {
- Program.Settings.SelectedTheme = index;
- Program.Settings.Themes[index] = (ShareXTheme)pgTheme.SelectedObject;
- cbThemes.Items[index] = Program.Settings.Themes[index];
- UpdateThemeControls();
- ApplySelectedTheme();
- }
+ UpdateThemeControls();
+ ApplySelectedTheme();
}
private object EiTheme_ExportRequested()
diff --git a/ShareX/Forms/ApplicationSettingsForm.resx b/ShareX/Forms/ApplicationSettingsForm.resx
index 8d0d6dd01..b8ed8a7cd 100644
--- a/ShareX/Forms/ApplicationSettingsForm.resx
+++ b/ShareX/Forms/ApplicationSettingsForm.resx
@@ -487,7 +487,7 @@
btnLanguages
- ShareX.HelpersLib.MenuButton, ShareX.HelpersLib, Version=13.0.2.0, Culture=neutral, PublicKeyToken=null
+ ShareX.HelpersLib.MenuButton, ShareX.HelpersLib, Version=13.1.1.0, Culture=neutral, PublicKeyToken=null
tpGeneral
@@ -736,7 +736,7 @@
eiTheme
- ShareX.HelpersLib.ExportImportControl, ShareX.HelpersLib, Version=13.0.2.0, Culture=neutral, PublicKeyToken=null
+ ShareX.HelpersLib.ExportImportControl, ShareX.HelpersLib, Version=13.1.1.0, Culture=neutral, PublicKeyToken=null
tpTheme
@@ -819,33 +819,6 @@
5
-
- NoControl
-
-
- 16, 352
-
-
- 184, 24
-
-
- 1
-
-
- Apply theme
-
-
- btnApplyTheme
-
-
- System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- tpTheme
-
-
- 6
-
False
@@ -868,7 +841,7 @@
tpTheme
- 7
+ 6
True
@@ -898,7 +871,7 @@
tpTheme
- 8
+ 7
4, 22
@@ -2170,7 +2143,7 @@
lvClipboardFormats
- ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.0.2.0, Culture=neutral, PublicKeyToken=null
+ ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.1.1.0, Culture=neutral, PublicKeyToken=null
gbClipboardFormats
@@ -2245,7 +2218,7 @@
lvSecondaryFileUploaders
- ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.0.2.0, Culture=neutral, PublicKeyToken=null
+ ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.1.1.0, Culture=neutral, PublicKeyToken=null
gbSecondaryFileUploaders
@@ -2296,7 +2269,7 @@
lvSecondaryImageUploaders
- ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.0.2.0, Culture=neutral, PublicKeyToken=null
+ ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.1.1.0, Culture=neutral, PublicKeyToken=null
gbSecondaryImageUploaders
@@ -2347,7 +2320,7 @@
lvSecondaryTextUploaders
- ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.0.2.0, Culture=neutral, PublicKeyToken=null
+ ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.1.1.0, Culture=neutral, PublicKeyToken=null
gbSecondaryTextUploaders
@@ -3346,7 +3319,7 @@
tttvMain
- ShareX.HelpersLib.TabToTreeView, ShareX.HelpersLib, Version=13.0.2.0, Culture=neutral, PublicKeyToken=null
+ ShareX.HelpersLib.TabToTreeView, ShareX.HelpersLib, Version=13.1.1.0, Culture=neutral, PublicKeyToken=null
$this