mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-30 12:11:07 +12:00
More dark theme support
This commit is contained in:
parent
ae969a9cb3
commit
f57d9693a3
|
@ -41,7 +41,12 @@ public partial class ClipboardContentViewer : Form
|
||||||
public ClipboardContentViewer(bool showCheckBox = false)
|
public ClipboardContentViewer(bool showCheckBox = false)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
|
if (ShareXResources.UseDarkTheme)
|
||||||
|
{
|
||||||
|
lblQuestion.BackColor = ShareXResources.DarkBorderColor;
|
||||||
|
}
|
||||||
|
|
||||||
cbDontShowThisWindow.Visible = showCheckBox;
|
cbDontShowThisWindow.Visible = showCheckBox;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public partial class DNSChangerForm : Form
|
||||||
public DNSChangerForm()
|
public DNSChangerForm()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
AddDNS(Resources.DNSChangerForm_DNSChangerForm_Manual);
|
AddDNS(Resources.DNSChangerForm_DNSChangerForm_Manual);
|
||||||
AddDNS("Google Public DNS", "8.8.8.8", "8.8.4.4"); // https://developers.google.com/speed/public-dns/
|
AddDNS("Google Public DNS", "8.8.8.8", "8.8.4.4"); // https://developers.google.com/speed/public-dns/
|
|
@ -44,10 +44,11 @@ public partial class DebugForm : Form
|
||||||
|
|
||||||
private DebugForm(Logger logger)
|
private DebugForm(Logger logger)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
|
||||||
Icon = ShareXResources.Icon;
|
|
||||||
Logger = logger;
|
Logger = logger;
|
||||||
|
|
||||||
|
InitializeComponent();
|
||||||
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
rtbDebug.Text = Logger.ToString();
|
rtbDebug.Text = Logger.ToString();
|
||||||
rtbDebug.SelectionStart = rtbDebug.TextLength;
|
rtbDebug.SelectionStart = rtbDebug.TextLength;
|
||||||
rtbDebug.ScrollToCaret();
|
rtbDebug.ScrollToCaret();
|
||||||
|
|
|
@ -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)
|
public ErrorForm(string errorTitle, string errorMessage, string logPath, string bugReportPath, bool unhandledException = true)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
IsUnhandledException = unhandledException;
|
IsUnhandledException = unhandledException;
|
||||||
LogPath = logPath;
|
LogPath = logPath;
|
||||||
|
|
|
@ -39,8 +39,10 @@ public partial class GradientPickerForm : Form
|
||||||
public GradientPickerForm(GradientInfo gradient)
|
public GradientPickerForm(GradientInfo gradient)
|
||||||
{
|
{
|
||||||
Gradient = gradient;
|
Gradient = gradient;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
cbGradientType.Items.AddRange(Helpers.GetEnumNamesProper<LinearGradientMode>());
|
cbGradientType.Items.AddRange(Helpers.GetEnumNamesProper<LinearGradientMode>());
|
||||||
cbGradientType.SelectedIndex = (int)Gradient.Type;
|
cbGradientType.SelectedIndex = (int)Gradient.Type;
|
||||||
foreach (GradientStop gradientStop in Gradient.Colors)
|
foreach (GradientStop gradientStop in Gradient.Colors)
|
|
@ -38,7 +38,7 @@ public partial class HashCheckForm : Form
|
||||||
public HashCheckForm()
|
public HashCheckForm()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
cbHashType.Items.AddRange(Helpers.GetEnumDescriptions<HashType>());
|
cbHashType.Items.AddRange(Helpers.GetEnumDescriptions<HashType>());
|
||||||
cbHashType.SelectedIndex = (int)HashType.SHA1;
|
cbHashType.SelectedIndex = (int)HashType.SHA1;
|
||||||
|
@ -64,10 +64,13 @@ private void UpdateResult()
|
||||||
{
|
{
|
||||||
txtTarget.BackColor = Color.FromArgb(255, 200, 200);
|
txtTarget.BackColor = Color.FromArgb(255, 200, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
txtTarget.ForeColor = SystemColors.ControlText;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
txtTarget.BackColor = SystemColors.Window;
|
txtTarget.BackColor = txtResult.BackColor;
|
||||||
|
txtTarget.ForeColor = txtResult.ForeColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class InputBox : Form
|
||||||
public InputBox(string title = null, string inputText = null, string okText = null, string cancelText = null)
|
public InputBox(string title = null, string inputText = null, string okText = null, string cancelText = null)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
InputText = inputText;
|
InputText = inputText;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ public partial class MonitorTestForm : Form
|
||||||
public MonitorTestForm()
|
public MonitorTestForm()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
Rectangle screenBounds = CaptureHelpers.GetScreenBounds();
|
Rectangle screenBounds = CaptureHelpers.GetScreenBounds();
|
||||||
Location = screenBounds.Location;
|
Location = screenBounds.Location;
|
||||||
|
|
|
@ -42,8 +42,6 @@ public class MyMessageBox : Form
|
||||||
|
|
||||||
public MyMessageBox(string text, string caption, MessageBoxButtons buttons = MessageBoxButtons.OK, string checkBoxText = null, bool isChecked = false)
|
public MyMessageBox(string text, string caption, MessageBoxButtons buttons = MessageBoxButtons.OK, string checkBoxText = null, bool isChecked = false)
|
||||||
{
|
{
|
||||||
Icon = ShareXResources.Icon;
|
|
||||||
|
|
||||||
Width = 180;
|
Width = 180;
|
||||||
Height = 100;
|
Height = 100;
|
||||||
Text = caption;
|
Text = caption;
|
||||||
|
@ -148,6 +146,13 @@ public MyMessageBox(string text, string caption, MessageBoxButtons buttons = Mes
|
||||||
panel.Location = new Point(0, labelPanel.Bottom + LabelVerticalPadding);
|
panel.Location = new Point(0, labelPanel.Bottom + LabelVerticalPadding);
|
||||||
panel.Size = new Size(labelPanel.Width + (LabelHorizontalPadding * 2), button1.Height + (ButtonPadding * 2));
|
panel.Size = new Size(labelPanel.Width + (LabelHorizontalPadding * 2), button1.Height + (ButtonPadding * 2));
|
||||||
ClientSize = new Size(panel.Width, labelPanel.Height + (LabelVerticalPadding * 2) + panel.Height);
|
ClientSize = new Size(panel.Width, labelPanel.Height + (LabelVerticalPadding * 2) + panel.Height);
|
||||||
|
|
||||||
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
|
if (ShareXResources.UseDarkTheme)
|
||||||
|
{
|
||||||
|
panel.BackColor = ShareXResources.DarkBorderColor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MyMessageBox_Shown(object sender, System.EventArgs e)
|
private void MyMessageBox_Shown(object sender, System.EventArgs e)
|
||||||
|
|
|
@ -33,7 +33,8 @@ public partial class OutputBox : Form
|
||||||
public OutputBox(string text, string title)
|
public OutputBox(string text, string title)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
Text = "ShareX - " + title;
|
Text = "ShareX - " + title;
|
||||||
txtText.Text = text;
|
txtText.Text = text;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,7 @@ private void InitializeComponent()
|
||||||
//
|
//
|
||||||
// btnCancel
|
// btnCancel
|
||||||
//
|
//
|
||||||
|
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
resources.ApplyResources(this.btnCancel, "btnCancel");
|
resources.ApplyResources(this.btnCancel, "btnCancel");
|
||||||
this.btnCancel.Name = "btnCancel";
|
this.btnCancel.Name = "btnCancel";
|
||||||
this.btnCancel.UseVisualStyleBackColor = true;
|
this.btnCancel.UseVisualStyleBackColor = true;
|
|
@ -38,7 +38,8 @@ public partial class PrintForm : Form
|
||||||
public PrintForm(Image img, PrintSettings settings, bool previewOnly = false)
|
public PrintForm(Image img, PrintSettings settings, bool previewOnly = false)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
printHelper = new PrintHelper(img);
|
printHelper = new PrintHelper(img);
|
||||||
printHelper.Settings = printSettings = settings;
|
printHelper.Settings = printSettings = settings;
|
||||||
btnPrint.Enabled = !previewOnly;
|
btnPrint.Enabled = !previewOnly;
|
|
@ -202,7 +202,7 @@
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="lblMargin.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="lblMargin.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>16, 16</value>
|
<value>13, 16</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="lblMargin.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="lblMargin.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>42, 13</value>
|
<value>42, 13</value>
|
|
@ -38,7 +38,8 @@ public partial class PrintTextForm : Form
|
||||||
public PrintTextForm(string text, PrintSettings settings)
|
public PrintTextForm(string text, PrintSettings settings)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Icon = ShareXResources.Icon;
|
ShareXResources.ApplyThemeToForm(this);
|
||||||
|
|
||||||
printHelper = new PrintHelper(text);
|
printHelper = new PrintHelper(text);
|
||||||
printHelper.Settings = printSettings = settings;
|
printHelper.Settings = printSettings = settings;
|
||||||
LoadSettings();
|
LoadSettings();
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue