mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Rename BackgroundColor2 to LightBackgroundColor, added DarkBackgroundColor for thumbnail back color, merge MenuButtonCheckedColor to MenuCheckBackgroundColor
This commit is contained in:
parent
9dd729c407
commit
ee0ffd3eef
6 changed files with 28 additions and 28 deletions
|
@ -48,7 +48,7 @@ public override Color ButtonPressedHighlightBorder
|
|||
}
|
||||
public override Color ButtonCheckedHighlight
|
||||
{
|
||||
get { return ShareXResources.Theme.MenuButtonCheckedColor; }
|
||||
get { return ShareXResources.Theme.MenuCheckBackgroundColor; }
|
||||
}
|
||||
public override Color ButtonCheckedHighlightBorder
|
||||
{
|
||||
|
@ -64,15 +64,15 @@ public override Color ButtonSelectedBorder
|
|||
}
|
||||
public override Color ButtonCheckedGradientBegin
|
||||
{
|
||||
get { return ShareXResources.Theme.MenuButtonCheckedColor; }
|
||||
get { return ShareXResources.Theme.MenuCheckBackgroundColor; }
|
||||
}
|
||||
public override Color ButtonCheckedGradientMiddle
|
||||
{
|
||||
get { return ShareXResources.Theme.MenuButtonCheckedColor; }
|
||||
get { return ShareXResources.Theme.MenuCheckBackgroundColor; }
|
||||
}
|
||||
public override Color ButtonCheckedGradientEnd
|
||||
{
|
||||
get { return ShareXResources.Theme.MenuButtonCheckedColor; }
|
||||
get { return ShareXResources.Theme.MenuCheckBackgroundColor; }
|
||||
}
|
||||
public override Color ButtonSelectedGradientBegin
|
||||
{
|
||||
|
|
|
@ -117,31 +117,31 @@ private static void ApplyDarkThemeToControl(Control control)
|
|||
btn.FlatStyle = FlatStyle.Flat;
|
||||
btn.FlatAppearance.BorderColor = Theme.BorderColor;
|
||||
btn.ForeColor = Theme.TextColor;
|
||||
btn.BackColor = Theme.BackgroundColor2;
|
||||
btn.BackColor = Theme.LightBackgroundColor;
|
||||
return;
|
||||
case CheckBox cb when cb.Appearance == Appearance.Button:
|
||||
cb.FlatStyle = FlatStyle.Flat;
|
||||
cb.FlatAppearance.BorderColor = Theme.BorderColor;
|
||||
cb.ForeColor = Theme.TextColor;
|
||||
cb.BackColor = Theme.BackgroundColor2;
|
||||
cb.BackColor = Theme.LightBackgroundColor;
|
||||
return;
|
||||
case TextBox tb:
|
||||
tb.ForeColor = Theme.TextColor;
|
||||
tb.BackColor = Theme.BackgroundColor2;
|
||||
tb.BackColor = Theme.LightBackgroundColor;
|
||||
tb.BorderStyle = BorderStyle.FixedSingle;
|
||||
return;
|
||||
case ComboBox cb:
|
||||
cb.FlatStyle = FlatStyle.Flat;
|
||||
cb.ForeColor = Theme.TextColor;
|
||||
cb.BackColor = Theme.BackgroundColor2;
|
||||
cb.BackColor = Theme.LightBackgroundColor;
|
||||
return;
|
||||
case ListBox lb:
|
||||
lb.ForeColor = Theme.TextColor;
|
||||
lb.BackColor = Theme.BackgroundColor2;
|
||||
lb.BackColor = Theme.LightBackgroundColor;
|
||||
return;
|
||||
case ListView lv:
|
||||
lv.ForeColor = Theme.TextColor;
|
||||
lv.BackColor = Theme.BackgroundColor2;
|
||||
lv.BackColor = Theme.LightBackgroundColor;
|
||||
lv.SupportDarkTheme();
|
||||
return;
|
||||
case SplitContainer sc:
|
||||
|
@ -155,17 +155,17 @@ private static void ApplyDarkThemeToControl(Control control)
|
|||
pg.SelectedItemWithFocusForeColor = Theme.BackgroundColor;
|
||||
pg.SelectedItemWithFocusBackColor = Theme.TextColor;
|
||||
pg.ViewForeColor = Theme.TextColor;
|
||||
pg.ViewBackColor = Theme.BackgroundColor2;
|
||||
pg.ViewBackColor = Theme.LightBackgroundColor;
|
||||
pg.ViewBorderColor = Theme.BorderColor;
|
||||
pg.HelpForeColor = Theme.TextColor;
|
||||
pg.HelpBackColor = Theme.BackgroundColor;
|
||||
pg.HelpBorderColor = Theme.BorderColor;
|
||||
return;
|
||||
case DataGridView dgv:
|
||||
dgv.BackgroundColor = Theme.BackgroundColor2;
|
||||
dgv.BackgroundColor = Theme.LightBackgroundColor;
|
||||
dgv.GridColor = Theme.BorderColor;
|
||||
dgv.DefaultCellStyle.BackColor = Theme.BackgroundColor2;
|
||||
dgv.DefaultCellStyle.SelectionBackColor = Theme.BackgroundColor2;
|
||||
dgv.DefaultCellStyle.BackColor = Theme.LightBackgroundColor;
|
||||
dgv.DefaultCellStyle.SelectionBackColor = Theme.LightBackgroundColor;
|
||||
dgv.DefaultCellStyle.ForeColor = Theme.TextColor;
|
||||
dgv.DefaultCellStyle.SelectionForeColor = Theme.TextColor;
|
||||
dgv.ColumnHeadersDefaultCellStyle.BackColor = Theme.BackgroundColor;
|
||||
|
|
|
@ -38,7 +38,10 @@ public class ShareXTheme
|
|||
public Color BackgroundColor { get; set; }
|
||||
|
||||
[Editor(typeof(MyColorEditor), typeof(UITypeEditor)), TypeConverter(typeof(MyColorConverter))]
|
||||
public Color BackgroundColor2 { get; set; }
|
||||
public Color LightBackgroundColor { get; set; }
|
||||
|
||||
[Editor(typeof(MyColorEditor), typeof(UITypeEditor)), TypeConverter(typeof(MyColorConverter))]
|
||||
public Color DarkBackgroundColor { get; set; }
|
||||
|
||||
[Editor(typeof(MyColorEditor), typeof(UITypeEditor)), TypeConverter(typeof(MyColorConverter))]
|
||||
public Color TextColor { get; set; }
|
||||
|
@ -66,17 +69,14 @@ public class ShareXTheme
|
|||
[Editor(typeof(MyColorEditor), typeof(UITypeEditor)), TypeConverter(typeof(MyColorConverter))]
|
||||
public Color MenuBorderColor { get; set; }
|
||||
|
||||
[Editor(typeof(MyColorEditor), typeof(UITypeEditor)), TypeConverter(typeof(MyColorConverter))]
|
||||
public Color MenuButtonCheckedColor { get; set; }
|
||||
|
||||
[Editor(typeof(MyColorEditor), typeof(UITypeEditor)), TypeConverter(typeof(MyColorConverter))]
|
||||
public Color MenuCheckBackgroundColor { get; set; }
|
||||
|
||||
[Editor(typeof(MyColorEditor), typeof(UITypeEditor)), TypeConverter(typeof(MyColorConverter))]
|
||||
public Color SeparatorDarkColor { get; set; }
|
||||
public Color SeparatorLightColor { get; set; }
|
||||
|
||||
[Editor(typeof(MyColorEditor), typeof(UITypeEditor)), TypeConverter(typeof(MyColorConverter))]
|
||||
public Color SeparatorLightColor { get; set; }
|
||||
public Color SeparatorDarkColor { get; set; }
|
||||
|
||||
public ShareXTheme()
|
||||
{
|
||||
|
@ -98,7 +98,8 @@ public void ApplyDarkColors()
|
|||
{
|
||||
Name = "Dark";
|
||||
BackgroundColor = Color.FromArgb(42, 47, 56);
|
||||
BackgroundColor2 = Color.FromArgb(52, 57, 65);
|
||||
LightBackgroundColor = Color.FromArgb(52, 57, 65);
|
||||
DarkBackgroundColor = Color.FromArgb(28, 32, 38);
|
||||
TextColor = Color.FromArgb(235, 235, 235);
|
||||
BorderColor = Color.FromArgb(28, 32, 38);
|
||||
CheckerColor = Color.FromArgb(60, 60, 60);
|
||||
|
@ -107,10 +108,9 @@ public void ApplyDarkColors()
|
|||
MenuHighlightColor = Color.FromArgb(255, 30, 34, 40);
|
||||
MenuHighlightBorderColor = Color.FromArgb(255, 116, 129, 152);
|
||||
MenuBorderColor = Color.FromArgb(255, 22, 26, 31);
|
||||
MenuButtonCheckedColor = Color.FromArgb(255, 56, 64, 75);
|
||||
MenuCheckBackgroundColor = Color.FromArgb(255, 74, 83, 100);
|
||||
SeparatorDarkColor = Color.FromArgb(255, 22, 26, 31);
|
||||
MenuCheckBackgroundColor = Color.FromArgb(255, 56, 64, 75);
|
||||
SeparatorLightColor = Color.FromArgb(255, 56, 64, 75);
|
||||
SeparatorDarkColor = Color.FromArgb(255, 22, 26, 31);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
|
|
@ -59,7 +59,7 @@ public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Actio
|
|||
if (ShareXResources.ExperimentalDarkTheme)
|
||||
{
|
||||
ilvImages.BorderStyle = BorderStyle.None;
|
||||
ilvImages.Colors.BackColor = ShareXResources.Theme.BackgroundColor2;
|
||||
ilvImages.Colors.BackColor = ShareXResources.Theme.LightBackgroundColor;
|
||||
ilvImages.Colors.BorderColor = ShareXResources.Theme.BorderColor;
|
||||
ilvImages.Colors.ForeColor = ShareXResources.Theme.TextColor;
|
||||
ilvImages.Colors.SelectedForeColor = ShareXResources.Theme.TextColor;
|
||||
|
|
|
@ -206,8 +206,8 @@ public void UpdateTheme()
|
|||
if (ShareXResources.UseDarkTheme)
|
||||
{
|
||||
lblTitle.ForeColor = ShareXResources.Theme.TextColor;
|
||||
lblTitle.TextShadowColor = ShareXResources.Theme.BorderColor;
|
||||
pThumbnail.PanelColor = ShareXResources.Theme.BorderColor;
|
||||
lblTitle.TextShadowColor = ShareXResources.Theme.DarkBackgroundColor;
|
||||
pThumbnail.PanelColor = ShareXResources.Theme.DarkBackgroundColor;
|
||||
ttMain.BackColor = ShareXResources.Theme.BackgroundColor;
|
||||
ttMain.ForeColor = ShareXResources.Theme.TextColor;
|
||||
}
|
||||
|
|
|
@ -821,7 +821,7 @@ public void UpdateTheme()
|
|||
flpSocialButtons.BackColor = ShareXResources.Theme.BackgroundColor;
|
||||
btnCloseNews.FlatAppearance.BorderColor = ShareXResources.Theme.BorderColor;
|
||||
btnCloseNews.ForeColor = ShareXResources.Theme.TextColor;
|
||||
btnCloseNews.BackColor = ShareXResources.Theme.BackgroundColor2;
|
||||
btnCloseNews.BackColor = ShareXResources.Theme.LightBackgroundColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue