Skip to content

Commit 4b0091a

Browse files
Tom BrewerTom Brewer
authored andcommitted
improve built in themes
1 parent 6c69c2d commit 4b0091a

File tree

2 files changed

+75
-104
lines changed

2 files changed

+75
-104
lines changed

Apollo.Components/Theme/SirenTheme.cs

Lines changed: 38 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -3,63 +3,64 @@
33
namespace Apollo.Components.Theme
44
{
55
/// <summary>
6-
/// Copied from Siren
6+
/// Siren M3 theme - modern Material 3 inspired design
77
/// </summary>
88
public class SirenTheme : EditorThemeDefinition
99
{
1010
public override string Name => "Siren";
1111

12-
public override bool HideAppIcon => false;
12+
public override bool HideAppIcon => true;
1313

1414
public override string AppIconClass => "siren-app-icon";
15-
16-
public override string AppBarStyle => (AppState?.IsDarkMode ?? true) ?
17-
"box-shadow:1px 1px 4px 0px var(--mud-palette-primary); background:linear-gradient(90deg,var(--mud-palette-appbar-background) 30%, rgba(0,0,0,0.25) 100%);" :
18-
"box-shadow:1px 1px 8px 1px var(--mud-palette-primary);background:linear-gradient(90deg, var(--mud-palette-primary) 20%, var(--mud-palette-tertiary) 70%, rgba(255,255,255,0.25) 100%);";
19-
15+
16+
public override string AppBarStyle => (AppState?.IsDarkMode ?? true) ?
17+
"background: linear-gradient(190deg, var(--mud-palette-primary) 70%, var(--mud-palette-primary-lighten));" :
18+
"background: linear-gradient(190deg, var(--mud-palette-primary) 70%, var(--mud-palette-primary-lighten));";
19+
2020
public SirenTheme()
2121
{
2222
BaseTheme = new() {
2323
PaletteLight = new PaletteLight()
2424
{
25-
Primary = SirenColors.Primary,
26-
Secondary = SirenColors.Darken,
27-
Tertiary = SirenColors.Tertiary,
28-
HoverOpacity = 0.5,
29-
Background = SirenColors.Light,
30-
AppbarBackground = "#8fd8ff",
31-
Black = SirenColors.Black,
25+
Primary = "#0085CC",
26+
PrimaryLighten = "#1AB0FF",
27+
Secondary = "#598BA6",
28+
Tertiary = "#5A22C3",
3229
Surface = "#FFFFFF",
33-
ActionDefault = SirenColors.Primary,
34-
ActionDisabled = SirenColors.ActionDisabled,
35-
TableHover = SirenColors.Tertiary,
36-
Dark = "#016a94",
37-
Divider = SirenColors.Primary,
38-
GrayDarker = "#666666"
30+
Background = "#FAFAFA",
31+
AppbarBackground = "#005380",
32+
Dark = "#E9EBED",
33+
Divider = "#0096E6",
34+
GrayDarker = "#666666",
35+
Success = "#4CAF50",
36+
Warning = "#FF9800",
37+
Error = "#F44336",
38+
Info = "#2196F3"
3939
},
4040
PaletteDark = new PaletteDark()
4141
{
42-
Primary = SirenColors.Primary,
43-
Secondary = SirenColors.Light,
44-
Tertiary = SirenColors.Primary,
45-
HoverOpacity = 0.5,
46-
TableHover = SirenColors.Dark.AppBarBackground,
47-
AppbarBackground = SirenColors.Dark.AppBarBackground,
48-
Background = SirenColors.Black,
49-
Black = SirenColors.Black,
50-
Surface = SirenColors.Black,
51-
ActionDefault = SirenColors.Primary,
52-
Dark = SirenColors.Darken,
53-
Divider = SirenColors.Primary,
54-
GrayDarker = "#222",
42+
Primary = "#00324D",
43+
PrimaryLighten = "#006499",
44+
Secondary = "#1AB0FF",
45+
Tertiary = "#4D14B8",
46+
Surface = "#0B0D0E",
47+
Background = "#121516",
48+
AppbarBackground = "#050505ff",
49+
Dark = "#273035",
50+
Divider = "#00A7FF",
51+
GrayDarker = "#1C2022",
52+
Success = "#66BB6A",
53+
Warning = "#FFA726",
54+
Error = "#EF5350",
55+
Info = "#42A5F5"
5556
},
5657
Typography = new Typography()
5758
{
5859
Default = new DefaultTypography()
5960
{
6061
FontFamily = new[] { "Tahoma", "Geneva", "Verdana", },
6162
TextTransform = "none",
62-
FontSize = "0.75",
63+
FontSize = "2",
6364
},
6465

6566
Button = new ButtonTypography()
@@ -71,58 +72,16 @@ public SirenTheme()
7172
},
7273
LayoutProperties = new LayoutProperties()
7374
{
74-
DefaultBorderRadius = "0.5em",
75-
AppbarHeight = "3rem",
75+
DefaultBorderRadius = "1.25em",
76+
AppbarHeight = "2rem",
7677
DrawerWidthLeft = "3.25em",
7778
},
78-
79+
7980
};
8081
}
8182
public static class Instance
8283
{
8384
public static SirenTheme Theme { get; set; } = new();
8485
}
8586
}
86-
87-
internal static class SirenColors
88-
{
89-
public static class Dark
90-
{
91-
//public static string Primary => "03045e";
92-
public static string Primary => "00001A";
93-
94-
public static string Secondary => "640ADB";
95-
96-
public static string Tertiary => "002538";
97-
98-
public static string AppBarBackground => "00162E";
99-
100-
//public static string AppBarBackground => "001520";
101-
102-
}
103-
104-
public static string Primary => "0077B6";
105-
106-
public static string Secondary => "170035";
107-
108-
public static string Tertiary => "AED2E5";
109-
110-
public static string Light => "caf0f8";
111-
112-
public static string Darken => "003449";
113-
114-
public static string Black => "000000";
115-
116-
public static string Action => "";
117-
118-
public static string ActionDisabled => "AED2E5";
119-
120-
public static string Hash(string s)
121-
{
122-
return $"#{s}";
123-
}
124-
}
125-
126-
12787
}
128-

