Skip to content

Commit

Permalink
Improve light theme further and make System default
Browse files Browse the repository at this point in the history
- Primary color is the same on all themes which means app bar matches status bar again
- All text in the title and header is now white for contrast
- Background is off-white to make it less blinding
  • Loading branch information
danielchalmers committed Jan 24, 2024
1 parent 40645b0 commit 8d382a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 5 additions & 3 deletions JournalApp/Components/Pages/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
{
Palette = new PaletteLight()
{
Primary = "#978dec",
PrimaryLighten = "#b6aff2",
Primary = "#776be7",
PrimaryLighten = "#978dec",
Background = "#f7f6fb",
TextDisabled = "#424242",
},
PaletteDark = new PaletteDark()
{
Primary = "#776be7",
TextDisabled = "#ffffffb2",
},
LayoutProperties = new() { AppbarHeight = "4em" },
Expand All @@ -43,7 +45,7 @@
base.OnInitialized();

AppThemeService.ThemeChanged += OnThemeChanged;
if (Enum.TryParse<AppTheme>(Preferences.Get("theme", "Dark"), out var parsed))
if (Enum.TryParse<AppTheme>(Preferences.Get("theme", "Unspecified"), out var parsed))
AppThemeService.SelectedAppTheme = parsed;

App.NewIntent += OnNewIntent;
Expand Down
10 changes: 9 additions & 1 deletion JournalApp/wwwroot/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,16 @@ button {
flex-direction: row;
align-items: center;
gap: 0.5em;
padding: 0;
box-shadow: none;
min-height: calc(var(--mud-appbar-height) - var(--mud-appbar-height) / 4);
background-color: var(--mud-palette-primary);
padding: 0;
}

.page-header * {
color: var(--mud-palette-appbar-text);
}

.mud-dialog-title, .page-title {
z-index: 999;
display: flex;
Expand All @@ -65,6 +69,10 @@ button {
background-color: var(--mud-palette-primary-lighten);
}

.mud-dialog-title, .page-title * {
color: var(--mud-palette-appbar-text);
}

.mud-dialog-content, .page-body {
max-width: 960px;
margin: 0 auto !important;
Expand Down

0 comments on commit 8d382a0

Please sign in to comment.