mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-26 03:59:34 +08:00
fix LiveCharts Theme
This commit is contained in:
@@ -144,6 +144,26 @@ namespace System.Application.UI
|
||||
// //};
|
||||
// Resources.MergedDictionaries[0] = (ResourceDictionary)AvaloniaXamlLoader.Load(uri_1);
|
||||
//}
|
||||
|
||||
LiveCharts.Configure(config =>
|
||||
{
|
||||
config
|
||||
// registers SkiaSharp as the library backend
|
||||
// REQUIRED unless you build your own
|
||||
.AddSkiaSharp();
|
||||
// adds the default supported types
|
||||
// OPTIONAL but highly recommend
|
||||
//.AddDefaultMappers()
|
||||
|
||||
// select a theme, default is Light
|
||||
// OPTIONAL
|
||||
//.AddDarkTheme()
|
||||
|
||||
if (value == AppTheme.Light)
|
||||
config.AddLightTheme();
|
||||
else
|
||||
config.AddDarkTheme();
|
||||
});
|
||||
}
|
||||
|
||||
public static void SetThemeAccent(string? colorHex)
|
||||
@@ -231,26 +251,6 @@ namespace System.Application.UI
|
||||
}
|
||||
MainWindow.DataContext = vmService.MainWindow;
|
||||
}, isTrace: isTrace);
|
||||
|
||||
LiveCharts.Configure(config =>
|
||||
{
|
||||
config
|
||||
// registers SkiaSharp as the library backend
|
||||
// REQUIRED unless you build your own
|
||||
.AddSkiaSharp();
|
||||
// adds the default supported types
|
||||
// OPTIONAL but highly recommend
|
||||
//.AddDefaultMappers()
|
||||
|
||||
// select a theme, default is Light
|
||||
// OPTIONAL
|
||||
//.AddDarkTheme()
|
||||
|
||||
if (Theme == AppTheme.Light)
|
||||
config.AddLightTheme();
|
||||
else
|
||||
config.AddDarkTheme();
|
||||
});
|
||||
#if WINDOWS
|
||||
InitWebView2();
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -33,11 +33,11 @@
|
||||
</controls:CarouselBanner.ItemTemplate>
|
||||
</controls:CarouselBanner>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.Advertisement,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"
|
||||
Foreground="White"
|
||||
Margin="10 5"/>
|
||||
<Button Name="CloseAdBtn"
|
||||
Background="Transparent"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"
|
||||
Foreground="White"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Cursor="Hand"
|
||||
|
||||
Reference in New Issue
Block a user