Apollo.Components/Theme/StealthTheme.cs

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,58 @@
22

33
namespace Apollo.Components.Theme;
44

5+
/// <summary>
6+
/// Dark theme - modern Material 3 inspired design
7+
/// </summary>
58
public class StealthTheme : EditorThemeDefinition
69
{
7-
public override string Name => "Stealth";
8-
10+
public override string Name => "Dark";
11+
912
public override bool HideAppIcon => true;
1013

11-
public override string AppBarStyle => AppState?.IsDarkMode ?? true
12-
? base.AppBarStyle
13-
: base.AppBarStyle; //"background:linear-gradient(90deg, black 0%, whitesmoke 12%);";
14+
public override string AppBarStyle => (AppState?.IsDarkMode ?? true)
15+
? "background: linear-gradient(to right, var(--mud-palette-appbar-background) 0%, var(--mud-palette-primary-lighten) 50%, var(--mud-palette-appbar-background) 100%);"
16+
: "background: linear-gradient(to right, var(--mud-palette-primary) 0%, var(--mud-palette-primary-lighten) 20%, var(--mud-palette-background) 100%);";
1417

1518
public StealthTheme()
1619
{
1720
BaseTheme = new()
1821
{
1922
PaletteLight = new PaletteLight()
2023
{
21-
Primary = "#ecf0f1",
22-
Secondary = "#2c3e50",
23-
Success = "#10b981",
24-
Tertiary = "#999",
25-
Background = "#FAFAFA",
24+
Primary = "#666666",
25+
PrimaryLighten = "#8C8C8C",
26+
Secondary = "#808080",
27+
Tertiary = "#737373",
2628
Surface = "#FFFFFF",
27-
AppbarBackground = "#697677", //"#7b8a8b",
28-
Dark = "#DDD",
29-
GrayDarker = "#666"
29+
Background = "#FAFAFA",
30+
AppbarBackground = "#404040",
31+
AppbarText = "#FFFFFF",
32+
Dark = "#fdfafaee",
33+
Divider = "#737373",
34+
GrayDarker = "#fafafaeb",
35+
Success = "#4CAF50",
36+
Warning = "#FF9800",
37+
Error = "#F44336",
38+
Info = "#2196F3"
3039
},
3140

3241
PaletteDark = new PaletteDark()
3342
{
34-
Secondary = "#2c3e50",
35-
Primary = "#1e2121",
36-
Tertiary = "#666",
37-
Success = "#10b981",
38-
Background = "#121212",
39-
Surface = "#1E1E1E",
40-
AppbarBackground = "#1E1E1E",
41-
GrayDarker = "#111"
43+
Primary = "#262626",
44+
PrimaryLighten = "#4C4C4C",
45+
Secondary = "#8C8C8C",
46+
Tertiary = "#666666",
47+
Surface = "#0D0D0D",
48+
Background = "#141414",
49+
AppbarBackground = "#080808",
50+
Dark = "#2f2f2fff",
51+
Divider = "#808080",
52+
GrayDarker = "#1F1F1F",
53+
Success = "#66BB6A",
54+
Warning = "#FFA726",
55+
Error = "#EF5350",
56+
Info = "#42A5F5"
4257
},
4358

4459
Typography = new Typography()
@@ -47,9 +62,6 @@ public StealthTheme()
4762
{
4863
FontFamily = new[] { "Tahoma", "Geneva", "Verdana", },
4964
FontSize = "0.875rem",
50-
FontWeight = "400",
51-
LineHeight = "1.43",
52-
LetterSpacing = ".01071em",
5365
},
5466
Button = new ButtonTypography()
5567
{
@@ -74,4 +86,4 @@ public static class Instance
7486
{
7587
public static StealthTheme Theme { get; set; } = new StealthTheme();
7688
}
77-
}
89+
}

0 commit comments

Comments
 (0)