diff --git a/Project_Periodensystem.View/AboutPage.axaml b/Project_Periodensystem.View/AboutPage.axaml index ca2170e..f20699c 100644 --- a/Project_Periodensystem.View/AboutPage.axaml +++ b/Project_Periodensystem.View/AboutPage.axaml @@ -30,14 +30,12 @@ HorizontalAlignment="Center"> + FontSize="20" + HorizontalAlignment="Center" + Margin="0,0,0,10"/> ThemeColors { get; } = new() + + public static Dictionary ThemeColors { get; } = new() { - { AppTheme.Dark, "#5C5144" }, - { AppTheme.Light, "#E8DFD8" }, - { AppTheme.Classic, "#7B8B6F" } + { AppTheme.Dark, ("#2F2F2F", "#FFFFFF") }, // Dunkles Anthrazit & Weiß + { AppTheme.Light, ("#FFFFFF", "#000000") }, // Weiß & Schwarz + { AppTheme.Classic, ("#E8E8E8", "#000000") } // Stylisches Grau & Schwarz }; public MainWindow() @@ -28,16 +32,19 @@ namespace Project_Periodensystem.View public void ShowLandingPage() { mainContent!.Content = new LandingPage(); + UpdateTheme(AppTheme.Dark); } public void ShowPeriodicTable() { mainContent!.Content = new PeriodicTablePage(); + UpdateTheme(AppTheme.Dark); } public void ShowAboutPage() { mainContent!.Content = new AboutPage(); + UpdateTheme(AppTheme.Dark); } public void UpdateTheme(AppTheme theme) @@ -45,7 +52,17 @@ namespace Project_Periodensystem.View CurrentTheme = theme; if (mainContent?.Content is UserControl control) { - control.Background = new SolidColorBrush(Color.Parse(ThemeColors[theme])); + var (background, foreground) = ThemeColors[theme]; + control.Background = new SolidColorBrush(Color.Parse(background)); + + // Update text colors for all direct TextBlocks + foreach (var textBlock in control.GetVisualDescendants().OfType()) + { + if (textBlock.Parent is Button || textBlock.Parent.ToString().Contains("ElementTile")) + continue; + + textBlock.Foreground = new SolidColorBrush(Color.Parse(foreground)); + } } } }