Cleanup themes
This commit is contained in:
parent
30e6bdec26
commit
d005f84f69
6 changed files with 4 additions and 705 deletions
|
|
@ -1,195 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2018, John Lewin
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The views and conclusions contained in the software and documentation are those
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using static MatterHackers.MatterControl.SolarizedTheme;
|
||||
|
||||
public class AffinityTheme : IColorTheme
|
||||
{
|
||||
public AffinityTheme()
|
||||
{
|
||||
var solarized = new SolarizedColors();
|
||||
|
||||
this.Colors = new[]
|
||||
{
|
||||
solarized.Blue,
|
||||
solarized.Cyan,
|
||||
solarized.Green,
|
||||
solarized.Magenta,
|
||||
solarized.Orange,
|
||||
solarized.Red,
|
||||
solarized.Violet,
|
||||
solarized.Yellow
|
||||
};
|
||||
|
||||
this.DefaultColor = solarized.Yellow;
|
||||
this.DefaultMode = "Dark";
|
||||
|
||||
this.Modes = new[] { "Dark" };
|
||||
}
|
||||
|
||||
public Color DefaultColor { get; }
|
||||
public string DefaultMode { get; }
|
||||
public IEnumerable<Color> Colors { get; }
|
||||
public IEnumerable<string> Modes { get; }
|
||||
|
||||
public ThemeSet GetTheme(string mode, Color accentColor)
|
||||
{
|
||||
bool darkTheme = mode == "Dark";
|
||||
|
||||
var textColor = new Color("#bbb");
|
||||
|
||||
return new ThemeSet()
|
||||
{
|
||||
Theme = new ThemeConfig()
|
||||
{
|
||||
PrimaryAccentColor = accentColor,
|
||||
IsDarkTheme = darkTheme,
|
||||
Colors = new ThemeColors()
|
||||
{
|
||||
PrimaryTextColor = textColor,
|
||||
},
|
||||
PresetColors = new PresetColors()
|
||||
{
|
||||
MaterialPreset = new Color("#FF7F00"),
|
||||
QualityPreset = new Color("#FFFF00"),
|
||||
UserOverride = new Color("#445FDC96")
|
||||
},
|
||||
EditFieldColors = new ThemeConfig.ThreeStateColor()
|
||||
{
|
||||
Focused = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#ccc"),
|
||||
TextColor = new Color("#222"),
|
||||
BorderColor = new Color("#FF7F00")
|
||||
},
|
||||
Hovered = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#333333"),
|
||||
TextColor = new Color("#fff"),
|
||||
BorderColor = new Color("#FF7F00")
|
||||
},
|
||||
Inactive = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#303030"),
|
||||
TextColor = new Color("#eee"),
|
||||
BorderColor = new Color("#282828")
|
||||
}
|
||||
},
|
||||
RowBorder = new Color("#333333"),
|
||||
|
||||
DropList = new ThemeConfig.DropListStyle()
|
||||
{
|
||||
Inactive = new ThemeConfig.StateColor()
|
||||
{
|
||||
BorderColor = new Color("#282828"),
|
||||
},
|
||||
Open = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#282828"),
|
||||
TextColor = textColor,
|
||||
},
|
||||
Menu = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#333333"),
|
||||
TextColor = new Color("#eee"),
|
||||
BorderColor = new Color("#333")
|
||||
}
|
||||
},
|
||||
|
||||
SectionBackgroundColor = new Color("#404040"),
|
||||
|
||||
SlightShade = new Color("#00000028"),
|
||||
MinimalShade = new Color("#0000000F"),
|
||||
Shade = new Color("#00000078"),
|
||||
DarkShade = new Color("#000000BE"),
|
||||
|
||||
ActiveTabColor = new Color("#373737"),
|
||||
TabBarBackground = new Color("#282828"),
|
||||
|
||||
InactiveTabColor = new Color("#404040"),
|
||||
InteractionLayerOverlayColor = new Color(new Color("#373737"), 240),
|
||||
SplitterBackground = new Color("#2C2C2C"),
|
||||
TabBodyBackground = new Color("#00000000"),
|
||||
ToolbarButtonBackground = new Color("#00000000"),
|
||||
ThumbnailBackground = new Color("#00000000"),
|
||||
AccentMimimalOverlay = new Color(accentColor, 80),
|
||||
|
||||
BorderColor = new Color("#bbb"),
|
||||
BorderColor40 = new Color("#555"),
|
||||
BorderColor20 = new Color("#444"),
|
||||
|
||||
SplashAccentColor = new Color("#eee")
|
||||
},
|
||||
MenuTheme = this.DarkMenu(accentColor)
|
||||
};
|
||||
}
|
||||
|
||||
private ThemeConfig DarkMenu(Color accentColor)
|
||||
{
|
||||
var backgroundColor = new Color("#2d2f31");
|
||||
|
||||
return new ThemeConfig()
|
||||
{
|
||||
IsDarkTheme = true,
|
||||
Colors = new ThemeColors()
|
||||
{
|
||||
PrimaryTextColor = new Color("#eee"),
|
||||
SourceColor = accentColor
|
||||
},
|
||||
PresetColors = new PresetColors()
|
||||
{
|
||||
MaterialPreset = new Color("#FF7F00"),
|
||||
QualityPreset = new Color("#FFFF00"),
|
||||
UserOverride = new Color("#445FDC96")
|
||||
},
|
||||
SlightShade = new Color("#00000028"),
|
||||
MinimalShade = new Color("#0000000F"),
|
||||
Shade = new Color("#00000078"),
|
||||
DarkShade = new Color("#000000BE"),
|
||||
|
||||
ActiveTabColor = backgroundColor,
|
||||
TabBarBackground = new Color("#B1B1B1"),
|
||||
InactiveTabColor = new Color("#D0D0D0"),
|
||||
InteractionLayerOverlayColor = new Color("#D0D0D0F0"),
|
||||
SplitterBackground = new Color("#B5B5B5"),
|
||||
TabBodyBackground = new Color("#00000000"),
|
||||
ToolbarButtonBackground = new Color("#00000000"),
|
||||
ThumbnailBackground = new Color("#00000000"),
|
||||
AccentMimimalOverlay = new Color(accentColor, 80),
|
||||
BorderColor = new Color("#c8c8c8"),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,207 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2018, Lars Brubaker, John Lewin
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The views and conclusions contained in the software and documentation are those
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public class ClassicColorsTheme : IColorTheme
|
||||
{
|
||||
public ClassicColorsTheme()
|
||||
{
|
||||
this.Colors = namedColors.Values.Take(namedColors.Count / 2);
|
||||
this.DefaultColor = namedColors["Red - Dark"];
|
||||
this.DefaultMode = "Dark";
|
||||
|
||||
this.Modes = new[] { "Dark", "Light" };
|
||||
}
|
||||
|
||||
public Color DefaultColor { get; }
|
||||
public string DefaultMode { get; }
|
||||
public IEnumerable<Color> Colors { get; }
|
||||
public IEnumerable<string> Modes { get; }
|
||||
|
||||
private static Dictionary<string, Color> namedColors = new Dictionary<string, Color>()
|
||||
{
|
||||
//Dark themes
|
||||
{ "Red - Dark", new Color(172, 25, 61) },
|
||||
{ "Pink - Dark", new Color(220, 79, 173) },
|
||||
{ "Orange - Dark", new Color(255, 129, 25) },
|
||||
{ "Green - Dark", new Color(0, 138, 23) },
|
||||
{ "Blue - Dark", new Color(0, 75, 139) },
|
||||
{ "Teal - Dark", new Color(0, 130, 153) },
|
||||
{ "Light Blue - Dark", new Color(93, 178, 255) },
|
||||
{ "Purple - Dark", new Color(70, 23, 180) },
|
||||
{ "Magenta - Dark", new Color(140, 0, 149) },
|
||||
{ "Grey - Dark", new Color(88, 88, 88) },
|
||||
|
||||
//Light themes
|
||||
{ "Red - Light", new Color(172, 25, 61) },
|
||||
{ "Pink - Light", new Color(220, 79, 173) },
|
||||
{ "Orange - Light", new Color(255, 129, 25) },
|
||||
{ "Green - Light", new Color(0, 138, 23) },
|
||||
{ "Blue - Light", new Color(0, 75, 139) },
|
||||
{ "Teal - Light", new Color(0, 130, 153) },
|
||||
{ "Light Blue - Light", new Color(93, 178, 255) },
|
||||
{ "Purple - Light", new Color(70, 23, 180) },
|
||||
{ "Magenta - Light", new Color(140, 0, 149) },
|
||||
{ "Grey - Light", new Color(88, 88, 88) },
|
||||
};
|
||||
|
||||
public ThemeSet GetTheme(string mode, Color accentColor)
|
||||
{
|
||||
bool darkTheme = mode == "Dark";
|
||||
Console.WriteLine("Requesting theme for " + accentColor.Html);
|
||||
|
||||
var (colors, modifiedAccentColor) = ThemeColors.Create(accentColor, darkTheme);
|
||||
|
||||
Console.WriteLine("Generated: PrimaryAccent: " + modifiedAccentColor + " source: " + colors.SourceColor);
|
||||
|
||||
return ThemeFromColors(colors, modifiedAccentColor, darkTheme);
|
||||
}
|
||||
|
||||
public static ThemeSet ThemeFromColors(ThemeColors colors, Color accentColor, bool darkTheme)
|
||||
{
|
||||
var json = JsonConvert.SerializeObject(colors);
|
||||
|
||||
var clonedColors = JsonConvert.DeserializeObject<ThemeColors>(json);
|
||||
clonedColors.PrimaryTextColor = new Color("#222");
|
||||
|
||||
var menuTheme = BuildTheme(clonedColors, accentColor, darkTheme);
|
||||
menuTheme.ActiveTabColor = new Color("#f1f1f1");
|
||||
menuTheme.IsDarkTheme = false;
|
||||
|
||||
return new ThemeSet()
|
||||
{
|
||||
Theme = BuildTheme(colors, accentColor, darkTheme),
|
||||
MenuTheme = menuTheme
|
||||
};
|
||||
}
|
||||
|
||||
private static ThemeConfig BuildTheme(ThemeColors colors, Color accentColor, bool darkTheme)
|
||||
{
|
||||
var theme = new ThemeConfig();
|
||||
|
||||
theme.Colors = colors;
|
||||
theme.IsDarkTheme = darkTheme;
|
||||
theme.PrimaryAccentColor = accentColor;
|
||||
|
||||
theme.SlightShade = new Color(0, 0, 0, 40);
|
||||
theme.MinimalShade = new Color(0, 0, 0, 15);
|
||||
theme.Shade = new Color(0, 0, 0, 120);
|
||||
theme.DarkShade = new Color(0, 0, 0, 190);
|
||||
|
||||
theme.ActiveTabColor = theme.ResolveColor(
|
||||
new Color(darkTheme ? "#3E3E3E" : "#BEBEBE"),
|
||||
new Color(
|
||||
Color.White,
|
||||
(darkTheme) ? 3 : 25));
|
||||
theme.TabBarBackground = theme.ActiveTabColor.WithLightnessAdjustment(0.85).ToColor();
|
||||
theme.ThumbnailBackground = Color.Transparent;
|
||||
theme.AccentMimimalOverlay = new Color(accentColor, 50);
|
||||
theme.InteractionLayerOverlayColor = new Color(theme.ActiveTabColor, 240);
|
||||
theme.InactiveTabColor = theme.ResolveColor(theme.ActiveTabColor, new Color(Color.White, darkTheme ? 20 : 60));
|
||||
|
||||
theme.SplitterBackground = theme.ActiveTabColor.WithLightnessAdjustment(0.87).ToColor();
|
||||
|
||||
theme.BorderColor = new Color(darkTheme ? "#C8C8C8" : "#333");
|
||||
|
||||
theme.RowBorder = new Color(darkTheme ? "#474747" : "#A6A6A6");
|
||||
|
||||
theme.EditFieldColors = new ThemeConfig.ThreeStateColor()
|
||||
{
|
||||
Focused = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#eee"),
|
||||
TextColor = new Color("#222"),
|
||||
BorderColor = Color.Orange
|
||||
},
|
||||
Hovered = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#eee"),
|
||||
BorderColor = Color.Orange
|
||||
},
|
||||
Inactive = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#eee"),
|
||||
TextColor = new Color("#222")
|
||||
}
|
||||
};
|
||||
|
||||
theme.DropList = new ThemeConfig.DropListStyle()
|
||||
{
|
||||
Inactive = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = (darkTheme) ? new Color("#404040") : new Color("#c4c4c4"),
|
||||
TextColor = (darkTheme) ? new Color("#eee") : new Color("#222"),
|
||||
BorderColor = (darkTheme) ? new Color("#656565") : new Color("#919191")
|
||||
},
|
||||
Hovered = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = (darkTheme) ? new Color("#404040") : new Color("#aaa"),
|
||||
TextColor = (darkTheme) ? new Color("#eee") : new Color("#222"),
|
||||
BorderColor = Color.Orange
|
||||
},
|
||||
Open = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = (darkTheme) ? new Color("#8A8A8A") : new Color("#dbdbdb"),
|
||||
TextColor = (darkTheme) ? new Color("#eee") : new Color("#222"),
|
||||
},
|
||||
Focused = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = (darkTheme) ? new Color("#282828") : new Color("#aaa"),
|
||||
TextColor = (darkTheme) ? new Color("#eee") : new Color("#222"),
|
||||
BorderColor = Color.Orange
|
||||
},
|
||||
Menu = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#eee"),
|
||||
TextColor = new Color("#333"),
|
||||
BorderColor = new Color("#333")
|
||||
}
|
||||
};
|
||||
|
||||
theme.SectionBackgroundColor = new Color(darkTheme ? "#393939" : "#B9B9B9");
|
||||
|
||||
theme.SplashAccentColor = accentColor;
|
||||
|
||||
theme.BedBackgroundColor = theme.ResolveColor(theme.ActiveTabColor, new Color(Color.Black, 20));
|
||||
|
||||
theme.PresetColors = new PresetColors();
|
||||
|
||||
return theme;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,292 +0,0 @@
|
|||
/*
|
||||
Copyright (c) 2018, John Lewin
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The views and conclusions contained in the software and documentation are those
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using Agg.Image;
|
||||
|
||||
public class SolarizedTheme : IColorTheme
|
||||
{
|
||||
private SolarizedColors solarized = new SolarizedColors();
|
||||
|
||||
public SolarizedTheme()
|
||||
{
|
||||
this.Colors = new[]
|
||||
{
|
||||
solarized.Blue,
|
||||
solarized.Cyan,
|
||||
solarized.Green,
|
||||
solarized.Magenta,
|
||||
solarized.Orange,
|
||||
solarized.Red,
|
||||
solarized.Violet,
|
||||
solarized.Yellow
|
||||
};
|
||||
|
||||
this.DefaultColor = solarized.Yellow;
|
||||
this.DefaultMode = "Dark";
|
||||
|
||||
this.Modes = new[] { "Dark", "Light" };
|
||||
}
|
||||
|
||||
public Color DefaultColor { get; }
|
||||
public string DefaultMode { get; }
|
||||
public IEnumerable<Color> Colors { get; }
|
||||
public IEnumerable<string> Modes { get; }
|
||||
|
||||
public ThemeSet GetTheme(string mode, Color accentColor)
|
||||
{
|
||||
bool darkTheme = mode == "Dark";
|
||||
var baseColors = darkTheme ? solarized.Dark : solarized.Light;
|
||||
|
||||
var fieldColor = darkTheme ? baseColors.Base0 : new Color("#");
|
||||
|
||||
return new ThemeSet()
|
||||
{
|
||||
Theme = new ThemeConfig()
|
||||
{
|
||||
IsDarkTheme = darkTheme,
|
||||
PrimaryAccentColor = accentColor,
|
||||
Colors = new ThemeColors()
|
||||
{
|
||||
PrimaryTextColor = baseColors.Base0,
|
||||
SourceColor = accentColor
|
||||
},
|
||||
PresetColors = new PresetColors()
|
||||
{
|
||||
MaterialPreset = new Color("#FF7F00"),
|
||||
QualityPreset = new Color("#FFFF00"),
|
||||
UserOverride = new Color("#445FDC96")
|
||||
},
|
||||
EditFieldColors = new ThemeConfig.ThreeStateColor()
|
||||
{
|
||||
Focused = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = baseColors.Base0,
|
||||
TextColor = baseColors.Base02
|
||||
},
|
||||
Hovered = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = baseColors.Base01
|
||||
},
|
||||
Inactive = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = baseColors.Base02,
|
||||
TextColor = baseColors.Base0
|
||||
}
|
||||
},
|
||||
|
||||
DropList = new ThemeConfig.DropListStyle()
|
||||
{
|
||||
Inactive = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = baseColors.Base02,
|
||||
TextColor = baseColors.Base0
|
||||
},
|
||||
Hovered = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = baseColors.Base01
|
||||
},
|
||||
Open = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#282828"),
|
||||
TextColor = baseColors.Base0,
|
||||
},
|
||||
Focused = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = baseColors.Base0,
|
||||
TextColor = baseColors.Base02
|
||||
},
|
||||
Menu = new ThemeConfig.StateColor()
|
||||
{
|
||||
BackgroundColor = new Color("#333333"),
|
||||
TextColor = new Color("#eee"),
|
||||
BorderColor = new Color("#333")
|
||||
}
|
||||
},
|
||||
|
||||
RowBorder = darkTheme ? new Color("#00303D") : new Color("#DBD9CB"),
|
||||
SectionBackgroundColor = darkTheme ? new Color("#002630") : new Color("#F2EBDA"),
|
||||
|
||||
SlightShade = new Color("#00000028"),
|
||||
MinimalShade = new Color("#0000000F"),
|
||||
Shade = new Color("#00000078"),
|
||||
DarkShade = new Color("#000000BE"),
|
||||
|
||||
ActiveTabColor = baseColors.Base03,
|
||||
TabBarBackground = baseColors.Base03.Blend(Color.Black, darkTheme ? 0.4 : 0.1),
|
||||
//TabBarBackground = new Color(darkTheme ? "#00212B" : "#EEE8D5"),
|
||||
|
||||
InactiveTabColor = baseColors.Base02,
|
||||
InteractionLayerOverlayColor = new Color(baseColors.Base03, 240),
|
||||
SplitterBackground = baseColors.Base02,
|
||||
TabBodyBackground = new Color("#00000000"),
|
||||
ToolbarButtonBackground = new Color("#00000000"),
|
||||
ThumbnailBackground = new Color("#00000000"),
|
||||
AccentMimimalOverlay = new Color(accentColor, 80),
|
||||
BorderColor = baseColors.Base0,
|
||||
SplashAccentColor = new Color("#eee"),
|
||||
BedBackgroundColor = ThemeConfig.ResolveColor2(baseColors.Base03, new Color(Color.Black, 20))
|
||||
},
|
||||
MenuTheme = (darkTheme) ? this.DarkMenu(baseColors, accentColor) : this.LightMenu(baseColors, accentColor)
|
||||
};
|
||||
}
|
||||
|
||||
private ThemeConfig LightMenu(BaseColors baseColors, Color accentColor)
|
||||
{
|
||||
var backgroundColor = new Color("#f1f1f1");
|
||||
|
||||
return new ThemeConfig()
|
||||
{
|
||||
IsDarkTheme = false,
|
||||
PrimaryAccentColor = accentColor,
|
||||
Colors = new ThemeColors()
|
||||
{
|
||||
PrimaryTextColor = new Color("#555"),
|
||||
SourceColor = accentColor
|
||||
},
|
||||
PresetColors = new PresetColors()
|
||||
{
|
||||
MaterialPreset = new Color("#FF7F00"),
|
||||
QualityPreset = new Color("#FFFF00"),
|
||||
UserOverride = new Color("#445FDC96")
|
||||
},
|
||||
SlightShade = new Color("#00000028"),
|
||||
MinimalShade = new Color("#0000000F"),
|
||||
Shade = new Color("#00000078"),
|
||||
DarkShade = new Color("#000000BE"),
|
||||
|
||||
ActiveTabColor = backgroundColor,
|
||||
TabBarBackground = new Color("#B1B1B1"),
|
||||
InactiveTabColor = new Color("#D0D0D0"),
|
||||
InteractionLayerOverlayColor = new Color("#D0D0D0F0"),
|
||||
SplitterBackground = new Color("#B5B5B5"),
|
||||
TabBodyBackground = new Color("#00000000"),
|
||||
ToolbarButtonBackground = new Color("#00000000"),
|
||||
ThumbnailBackground = new Color("#00000000"),
|
||||
AccentMimimalOverlay = new Color(accentColor, 80),
|
||||
BorderColor = new Color("#666666"),
|
||||
};
|
||||
}
|
||||
|
||||
private ThemeConfig DarkMenu(BaseColors baseColors, Color accentColor)
|
||||
{
|
||||
var backgroundColor = new Color("#2d2f31");
|
||||
|
||||
return new ThemeConfig()
|
||||
{
|
||||
IsDarkTheme = true,
|
||||
PrimaryAccentColor = accentColor,
|
||||
Colors = new ThemeColors()
|
||||
{
|
||||
PrimaryTextColor = baseColors.Base1,
|
||||
SourceColor = accentColor
|
||||
},
|
||||
PresetColors = new PresetColors()
|
||||
{
|
||||
MaterialPreset = new Color("#FF7F00"),
|
||||
QualityPreset = new Color("#FFFF00"),
|
||||
UserOverride = new Color("#445FDC96")
|
||||
},
|
||||
SlightShade = new Color("#00000028"),
|
||||
MinimalShade = new Color("#0000000F"),
|
||||
Shade = new Color("#00000078"),
|
||||
DarkShade = new Color("#000000BE"),
|
||||
|
||||
ActiveTabColor = backgroundColor,
|
||||
TabBarBackground = new Color("#B1B1B1"),
|
||||
InactiveTabColor = new Color("#D0D0D0"),
|
||||
InteractionLayerOverlayColor = new Color("#D0D0D0F0"),
|
||||
SplitterBackground = new Color("#B5B5B5"),
|
||||
TabBodyBackground = new Color("#00000000"),
|
||||
ToolbarButtonBackground = new Color("#00000000"),
|
||||
ThumbnailBackground = new Color("#00000000"),
|
||||
AccentMimimalOverlay = new Color(accentColor, 80),
|
||||
BorderColor = new Color("#c8c8c8"),
|
||||
};
|
||||
}
|
||||
|
||||
public Color GetAdjustedAccentColor(Color accentColor, Color backgroundColor)
|
||||
{
|
||||
return ThemeColors.GetAdjustedAccentColor(accentColor, backgroundColor);
|
||||
}
|
||||
|
||||
public class SolarizedColors
|
||||
{
|
||||
public BaseColors Dark { get; } = new BaseColors()
|
||||
{
|
||||
Base03 = new Color("#002b36"),
|
||||
Base02 = new Color("#073642"),
|
||||
Base01 = new Color("#586e75"),
|
||||
Base00 = new Color("#657b83"),
|
||||
Base0 = new Color("#839496"),
|
||||
Base1 = new Color("#93a1a1"),
|
||||
Base2 = new Color("#eee8d5"),
|
||||
Base3 = new Color("#fdf6e3")
|
||||
};
|
||||
|
||||
public BaseColors Light { get; } = new BaseColors()
|
||||
{
|
||||
Base03 = new Color("#fdf6e3"),
|
||||
Base02 = new Color("#eee8d5"),
|
||||
Base01 = new Color("#93a1a1"),
|
||||
Base00 = new Color("#839496"),
|
||||
Base0 = new Color("#657b83"),
|
||||
Base1 = new Color("#586e75"),
|
||||
Base2 = new Color("#073642"),
|
||||
Base3 = new Color("#002b36")
|
||||
};
|
||||
|
||||
public Color Yellow { get; } = new Color("#b58900");
|
||||
public Color Orange { get; } = new Color("#cb4b16");
|
||||
public Color Red { get; } = new Color("#dc322f");
|
||||
public Color Magenta { get; } = new Color("#d33682");
|
||||
public Color Violet { get; } = new Color("#6c71c4");
|
||||
public Color Blue { get; } = new Color("#268bd2");
|
||||
public Color Cyan { get; } = new Color("#2aa198");
|
||||
public Color Green { get; } = new Color("#859900");
|
||||
}
|
||||
|
||||
public class BaseColors
|
||||
{
|
||||
public Color Base03 { get; set; }
|
||||
public Color Base02 { get; set; }
|
||||
public Color Base01 { get; set; }
|
||||
public Color Base00 { get; set; }
|
||||
public Color Base0 { get; set; }
|
||||
public Color Base1 { get; set; }
|
||||
public Color Base2 { get; set; }
|
||||
public Color Base3 { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -53,17 +53,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="ApplicationView\Themes\AffinityTheme.cs" />
|
||||
<Compile Remove="ApplicationView\Themes\ClassicColorsTheme.cs" />
|
||||
<Compile Remove="ApplicationView\Themes\SolarizedTheme.cs" />
|
||||
<Compile Remove="DesignTools\Primitives\HexGridObject3D.cs" />
|
||||
<Compile Remove="PrinterCommunication\Io\TrackPrinterPosition.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ApplicationView\Themes\SolarizedTheme.cs___" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MatterControl.OpenGL\MatterControl.OpenGL.csproj" />
|
||||
<ProjectReference Include="..\MatterControl.Printing\MatterControl.Printing.csproj" />
|
||||
|
|
@ -86,7 +79,7 @@
|
|||
<ProjectReference Include="..\Submodules\agg-sharp\agg\Agg.csproj" />
|
||||
<ProjectReference Include="..\Submodules\MatterSlice\MatterSliceLib\MatterSliceLib.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Markdig" Version="0.15.2" />
|
||||
<PackageReference Include="MIConvexHull" Version="1.1.17.1019" />
|
||||
|
|
@ -96,15 +89,15 @@
|
|||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
|
||||
<PackageReference Include="Zeroconf" Version="3.0.30" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="PdfSharp">
|
||||
<HintPath>PdfSharp.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue