Rename function name

This commit is contained in:
Jaex 2019-06-24 21:36:16 +03:00
parent c4d36a85d6
commit 17b6c009fe
63 changed files with 95 additions and 94 deletions

View file

@ -41,7 +41,7 @@ public partial class ClipboardContentViewer : Form
public ClipboardContentViewer(bool showCheckBox = false)
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
if (ShareXResources.UseDarkTheme)
{

View file

@ -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;

View file

@ -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/

View file

@ -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;

View file

@ -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;

View file

@ -41,7 +41,7 @@ public GradientPickerForm(GradientInfo gradient)
Gradient = gradient;
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
cbGradientType.Items.AddRange(Helpers.GetEnumNamesProper<LinearGradientMode>());
cbGradientType.SelectedIndex = (int)Gradient.Type;

View file

@ -38,7 +38,7 @@ public partial class HashCheckForm : Form
public HashCheckForm()
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
cbHashType.Items.AddRange(Helpers.GetEnumDescriptions<HashType>());
cbHashType.SelectedIndex = (int)HashType.SHA1;

View file

@ -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;

View file

@ -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;

View file

@ -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)
{

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;
}
}

View file

@ -52,7 +52,7 @@ public HistoryForm(string historyPath, HistorySettings settings, Action<string>
Settings = settings;
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
defaultTitle = Text;
UpdateTitle();

View file

@ -33,7 +33,7 @@ public partial class HistoryItemInfoForm : Form
public HistoryItemInfoForm(object hi)
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
olvMain.SelectObject(hi);
}

View file

@ -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;

View file

@ -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)));

View file

@ -48,7 +48,7 @@ public partial class ImageEffectsForm : Form
public ImageEffectsForm(Image img, List<ImageEffectPreset> presets, int selectedPresetIndex)
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
DefaultImage = img;
Presets = presets;

View file

@ -42,7 +42,7 @@ public WatermarkForm(WatermarkConfig watermarkConfig)
config = watermarkConfig;
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
CodeMenu.Create<CodeMenuEntryFilename>(txtWatermarkText, CodeMenuEntryFilename.t, CodeMenuEntryFilename.pn);
}

View file

@ -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;

View file

@ -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;

View file

@ -37,7 +37,7 @@ public partial class ImageThumbnailerForm : Form
public ImageThumbnailerForm()
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
}
private void UpdateEnabled()

View file

@ -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;

View file

@ -36,7 +36,7 @@ public partial class CanvasSizeForm : Form
public CanvasSizeForm()
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
}
public CanvasSizeForm(Padding canvas) : this()

View file

@ -43,7 +43,7 @@ public EditorStartupForm(RegionCaptureOptions options)
Options = options;
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
}
private void LoadImageFile(string imageFilePath)

View file

@ -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<FFmpegVideoCodec>());

View file

@ -36,7 +36,7 @@ public partial class ImageInsertForm : Form
public ImageInsertForm()
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
}
private void Close(ImageInsertMethod insertMethod)

View file

@ -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;

View file

@ -37,7 +37,7 @@ public partial class NewImageForm : Form
public NewImageForm(RegionCaptureOptions options)
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
Options = options;

View file

@ -56,7 +56,7 @@ public ScrollingCaptureForm(ScrollingCaptureOptions options, RegionCaptureOption
RegionCaptureOptions = regionCaptureOptions;
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
cbScrollMethod.Items.AddRange(Helpers.GetLocalizedEnumDescriptions<ScrollingCaptureScrollMethod>());
cbScrollMethod.SelectedIndex = (int)Options.ScrollMethod;

View file

@ -50,7 +50,7 @@ public StickerForm(List<StickerPackInfo> stickerPacks, int selectedStickerPack,
InitializeComponent();
tsMain.Renderer = new ToolStripRoundedEdgeRenderer();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
tsnudSize.NumericUpDownControl.Minimum = 16;
tsnudSize.NumericUpDownControl.Maximum = 256;

View file

@ -39,7 +39,7 @@ public StickerPackForm(List<StickerPackInfo> stickers)
Stickers = stickers;
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
foreach (StickerPackInfo stickerPackInfo in Stickers)
{

View file

@ -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;

View file

@ -1050,7 +1050,7 @@ internal void CreateToolbar()
tsMain.PerformLayout();
menuForm.ResumeLayout(false);
ShareXResources.ApplyThemeToForm(menuForm, false);
ShareXResources.ApplyTheme(menuForm, false);
menuForm.Show(Form);

View file

@ -59,7 +59,7 @@ public CustomUploaderSettingsForm(UploadersConfig config)
Config = config;
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
/*
CodeMenuItem[] inputCodeMenuItems = new CodeMenuItem[]

View file

@ -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()

View file

@ -49,7 +49,7 @@ public string IssueId
public JiraUpload()
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
}
public JiraUpload(string issuePrefix, GetSummaryHandler getSummary) : this()

View file

@ -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<OCRSpaceLanguages>());

View file

@ -82,7 +82,7 @@ public ParserSelectForm(string[] texts)
ResumeLayout();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
}
private void ParserSelectForm_Shown(object sender, EventArgs e)

View file

@ -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;

View file

@ -97,7 +97,7 @@ public bool MediaMode
public TwitterTweetForm()
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
MediaMode = false;
}

View file

@ -55,7 +55,7 @@ private UploadersConfigForm(UploadersConfig config)
Config = config;
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
InitializeControls();
}

View file

@ -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;

View file

@ -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;

View file

@ -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 ?? "";

View file

@ -40,7 +40,7 @@ public partial class ActionsToolbarEditForm : Form
public ActionsToolbarEditForm(List<HotkeyType> actions)
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
Actions = actions;

View file

@ -60,7 +60,7 @@ public static ActionsToolbarForm Instance
private ActionsToolbarForm()
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
}
private void InitializeComponent()

View file

@ -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);

View file

@ -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();

View file

@ -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)

View file

@ -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();

View file

@ -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 =>

View file

@ -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 ?? "";

View file

@ -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);

View file

@ -42,7 +42,7 @@ public partial class HotkeySettingsForm : Form
public HotkeySettingsForm(HotkeyManager hotkeyManager)
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
PrepareHotkeys(hotkeyManager);
}

View file

@ -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)
{

View file

@ -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))
{

View file

@ -39,7 +39,7 @@ public QuickTaskInfoEditForm(QuickTaskInfo taskInfo)
TaskInfo = taskInfo;
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
txtName.Text = TaskInfo.Name;
AddMultiEnumItemsContextMenu<AfterCaptureTasks>(x => TaskInfo.AfterCaptureTasks = TaskInfo.AfterCaptureTasks.Swap(x), cmsAfterCapture);

View file

@ -37,7 +37,7 @@ public partial class QuickTaskMenuEditorForm : Form
public QuickTaskMenuEditorForm()
{
InitializeComponent();
ShareXResources.ApplyThemeToForm(this);
ShareXResources.ApplyTheme(this);
if (Program.Settings.QuickTaskPresets == null)
{

View file

@ -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;

View file

@ -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())
{

View file

@ -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 ?? "";