added interface themes

This commit is contained in:
2026-08-09 00:09:47 +05:00
parent 8a19cb6a9c
commit b581d560b0
16 changed files with 607 additions and 19 deletions
+21 -15
View File
@@ -9,7 +9,9 @@
d:DataContext="{d:DesignInstance Type=vm:SettingsViewModel}"
Title="{Binding Localization[SettingsTitle]}"
Width="560" SizeToContent="Height" MaxHeight="900"
ResizeMode="CanMinimize">
ResizeMode="CanMinimize"
Background="{DynamicResource Theme.WindowBackground}"
Foreground="{DynamicResource Theme.Foreground}">
<Window.Resources>
<local:EnumToVisibilityConverter x:Key="EnumToVisibility" />
<local:ColorToBrushConverter x:Key="ColorToBrush" />
@@ -24,18 +26,7 @@
<Setter Property="Margin" Value="12,0,0,0" />
<Setter Property="MinWidth" Value="48" />
<Setter Property="TextAlignment" Value="Right" />
<Setter Property="Foreground" Value="#666" />
</Style>
<Style TargetType="GroupBox">
<Setter Property="Padding" Value="12" />
<Setter Property="Margin" Value="0,0,0,12" />
</Style>
<Style TargetType="ComboBox">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style TargetType="Slider">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="IsSnapToTickEnabled" Value="True" />
<Setter Property="Foreground" Value="{DynamicResource Theme.SecondaryForeground}" />
</Style>
</Window.Resources>
@@ -48,6 +39,11 @@
<ColumnDefinition Width="180" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Style="{StaticResource FieldLabel}"
Text="{Binding Localization[LanguageLabel]}" />
<ComboBox Grid.Column="1"
@@ -55,6 +51,15 @@
DisplayMemberPath="DisplayName"
SelectedValuePath="Code"
SelectedValue="{Binding Settings.Language}" />
<TextBlock Grid.Row="1" Margin="0,12,12,0"
Style="{StaticResource FieldLabel}"
Text="{Binding Localization[ThemeLabel]}" />
<ComboBox Grid.Row="1" Grid.Column="1" Margin="0,12,0,0"
ItemsSource="{Binding Themes}"
DisplayMemberPath="Display"
SelectedValuePath="Value"
SelectedValue="{Binding Settings.Theme}" />
</Grid>
</GroupBox>
@@ -245,7 +250,7 @@
Text="{Binding Localization[PreviewLabel]}" />
<Border Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2"
Margin="0,12,0,0" Padding="16"
Background="#F0F0F0" CornerRadius="4"
Background="{DynamicResource Theme.SurfaceStrong}" CornerRadius="4"
HorizontalAlignment="Stretch">
<Border CornerRadius="4" Padding="10,4"
HorizontalAlignment="Center"
@@ -273,7 +278,8 @@
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Style="{StaticResource FieldValue}"
Text="{Binding Settings.DurationMilliseconds, StringFormat={}{0:F0}}" />
<TextBlock Margin="4,0,0,0" Foreground="#666"
<TextBlock Margin="4,0,0,0"
Foreground="{DynamicResource Theme.SecondaryForeground}"
Text="{Binding Localization[MillisecondsSuffix]}" />
</StackPanel>
</Grid>