diff --git a/ShareX.HelpersLib/Forms/ClipboardContentViewer.cs b/ShareX.HelpersLib/Forms/ClipboardContentViewer.cs index 9413decf4..f790339b8 100644 --- a/ShareX.HelpersLib/Forms/ClipboardContentViewer.cs +++ b/ShareX.HelpersLib/Forms/ClipboardContentViewer.cs @@ -41,7 +41,7 @@ public partial class ClipboardContentViewer : Form public ClipboardContentViewer(bool showCheckBox = false) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); if (ShareXResources.UseDarkTheme) { diff --git a/ShareX.HelpersLib/Forms/ColorPickerForm.cs b/ShareX.HelpersLib/Forms/ColorPickerForm.cs index ca7a53639..1af785e96 100644 --- a/ShareX.HelpersLib/Forms/ColorPickerForm.cs +++ b/ShareX.HelpersLib/Forms/ColorPickerForm.cs @@ -44,7 +44,7 @@ public partial class ColorPickerForm : Form public ColorPickerForm(Color currentColor, bool isScreenColorPickerMode = false) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); IsScreenColorPickerMode = isScreenColorPickerMode; diff --git a/ShareX.HelpersLib/Forms/DNSChangerForm.cs b/ShareX.HelpersLib/Forms/DNSChangerForm.cs index f3512e775..bea958889 100644 --- a/ShareX.HelpersLib/Forms/DNSChangerForm.cs +++ b/ShareX.HelpersLib/Forms/DNSChangerForm.cs @@ -35,7 +35,7 @@ public partial class DNSChangerForm : Form public DNSChangerForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); AddDNS(Resources.DNSChangerForm_DNSChangerForm_Manual); AddDNS("Google Public DNS", "8.8.8.8", "8.8.4.4"); // https://developers.google.com/speed/public-dns/ diff --git a/ShareX.HelpersLib/Forms/DebugForm.cs b/ShareX.HelpersLib/Forms/DebugForm.cs index fa29b2ee2..4d45e19db 100644 --- a/ShareX.HelpersLib/Forms/DebugForm.cs +++ b/ShareX.HelpersLib/Forms/DebugForm.cs @@ -47,7 +47,7 @@ private DebugForm(Logger logger) Logger = logger; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); rtbDebug.Text = Logger.ToString(); rtbDebug.SelectionStart = rtbDebug.TextLength; diff --git a/ShareX.HelpersLib/Forms/ErrorForm.cs b/ShareX.HelpersLib/Forms/ErrorForm.cs index bad1107dc..67490a7a8 100644 --- a/ShareX.HelpersLib/Forms/ErrorForm.cs +++ b/ShareX.HelpersLib/Forms/ErrorForm.cs @@ -42,7 +42,7 @@ public ErrorForm(Exception error, string logPath, string bugReportPath) : this(e public ErrorForm(string errorTitle, string errorMessage, string logPath, string bugReportPath, bool unhandledException = true) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); IsUnhandledException = unhandledException; LogPath = logPath; diff --git a/ShareX.HelpersLib/Forms/GradientPickerForm.cs b/ShareX.HelpersLib/Forms/GradientPickerForm.cs index ba7dd4868..5696125cc 100644 --- a/ShareX.HelpersLib/Forms/GradientPickerForm.cs +++ b/ShareX.HelpersLib/Forms/GradientPickerForm.cs @@ -41,7 +41,7 @@ public GradientPickerForm(GradientInfo gradient) Gradient = gradient; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); cbGradientType.Items.AddRange(Helpers.GetEnumNamesProper()); cbGradientType.SelectedIndex = (int)Gradient.Type; diff --git a/ShareX.HelpersLib/Forms/HashCheckForm.cs b/ShareX.HelpersLib/Forms/HashCheckForm.cs index c26d1237b..feec0b5e5 100644 --- a/ShareX.HelpersLib/Forms/HashCheckForm.cs +++ b/ShareX.HelpersLib/Forms/HashCheckForm.cs @@ -38,7 +38,7 @@ public partial class HashCheckForm : Form public HashCheckForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); cbHashType.Items.AddRange(Helpers.GetEnumDescriptions()); cbHashType.SelectedIndex = (int)HashType.SHA1; diff --git a/ShareX.HelpersLib/Forms/InputBox.cs b/ShareX.HelpersLib/Forms/InputBox.cs index 66a5c4649..747fdaa66 100644 --- a/ShareX.HelpersLib/Forms/InputBox.cs +++ b/ShareX.HelpersLib/Forms/InputBox.cs @@ -36,7 +36,7 @@ public class InputBox : Form public InputBox(string title = null, string inputText = null, string okText = null, string cancelText = null) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); InputText = inputText; diff --git a/ShareX.HelpersLib/Forms/MonitorTestForm.cs b/ShareX.HelpersLib/Forms/MonitorTestForm.cs index ba2416d97..f606d17f6 100644 --- a/ShareX.HelpersLib/Forms/MonitorTestForm.cs +++ b/ShareX.HelpersLib/Forms/MonitorTestForm.cs @@ -35,7 +35,7 @@ public partial class MonitorTestForm : Form public MonitorTestForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); Rectangle screenBounds = CaptureHelpers.GetScreenBounds(); Location = screenBounds.Location; diff --git a/ShareX.HelpersLib/Forms/MyMessageBox.cs b/ShareX.HelpersLib/Forms/MyMessageBox.cs index 76726c797..ebd8ab706 100644 --- a/ShareX.HelpersLib/Forms/MyMessageBox.cs +++ b/ShareX.HelpersLib/Forms/MyMessageBox.cs @@ -147,7 +147,7 @@ public MyMessageBox(string text, string caption, MessageBoxButtons buttons = Mes panel.Size = new Size(labelPanel.Width + (LabelHorizontalPadding * 2), button1.Height + (ButtonPadding * 2)); ClientSize = new Size(panel.Width, labelPanel.Height + (LabelVerticalPadding * 2) + panel.Height); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); if (ShareXResources.UseDarkTheme) { diff --git a/ShareX.HelpersLib/Forms/OutputBox.cs b/ShareX.HelpersLib/Forms/OutputBox.cs index 71e51f58d..a2f9849c1 100644 --- a/ShareX.HelpersLib/Forms/OutputBox.cs +++ b/ShareX.HelpersLib/Forms/OutputBox.cs @@ -33,7 +33,7 @@ public partial class OutputBox : Form public OutputBox(string text, string title) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); Text = "ShareX - " + title; txtText.Text = text; diff --git a/ShareX.HelpersLib/Forms/PrintForm.cs b/ShareX.HelpersLib/Forms/PrintForm.cs index 528a4acf5..a6fc4a448 100644 --- a/ShareX.HelpersLib/Forms/PrintForm.cs +++ b/ShareX.HelpersLib/Forms/PrintForm.cs @@ -38,7 +38,7 @@ public partial class PrintForm : Form public PrintForm(Image img, PrintSettings settings, bool previewOnly = false) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); printHelper = new PrintHelper(img); printHelper.Settings = printSettings = settings; diff --git a/ShareX.HelpersLib/Forms/PrintTextForm.cs b/ShareX.HelpersLib/Forms/PrintTextForm.cs index c788ad9bf..e44191e43 100644 --- a/ShareX.HelpersLib/Forms/PrintTextForm.cs +++ b/ShareX.HelpersLib/Forms/PrintTextForm.cs @@ -38,7 +38,7 @@ public partial class PrintTextForm : Form public PrintTextForm(string text, PrintSettings settings) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); printHelper = new PrintHelper(text); printHelper.Settings = printSettings = settings; diff --git a/ShareX.HelpersLib/ShareXResources.cs b/ShareX.HelpersLib/ShareXResources.cs index 403e9ae1b..8c5df92d4 100644 --- a/ShareX.HelpersLib/ShareXResources.cs +++ b/ShareX.HelpersLib/ShareXResources.cs @@ -43,7 +43,7 @@ public static string UserAgent public static bool UseDarkTheme { get; set; } public static bool UseWhiteIcon { get; set; } - public static bool ApplyTheme { get; set; } = true; + public static bool ExperimentalDarkTheme { get; set; } = true; public static Icon Icon => UseWhiteIcon ? Resources.ShareX_Icon_White : Resources.ShareX_Icon; @@ -61,32 +61,33 @@ public static string UserAgent public static Color DarkBorderColor { get; } = Color.FromArgb(28, 32, 38); public static Color DarkCheckerColor1 { get; } = Color.FromArgb(60, 60, 60); public static Color DarkCheckerColor2 { get; } = Color.FromArgb(50, 50, 50); + public static Color DarkLinkColor { get; } = Color.FromArgb(166, 212, 255); public static int CheckerSize { get; } = 15; - public static void ApplyThemeToForm(Form form, bool setIcon = true) + public static void ApplyTheme(Form form, bool setIcon = true) { if (setIcon) { form.Icon = Icon; } - if (ApplyTheme) + if (ExperimentalDarkTheme) { - ApplyThemeToControl(form); + ApplyDarkThemeToControl(form); if (form.IsHandleCreated) { - NativeMethods.UseImmersiveDarkMode(form.Handle, UseDarkTheme); + NativeMethods.UseImmersiveDarkMode(form.Handle, true); } else { - form.HandleCreated += (s, e) => NativeMethods.UseImmersiveDarkMode(form.Handle, UseDarkTheme); + form.HandleCreated += (s, e) => NativeMethods.UseImmersiveDarkMode(form.Handle, true); } } } - private static void ApplyThemeToControl(Control control) + private static void ApplyDarkThemeToControl(Control control) { switch (control) { @@ -96,58 +97,58 @@ private static void ApplyThemeToControl(Control control) control.ForeColor = SystemColors.ControlText; return; case SplitContainer sc: - sc.Panel1.BackColor = BackgroundColor; - sc.Panel2.BackColor = BackgroundColor; + sc.Panel1.BackColor = DarkBackgroundColor; + sc.Panel2.BackColor = DarkBackgroundColor; break; case PropertyGrid pg: - pg.CategoryForeColor = TextColor; - pg.CategorySplitterColor = BorderColor; - pg.LineColor = BorderColor; - pg.SelectedItemWithFocusForeColor = BorderColor; - pg.SelectedItemWithFocusBackColor = TextColor; + pg.CategoryForeColor = DarkTextColor; + pg.CategorySplitterColor = DarkBorderColor; + pg.LineColor = DarkBorderColor; + pg.SelectedItemWithFocusForeColor = DarkBorderColor; + pg.SelectedItemWithFocusBackColor = DarkTextColor; break; case DataGridView dgv: - dgv.BackgroundColor = BackgroundColor; - dgv.GridColor = BorderColor; - dgv.DefaultCellStyle.BackColor = BackgroundColor; - dgv.DefaultCellStyle.SelectionBackColor = BackgroundColor; - dgv.DefaultCellStyle.ForeColor = TextColor; - dgv.DefaultCellStyle.SelectionForeColor = TextColor; - dgv.ColumnHeadersDefaultCellStyle.BackColor = BorderColor; - dgv.ColumnHeadersDefaultCellStyle.SelectionBackColor = BorderColor; - dgv.ColumnHeadersDefaultCellStyle.ForeColor = TextColor; - dgv.ColumnHeadersDefaultCellStyle.SelectionForeColor = TextColor; + dgv.BackgroundColor = DarkBackgroundColor; + dgv.GridColor = DarkBorderColor; + dgv.DefaultCellStyle.BackColor = DarkBackgroundColor; + dgv.DefaultCellStyle.SelectionBackColor = DarkBackgroundColor; + dgv.DefaultCellStyle.ForeColor = DarkTextColor; + dgv.DefaultCellStyle.SelectionForeColor = DarkTextColor; + dgv.ColumnHeadersDefaultCellStyle.BackColor = DarkBorderColor; + dgv.ColumnHeadersDefaultCellStyle.SelectionBackColor = DarkBorderColor; + dgv.ColumnHeadersDefaultCellStyle.ForeColor = DarkTextColor; + dgv.ColumnHeadersDefaultCellStyle.SelectionForeColor = DarkTextColor; dgv.EnableHeadersVisualStyles = false; break; case ToolStrip ts: ts.Renderer = new ToolStripDarkRenderer(); - ApplyThemeToToolStripItemCollection(ts.Items); + ApplyDarkThemeToToolStripItemCollection(ts.Items); return; case LinkLabel ll: - ll.LinkColor = Color.FromArgb(166, 212, 255); + ll.LinkColor = DarkLinkColor; break; } - control.ForeColor = TextColor; - control.BackColor = BackgroundColor; + control.ForeColor = DarkTextColor; + control.BackColor = DarkBackgroundColor; foreach (Control child in control.Controls) { - ApplyThemeToControl(child); + ApplyDarkThemeToControl(child); } } - private static void ApplyThemeToToolStripItemCollection(ToolStripItemCollection collection) + private static void ApplyDarkThemeToToolStripItemCollection(ToolStripItemCollection collection) { foreach (ToolStripItem tsi in collection) { switch (tsi) { case ToolStripControlHost tsch: - ApplyThemeToControl(tsch.Control); + ApplyDarkThemeToControl(tsch.Control); break; case ToolStripDropDownItem tsddi: - ApplyThemeToToolStripItemCollection(tsddi.DropDownItems); + ApplyDarkThemeToToolStripItemCollection(tsddi.DropDownItems); break; } } diff --git a/ShareX.HistoryLib/Forms/HistoryForm.cs b/ShareX.HistoryLib/Forms/HistoryForm.cs index f5b6f4b25..903b89b24 100644 --- a/ShareX.HistoryLib/Forms/HistoryForm.cs +++ b/ShareX.HistoryLib/Forms/HistoryForm.cs @@ -52,7 +52,7 @@ public HistoryForm(string historyPath, HistorySettings settings, Action Settings = settings; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); defaultTitle = Text; UpdateTitle(); diff --git a/ShareX.HistoryLib/Forms/HistoryItemInfoForm.cs b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.cs index 32ed6e9ff..cef07e4c4 100644 --- a/ShareX.HistoryLib/Forms/HistoryItemInfoForm.cs +++ b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.cs @@ -33,7 +33,7 @@ public partial class HistoryItemInfoForm : Form public HistoryItemInfoForm(object hi) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); olvMain.SelectObject(hi); } diff --git a/ShareX.HistoryLib/Forms/ImageHistoryForm.cs b/ShareX.HistoryLib/Forms/ImageHistoryForm.cs index dba12ed46..011f543ac 100644 --- a/ShareX.HistoryLib/Forms/ImageHistoryForm.cs +++ b/ShareX.HistoryLib/Forms/ImageHistoryForm.cs @@ -49,7 +49,7 @@ public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Actio { InitializeComponent(); tsMain.Renderer = new ToolStripRoundedEdgeRenderer(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); HistoryPath = historyPath; Settings = settings; diff --git a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs index 88cf859fe..fd8e250eb 100644 --- a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs +++ b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs @@ -37,7 +37,7 @@ public partial class ImageHistorySettingsForm : Form public ImageHistorySettingsForm(ImageHistorySettings settings) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); Settings = settings; cbViewMode.Items.AddRange(Enum.GetNames(typeof(Manina.Windows.Forms.View))); diff --git a/ShareX.ImageEffectsLib/ImageEffectsForm.cs b/ShareX.ImageEffectsLib/ImageEffectsForm.cs index 45c694d44..e0871bc42 100644 --- a/ShareX.ImageEffectsLib/ImageEffectsForm.cs +++ b/ShareX.ImageEffectsLib/ImageEffectsForm.cs @@ -48,7 +48,7 @@ public partial class ImageEffectsForm : Form public ImageEffectsForm(Image img, List presets, int selectedPresetIndex) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); DefaultImage = img; Presets = presets; diff --git a/ShareX.ImageEffectsLib/WatermarkForm.cs b/ShareX.ImageEffectsLib/WatermarkForm.cs index bce74c587..18d6b13d5 100644 --- a/ShareX.ImageEffectsLib/WatermarkForm.cs +++ b/ShareX.ImageEffectsLib/WatermarkForm.cs @@ -42,7 +42,7 @@ public WatermarkForm(WatermarkConfig watermarkConfig) config = watermarkConfig; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); CodeMenu.Create(txtWatermarkText, CodeMenuEntryFilename.t, CodeMenuEntryFilename.pn); } diff --git a/ShareX.IndexerLib/Forms/DirectoryIndexerForm.cs b/ShareX.IndexerLib/Forms/DirectoryIndexerForm.cs index 0a6e71c19..40e64dd13 100644 --- a/ShareX.IndexerLib/Forms/DirectoryIndexerForm.cs +++ b/ShareX.IndexerLib/Forms/DirectoryIndexerForm.cs @@ -42,7 +42,7 @@ public partial class DirectoryIndexerForm : Form public DirectoryIndexerForm(IndexerSettings settings) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); Settings = settings; pgSettings.SelectedObject = Settings; diff --git a/ShareX.MediaLib/Forms/ImageCombinerForm.cs b/ShareX.MediaLib/Forms/ImageCombinerForm.cs index 3907eb66d..a605f8b4a 100644 --- a/ShareX.MediaLib/Forms/ImageCombinerForm.cs +++ b/ShareX.MediaLib/Forms/ImageCombinerForm.cs @@ -43,7 +43,7 @@ public ImageCombinerForm(ImageCombinerOptions options) Options = options; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); cbOrientation.Items.AddRange(Enum.GetNames(typeof(Orientation))); cbOrientation.SelectedIndex = (int)Options.Orientation; diff --git a/ShareX.MediaLib/Forms/ImageThumbnailerForm.cs b/ShareX.MediaLib/Forms/ImageThumbnailerForm.cs index 716a0e8a2..e9beb20ac 100644 --- a/ShareX.MediaLib/Forms/ImageThumbnailerForm.cs +++ b/ShareX.MediaLib/Forms/ImageThumbnailerForm.cs @@ -37,7 +37,7 @@ public partial class ImageThumbnailerForm : Form public ImageThumbnailerForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); } private void UpdateEnabled() diff --git a/ShareX.MediaLib/Forms/VideoThumbnailerForm.cs b/ShareX.MediaLib/Forms/VideoThumbnailerForm.cs index 91a02f3f0..b53251e1a 100644 --- a/ShareX.MediaLib/Forms/VideoThumbnailerForm.cs +++ b/ShareX.MediaLib/Forms/VideoThumbnailerForm.cs @@ -46,7 +46,7 @@ public VideoThumbnailerForm(string ffmpegPath, VideoThumbnailOptions options) Options = options; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); txtMediaPath.Text = Options.LastVideoPath ?? ""; pgOptions.SelectedObject = Options; diff --git a/ShareX.ScreenCaptureLib/Forms/CanvasSizeForm.cs b/ShareX.ScreenCaptureLib/Forms/CanvasSizeForm.cs index b981a29da..909db2731 100644 --- a/ShareX.ScreenCaptureLib/Forms/CanvasSizeForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/CanvasSizeForm.cs @@ -36,7 +36,7 @@ public partial class CanvasSizeForm : Form public CanvasSizeForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); } public CanvasSizeForm(Padding canvas) : this() diff --git a/ShareX.ScreenCaptureLib/Forms/EditorStartupForm.cs b/ShareX.ScreenCaptureLib/Forms/EditorStartupForm.cs index 5e4baed8d..7aeff0492 100644 --- a/ShareX.ScreenCaptureLib/Forms/EditorStartupForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/EditorStartupForm.cs @@ -43,7 +43,7 @@ public EditorStartupForm(RegionCaptureOptions options) Options = options; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); } private void LoadImageFile(string imageFilePath) diff --git a/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.cs b/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.cs index 47d3dc720..b5af9baba 100644 --- a/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/FFmpegOptionsForm.cs @@ -48,7 +48,7 @@ public FFmpegOptionsForm(ScreencastOptions options) Options = options; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); eiFFmpeg.ObjectType = typeof(FFmpegOptions); cboVideoCodec.Items.AddRange(Helpers.GetEnumDescriptions()); diff --git a/ShareX.ScreenCaptureLib/Forms/ImageInsertForm.cs b/ShareX.ScreenCaptureLib/Forms/ImageInsertForm.cs index 7137162c9..ca0b83baa 100644 --- a/ShareX.ScreenCaptureLib/Forms/ImageInsertForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/ImageInsertForm.cs @@ -36,7 +36,7 @@ public partial class ImageInsertForm : Form public ImageInsertForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); } private void Close(ImageInsertMethod insertMethod) diff --git a/ShareX.ScreenCaptureLib/Forms/ImageSizeForm.cs b/ShareX.ScreenCaptureLib/Forms/ImageSizeForm.cs index a3b145632..31f48e4f4 100644 --- a/ShareX.ScreenCaptureLib/Forms/ImageSizeForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/ImageSizeForm.cs @@ -41,7 +41,7 @@ public partial class ImageSizeForm : Form public ImageSizeForm(Size size, ImageEditorInterpolationMode interpolationMode) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); ImageSize = size; InterpolationMode = interpolationMode; diff --git a/ShareX.ScreenCaptureLib/Forms/NewImageForm.cs b/ShareX.ScreenCaptureLib/Forms/NewImageForm.cs index eb4d89f39..54e622237 100644 --- a/ShareX.ScreenCaptureLib/Forms/NewImageForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/NewImageForm.cs @@ -37,7 +37,7 @@ public partial class NewImageForm : Form public NewImageForm(RegionCaptureOptions options) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); Options = options; diff --git a/ShareX.ScreenCaptureLib/Forms/ScrollingCaptureForm.cs b/ShareX.ScreenCaptureLib/Forms/ScrollingCaptureForm.cs index 222ef8545..99dc52299 100644 --- a/ShareX.ScreenCaptureLib/Forms/ScrollingCaptureForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/ScrollingCaptureForm.cs @@ -56,7 +56,7 @@ public ScrollingCaptureForm(ScrollingCaptureOptions options, RegionCaptureOption RegionCaptureOptions = regionCaptureOptions; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); cbScrollMethod.Items.AddRange(Helpers.GetLocalizedEnumDescriptions()); cbScrollMethod.SelectedIndex = (int)Options.ScrollMethod; diff --git a/ShareX.ScreenCaptureLib/Forms/StickerForm.cs b/ShareX.ScreenCaptureLib/Forms/StickerForm.cs index 73e8d6f44..2edaaa689 100644 --- a/ShareX.ScreenCaptureLib/Forms/StickerForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/StickerForm.cs @@ -50,7 +50,7 @@ public StickerForm(List stickerPacks, int selectedStickerPack, InitializeComponent(); tsMain.Renderer = new ToolStripRoundedEdgeRenderer(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); tsnudSize.NumericUpDownControl.Minimum = 16; tsnudSize.NumericUpDownControl.Maximum = 256; diff --git a/ShareX.ScreenCaptureLib/Forms/StickerPackForm.cs b/ShareX.ScreenCaptureLib/Forms/StickerPackForm.cs index a1dc4c899..5808f2b85 100644 --- a/ShareX.ScreenCaptureLib/Forms/StickerPackForm.cs +++ b/ShareX.ScreenCaptureLib/Forms/StickerPackForm.cs @@ -39,7 +39,7 @@ public StickerPackForm(List stickers) Stickers = stickers; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); foreach (StickerPackInfo stickerPackInfo in Stickers) { diff --git a/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.cs b/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.cs index 6aacdf917..5c59698b2 100644 --- a/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.cs +++ b/ShareX.ScreenCaptureLib/Forms/TextDrawingInputBox.cs @@ -43,7 +43,7 @@ internal partial class TextDrawingInputBox : Form public TextDrawingInputBox(string text, TextDrawingOptions options, bool supportGradient) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); InputText = text; Options = options; diff --git a/ShareX.ScreenCaptureLib/Shapes/ShapeManagerMenu.cs b/ShareX.ScreenCaptureLib/Shapes/ShapeManagerMenu.cs index b77f02a02..525aec216 100644 --- a/ShareX.ScreenCaptureLib/Shapes/ShapeManagerMenu.cs +++ b/ShareX.ScreenCaptureLib/Shapes/ShapeManagerMenu.cs @@ -1050,7 +1050,7 @@ internal void CreateToolbar() tsMain.PerformLayout(); menuForm.ResumeLayout(false); - ShareXResources.ApplyThemeToForm(menuForm, false); + ShareXResources.ApplyTheme(menuForm, false); menuForm.Show(Form); diff --git a/ShareX.UploadersLib/Forms/CustomUploaderSettingsForm.cs b/ShareX.UploadersLib/Forms/CustomUploaderSettingsForm.cs index 093c3484a..1d549b6f7 100644 --- a/ShareX.UploadersLib/Forms/CustomUploaderSettingsForm.cs +++ b/ShareX.UploadersLib/Forms/CustomUploaderSettingsForm.cs @@ -59,7 +59,7 @@ public CustomUploaderSettingsForm(UploadersConfig config) Config = config; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); /* CodeMenuItem[] inputCodeMenuItems = new CodeMenuItem[] diff --git a/ShareX.UploadersLib/Forms/EmailForm.cs b/ShareX.UploadersLib/Forms/EmailForm.cs index 913139e31..327e58c42 100644 --- a/ShareX.UploadersLib/Forms/EmailForm.cs +++ b/ShareX.UploadersLib/Forms/EmailForm.cs @@ -38,7 +38,7 @@ public partial class EmailForm : Form public EmailForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); } public EmailForm(string toEmail, string subject, string body) : this() diff --git a/ShareX.UploadersLib/Forms/JiraUpload.cs b/ShareX.UploadersLib/Forms/JiraUpload.cs index 35cf257db..a9a7de22d 100644 --- a/ShareX.UploadersLib/Forms/JiraUpload.cs +++ b/ShareX.UploadersLib/Forms/JiraUpload.cs @@ -49,7 +49,7 @@ public string IssueId public JiraUpload() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); } public JiraUpload(string issuePrefix, GetSummaryHandler getSummary) : this() diff --git a/ShareX.UploadersLib/Forms/OCRSpaceForm.cs b/ShareX.UploadersLib/Forms/OCRSpaceForm.cs index 23e15dd0e..16670ef8b 100644 --- a/ShareX.UploadersLib/Forms/OCRSpaceForm.cs +++ b/ShareX.UploadersLib/Forms/OCRSpaceForm.cs @@ -44,7 +44,7 @@ public partial class OCRSpaceForm : Form public OCRSpaceForm(OCROptions ocrOptions) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); this.ocrOptions = ocrOptions; cbLanguages.Items.AddRange(Helpers.GetEnumDescriptions()); diff --git a/ShareX.UploadersLib/Forms/ParserSelectForm.cs b/ShareX.UploadersLib/Forms/ParserSelectForm.cs index 1ed19bfef..03ff40a64 100644 --- a/ShareX.UploadersLib/Forms/ParserSelectForm.cs +++ b/ShareX.UploadersLib/Forms/ParserSelectForm.cs @@ -82,7 +82,7 @@ public ParserSelectForm(string[] texts) ResumeLayout(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); } private void ParserSelectForm_Shown(object sender, EventArgs e) diff --git a/ShareX.UploadersLib/Forms/ResponseForm.cs b/ShareX.UploadersLib/Forms/ResponseForm.cs index 4aa084a34..1632e9ee3 100644 --- a/ShareX.UploadersLib/Forms/ResponseForm.cs +++ b/ShareX.UploadersLib/Forms/ResponseForm.cs @@ -38,7 +38,7 @@ public partial class ResponseForm : Form public ResponseForm(string response) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); Response = response; txtSource.Text = Response; diff --git a/ShareX.UploadersLib/Forms/TwitterTweetForm.cs b/ShareX.UploadersLib/Forms/TwitterTweetForm.cs index e7080d749..ed521087e 100644 --- a/ShareX.UploadersLib/Forms/TwitterTweetForm.cs +++ b/ShareX.UploadersLib/Forms/TwitterTweetForm.cs @@ -97,7 +97,7 @@ public bool MediaMode public TwitterTweetForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); MediaMode = false; } diff --git a/ShareX.UploadersLib/Forms/UploadersConfigForm.cs b/ShareX.UploadersLib/Forms/UploadersConfigForm.cs index 96d0f9db4..df61ffb7e 100644 --- a/ShareX.UploadersLib/Forms/UploadersConfigForm.cs +++ b/ShareX.UploadersLib/Forms/UploadersConfigForm.cs @@ -55,7 +55,7 @@ private UploadersConfigForm(UploadersConfig config) Config = config; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); InitializeControls(); } diff --git a/ShareX.UploadersLib/Forms/UserPassBox.cs b/ShareX.UploadersLib/Forms/UserPassBox.cs index fd4c51cdc..d8e5c1f4d 100644 --- a/ShareX.UploadersLib/Forms/UserPassBox.cs +++ b/ShareX.UploadersLib/Forms/UserPassBox.cs @@ -40,7 +40,7 @@ public partial class UserPassBox : Form public UserPassBox(string title, string userName, string password) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); Text = title; txtUserName.Text = userName; diff --git a/ShareX/Forms/AboutForm.cs b/ShareX/Forms/AboutForm.cs index 12f494108..ae97816ad 100644 --- a/ShareX/Forms/AboutForm.cs +++ b/ShareX/Forms/AboutForm.cs @@ -37,7 +37,7 @@ public partial class AboutForm : Form public AboutForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); lblProductName.Text = Program.Title; pbLogo.Image = ShareXResources.Logo; diff --git a/ShareX/Forms/ActionsForm.cs b/ShareX/Forms/ActionsForm.cs index 9c0cfb1bd..ab55bbd70 100644 --- a/ShareX/Forms/ActionsForm.cs +++ b/ShareX/Forms/ActionsForm.cs @@ -41,7 +41,7 @@ public ActionsForm() : this(new ExternalProgram()) public ActionsForm(ExternalProgram fileAction) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); FileAction = fileAction; txtName.Text = fileAction.Name ?? ""; diff --git a/ShareX/Forms/ActionsToolbarEditForm.cs b/ShareX/Forms/ActionsToolbarEditForm.cs index 3ff5a19bc..ae7ad1d0d 100644 --- a/ShareX/Forms/ActionsToolbarEditForm.cs +++ b/ShareX/Forms/ActionsToolbarEditForm.cs @@ -40,7 +40,7 @@ public partial class ActionsToolbarEditForm : Form public ActionsToolbarEditForm(List actions) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); Actions = actions; diff --git a/ShareX/Forms/ActionsToolbarForm.cs b/ShareX/Forms/ActionsToolbarForm.cs index ae392ff56..22bf37e6b 100644 --- a/ShareX/Forms/ActionsToolbarForm.cs +++ b/ShareX/Forms/ActionsToolbarForm.cs @@ -60,7 +60,7 @@ public static ActionsToolbarForm Instance private ActionsToolbarForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); } private void InitializeComponent() diff --git a/ShareX/Forms/AfterCaptureForm.cs b/ShareX/Forms/AfterCaptureForm.cs index 078cb0456..080b4189e 100644 --- a/ShareX/Forms/AfterCaptureForm.cs +++ b/ShareX/Forms/AfterCaptureForm.cs @@ -42,7 +42,7 @@ private AfterCaptureForm(TaskSettings taskSettings) TaskSettings = taskSettings; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); ImageList imageList = new ImageList { ColorDepth = ColorDepth.Depth32Bit }; imageList.Images.Add(Resources.checkbox_uncheck); diff --git a/ShareX/Forms/AfterUploadForm.cs b/ShareX/Forms/AfterUploadForm.cs index b3db5b3f1..e1a636859 100644 --- a/ShareX/Forms/AfterUploadForm.cs +++ b/ShareX/Forms/AfterUploadForm.cs @@ -46,7 +46,7 @@ public partial class AfterUploadForm : Form public AfterUploadForm(TaskInfo info) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); Info = info; if (Info.TaskSettings.AdvancedSettings.AutoCloseAfterUploadForm) tmrClose.Start(); diff --git a/ShareX/Forms/ApplicationSettingsForm.cs b/ShareX/Forms/ApplicationSettingsForm.cs index 680638f5d..54e079575 100644 --- a/ShareX/Forms/ApplicationSettingsForm.cs +++ b/ShareX/Forms/ApplicationSettingsForm.cs @@ -42,7 +42,7 @@ public partial class ApplicationSettingsForm : Form public ApplicationSettingsForm() { InitializeControls(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); } private void SettingsForm_Shown(object sender, EventArgs e) diff --git a/ShareX/Forms/AutoCaptureForm.cs b/ShareX/Forms/AutoCaptureForm.cs index e1c24fa14..93cab0384 100644 --- a/ShareX/Forms/AutoCaptureForm.cs +++ b/ShareX/Forms/AutoCaptureForm.cs @@ -64,7 +64,7 @@ public static AutoCaptureForm Instance private AutoCaptureForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); niTray.Icon = Resources.clock.ToIcon(); screenshotTimer = new System.Timers.Timer(); diff --git a/ShareX/Forms/BeforeUploadForm.cs b/ShareX/Forms/BeforeUploadForm.cs index b8f3e1845..2bf4c6469 100644 --- a/ShareX/Forms/BeforeUploadForm.cs +++ b/ShareX/Forms/BeforeUploadForm.cs @@ -35,7 +35,7 @@ public partial class BeforeUploadForm : Form public BeforeUploadForm(TaskInfo info) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); DialogResult = DialogResult.OK; ucBeforeUpload.InitCompleted += currentDestination => diff --git a/ShareX/Forms/ClipboardFormatForm.cs b/ShareX/Forms/ClipboardFormatForm.cs index 03752f9c9..3cfe3436f 100644 --- a/ShareX/Forms/ClipboardFormatForm.cs +++ b/ShareX/Forms/ClipboardFormatForm.cs @@ -41,7 +41,7 @@ public ClipboardFormatForm() : this(new ClipboardFormat()) public ClipboardFormatForm(ClipboardFormat cbf) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); ClipboardFormat = cbf; txtDescription.Text = cbf.Description ?? ""; diff --git a/ShareX/Forms/FileExistForm.cs b/ShareX/Forms/FileExistForm.cs index 5aebc5ddd..5876f90b2 100644 --- a/ShareX/Forms/FileExistForm.cs +++ b/ShareX/Forms/FileExistForm.cs @@ -41,7 +41,7 @@ public partial class FileExistForm : Form public FileExistForm(string filepath) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); Filepath = filepath; filename = Path.GetFileNameWithoutExtension(Filepath); diff --git a/ShareX/Forms/HotkeySettingsForm.cs b/ShareX/Forms/HotkeySettingsForm.cs index 758787680..3ee5cdf3a 100644 --- a/ShareX/Forms/HotkeySettingsForm.cs +++ b/ShareX/Forms/HotkeySettingsForm.cs @@ -42,7 +42,7 @@ public partial class HotkeySettingsForm : Form public HotkeySettingsForm(HotkeyManager hotkeyManager) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); PrepareHotkeys(hotkeyManager); } diff --git a/ShareX/Forms/MainForm.cs b/ShareX/Forms/MainForm.cs index 836a09fcc..606fbe8c0 100644 --- a/ShareX/Forms/MainForm.cs +++ b/ShareX/Forms/MainForm.cs @@ -838,7 +838,7 @@ private void AfterApplicationSettingsJobs() TaskManager.RecentManager.MaxCount = Program.Settings.RecentTasksMaxCount; - ShareXResources.ApplyTheme = Program.Settings.ExperimentalDarkTheme; + ShareXResources.ExperimentalDarkTheme = Program.Settings.ExperimentalDarkTheme; if (ShareXResources.UseDarkTheme != Program.Settings.UseDarkTheme) { diff --git a/ShareX/Forms/QRCodeForm.cs b/ShareX/Forms/QRCodeForm.cs index 0a8ed7879..8c0a28f11 100644 --- a/ShareX/Forms/QRCodeForm.cs +++ b/ShareX/Forms/QRCodeForm.cs @@ -46,7 +46,7 @@ public partial class QRCodeForm : Form public QRCodeForm(string text = null) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); if (!string.IsNullOrEmpty(text)) { diff --git a/ShareX/Forms/QuickTaskInfoEditForm.cs b/ShareX/Forms/QuickTaskInfoEditForm.cs index 556be37b4..32b947445 100644 --- a/ShareX/Forms/QuickTaskInfoEditForm.cs +++ b/ShareX/Forms/QuickTaskInfoEditForm.cs @@ -39,7 +39,7 @@ public QuickTaskInfoEditForm(QuickTaskInfo taskInfo) TaskInfo = taskInfo; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); txtName.Text = TaskInfo.Name; AddMultiEnumItemsContextMenu(x => TaskInfo.AfterCaptureTasks = TaskInfo.AfterCaptureTasks.Swap(x), cmsAfterCapture); diff --git a/ShareX/Forms/QuickTaskMenuEditorForm.cs b/ShareX/Forms/QuickTaskMenuEditorForm.cs index a8c137e84..e21ee8dcb 100644 --- a/ShareX/Forms/QuickTaskMenuEditorForm.cs +++ b/ShareX/Forms/QuickTaskMenuEditorForm.cs @@ -37,7 +37,7 @@ public partial class QuickTaskMenuEditorForm : Form public QuickTaskMenuEditorForm() { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); if (Program.Settings.QuickTaskPresets == null) { diff --git a/ShareX/Forms/TaskSettingsForm.cs b/ShareX/Forms/TaskSettingsForm.cs index 552d43896..2e8281d38 100644 --- a/ShareX/Forms/TaskSettingsForm.cs +++ b/ShareX/Forms/TaskSettingsForm.cs @@ -48,7 +48,7 @@ public partial class TaskSettingsForm : Form public TaskSettingsForm(TaskSettings hotkeySetting, bool isDefault = false) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); TaskSettings = hotkeySetting; IsDefault = isDefault; diff --git a/ShareX/Forms/TextUploadForm.cs b/ShareX/Forms/TextUploadForm.cs index 3c8bbd974..11f5bdbfa 100644 --- a/ShareX/Forms/TextUploadForm.cs +++ b/ShareX/Forms/TextUploadForm.cs @@ -36,7 +36,7 @@ public partial class TextUploadForm : Form public TextUploadForm(string content = null) { InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); if (string.IsNullOrEmpty(content) && Clipboard.ContainsText()) { diff --git a/ShareX/Forms/WatchFolderForm.cs b/ShareX/Forms/WatchFolderForm.cs index 4e4400334..55385e27c 100644 --- a/ShareX/Forms/WatchFolderForm.cs +++ b/ShareX/Forms/WatchFolderForm.cs @@ -42,7 +42,7 @@ public WatchFolderForm(WatchFolderSettings watchFolder) WatchFolder = watchFolder; InitializeComponent(); - ShareXResources.ApplyThemeToForm(this); + ShareXResources.ApplyTheme(this); txtFolderPath.Text = watchFolder.FolderPath ?? ""; txtFilter.Text = watchFolder.Filter ?? "";