ux: layout for font size settings

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-11 11:01:02 +08:00
parent 79c1fb63d0
commit 774ec65ef6
No known key found for this signature in database
9 changed files with 39 additions and 34 deletions

View file

@ -429,7 +429,6 @@
<x:String x:Key="Text.Preference.AI.Model" xml:space="preserve">Modell</x:String> <x:String x:Key="Text.Preference.AI.Model" xml:space="preserve">Modell</x:String>
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">DARSTELLUNG</x:String> <x:String x:Key="Text.Preference.Appearance" xml:space="preserve">DARSTELLUNG</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Standardschriftart</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Standardschriftart</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Standardschriftgröße</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Monospace-Schriftart</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Monospace-Schriftart</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Verwende die Monospace-Schriftart nur im Texteditor</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Verwende die Monospace-Schriftart nur im Texteditor</x:String>
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Design</x:String> <x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Design</x:String>

View file

@ -434,8 +434,9 @@
<x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Server</x:String> <x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Server</x:String>
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APPEARANCE</x:String> <x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APPEARANCE</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Default Font</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Default Font</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Default Font Size</x:String> <x:String x:Key="Text.Preference.Appearance.FontSize" xml:space="preserve">Font Size</x:String>
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">Editor Font Size</x:String> <x:String x:Key="Text.Preference.Appearance.FontSize.Default" xml:space="preserve">Default</x:String>
<x:String x:Key="Text.Preference.Appearance.FontSize.Editor" xml:space="preserve">Editor</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Monospace Font</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Monospace Font</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Only use monospace font in text editor</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Only use monospace font in text editor</x:String>
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Theme</x:String> <x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Theme</x:String>

View file

@ -438,8 +438,6 @@
<x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Servidor</x:String> <x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Servidor</x:String>
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APARIENCIA</x:String> <x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APARIENCIA</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Fuente por defecto</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Fuente por defecto</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Tamaño de fuente por defecto</x:String>
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">Tamaño de fuente del editor</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Fuente Monospace</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Fuente Monospace</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Usar solo fuente monospace en el editor de texto</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Usar solo fuente monospace en el editor de texto</x:String>
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Tema</x:String> <x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Tema</x:String>

View file

@ -371,7 +371,6 @@
<x:String x:Key="Text.Preference" xml:space="preserve">Préférences</x:String> <x:String x:Key="Text.Preference" xml:space="preserve">Préférences</x:String>
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APPARENCE</x:String> <x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APPARENCE</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Police par défaut</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Police par défaut</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Taille de police par défaut</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Police monospace</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Police monospace</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">N'utiliser que des polices monospace pour l'éditeur de texte</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">N'utiliser que des polices monospace pour l'éditeur de texte</x:String>
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Thème</x:String> <x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Thème</x:String>

View file

@ -460,8 +460,6 @@
<x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Servidor</x:String> <x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Servidor</x:String>
<x:String x:Key="Text.Preference.AI" xml:space="preserve">INTELIGÊNCIA ARTIFICIAL</x:String> <x:String x:Key="Text.Preference.AI" xml:space="preserve">INTELIGÊNCIA ARTIFICIAL</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Fonte Padrão</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Fonte Padrão</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Tamanho da fonte padrão</x:String>
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">Tamanho da fonte do editor</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Fonte Monoespaçada</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Fonte Monoespaçada</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Usar fonte monoespaçada apenas no editor de texto</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Usar fonte monoespaçada apenas no editor de texto</x:String>
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Tema</x:String> <x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Tema</x:String>

View file

@ -438,8 +438,6 @@
<x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Сервер</x:String> <x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Сервер</x:String>
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">ВИД</x:String> <x:String x:Key="Text.Preference.Appearance" xml:space="preserve">ВИД</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Шрифт по-умолчанию</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Шрифт по-умолчанию</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Размер шрифта по-умолчанию</x:String>
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">Размер шрифта редактора</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Моноширный шрифт</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Моноширный шрифт</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">В текстовом редакторе используется только моноширный шрифт</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">В текстовом редакторе используется только моноширный шрифт</x:String>
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Тема</x:String> <x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Тема</x:String>

View file

@ -437,7 +437,9 @@
<x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">服务地址</x:String> <x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">服务地址</x:String>
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">外观配置</x:String> <x:String x:Key="Text.Preference.Appearance" xml:space="preserve">外观配置</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">缺省字体</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">缺省字体</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">默认字体大小</x:String> <x:String x:Key="Text.Preference.Appearance.FontSize" xml:space="preserve">字体大小</x:String>
<x:String x:Key="Text.Preference.Appearance.FontSize.Default" xml:space="preserve">默认</x:String>
<x:String x:Key="Text.Preference.Appearance.FontSize.Editor" xml:space="preserve">代码编辑器</x:String>
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">代码字体大小</x:String> <x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">代码字体大小</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">等宽字体</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">等宽字体</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">仅在文本编辑器中使用等宽字体</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">仅在文本编辑器中使用等宽字体</x:String>

View file

@ -437,8 +437,9 @@
<x:String x:Key="Text.Preference.AI.GenerateSubjectPrompt" xml:space="preserve">產生提交訊息提示詞</x:String> <x:String x:Key="Text.Preference.AI.GenerateSubjectPrompt" xml:space="preserve">產生提交訊息提示詞</x:String>
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">外觀設定</x:String> <x:String x:Key="Text.Preference.Appearance" xml:space="preserve">外觀設定</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">預設字型</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">預設字型</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">預設字型大小</x:String> <x:String x:Key="Text.Preference.Appearance.FontSize" xml:space="preserve">字型大小</x:String>
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">程式碼字型大小</x:String> <x:String x:Key="Text.Preference.Appearance.FontSize.Default" xml:space="preserve">預設</x:String>
<x:String x:Key="Text.Preference.Appearance.FontSize.Editor" xml:space="preserve">程式碼</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">等寬字型</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">等寬字型</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">僅在文字編輯器中使用等寬字型</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">僅在文字編輯器中使用等寬字型</x:String>
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">佈景主題</x:String> <x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">佈景主題</x:String>

View file

@ -121,7 +121,7 @@
<TabItem.Header> <TabItem.Header>
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Appearance}"/> <TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Appearance}"/>
</TabItem.Header> </TabItem.Header>
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*"> <Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
<TextBlock Grid.Row="0" Grid.Column="0" <TextBlock Grid.Row="0" Grid.Column="0"
Text="{DynamicResource Text.Preference.Appearance.Theme}" Text="{DynamicResource Text.Preference.Appearance.Theme}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
@ -158,34 +158,43 @@
Text="{Binding MonospaceFontFamily, Mode=TwoWay}"/> Text="{Binding MonospaceFontFamily, Mode=TwoWay}"/>
<TextBlock Grid.Row="3" Grid.Column="0" <TextBlock Grid.Row="3" Grid.Column="0"
Text="{DynamicResource Text.Preference.Appearance.DefaultFontSize}" Text="{DynamicResource Text.Preference.Appearance.FontSize}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,16,0"/> Margin="0,0,16,0"/>
<NumericUpDown Grid.Row="3" Grid.Column="1" <Grid Grid.Row="3" Grid.Column="1" ColumnDefinitions="*,8,*">
<NumericUpDown Grid.Column="0"
Minimum="10" Maximum="18" Increment="0.5" Minimum="10" Maximum="18" Increment="0.5"
Height="28" Height="28"
Padding="4" Padding="4"
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
CornerRadius="3" CornerRadius="3"
Value="{Binding DefaultFontSize, Mode=TwoWay}"/> Value="{Binding DefaultFontSize, Mode=TwoWay}">
<NumericUpDown.InnerLeftContent>
<Border BorderThickness="0,0,1,0" BorderBrush="{DynamicResource Brush.Border1}">
<TextBlock Margin="4,0" Text="{DynamicResource Text.Preference.Appearance.FontSize.Default}"/>
</Border>
</NumericUpDown.InnerLeftContent>
</NumericUpDown>
<NumericUpDown Grid.Column="2"
Minimum="10" Maximum="18" Increment="0.5"
Height="28"
Padding="4"
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
CornerRadius="3"
Value="{Binding EditorFontSize, Mode=TwoWay}">
<NumericUpDown.InnerLeftContent>
<Border BorderThickness="0,0,1,0" BorderBrush="{DynamicResource Brush.Border1}">
<TextBlock Margin="4,0" Text="{DynamicResource Text.Preference.Appearance.FontSize.Editor}"/>
</Border>
</NumericUpDown.InnerLeftContent>
</NumericUpDown>
</Grid>
<TextBlock Grid.Row="4" Grid.Column="0" <TextBlock Grid.Row="4" Grid.Column="0"
Text="{DynamicResource Text.Preference.Appearance.EditorFontSize}"
HorizontalAlignment="Right"
Margin="0,0,16,0"/>
<NumericUpDown Grid.Row="4" Grid.Column="1"
Minimum="10" Maximum="18" Increment="0.5"
Height="28"
Padding="4"
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
CornerRadius="3"
Value="{Binding EditorFontSize, Mode=TwoWay}"/>
<TextBlock Grid.Row="5" Grid.Column="0"
Text="{DynamicResource Text.Preference.Appearance.ThemeOverrides}" Text="{DynamicResource Text.Preference.Appearance.ThemeOverrides}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,16,0"/> Margin="0,0,16,0"/>
<TextBox Grid.Row="5" Grid.Column="1" <TextBox Grid.Row="4" Grid.Column="1"
Height="28" Height="28"
CornerRadius="3" CornerRadius="3"
Text="{Binding ThemeOverrides, Mode=TwoWay}"> Text="{Binding ThemeOverrides, Mode=TwoWay}">
@ -196,16 +205,16 @@
</TextBox.InnerRightContent> </TextBox.InnerRightContent>
</TextBox> </TextBox>
<CheckBox Grid.Row="6" Grid.Column="1" <CheckBox Grid.Row="5" Grid.Column="1"
Content="{DynamicResource Text.Preference.Appearance.OnlyUseMonoFontInEditor}" Content="{DynamicResource Text.Preference.Appearance.OnlyUseMonoFontInEditor}"
IsChecked="{Binding OnlyUseMonoFontInEditor, Mode=TwoWay}"/> IsChecked="{Binding OnlyUseMonoFontInEditor, Mode=TwoWay}"/>
<CheckBox Grid.Row="7" Grid.Column="1" <CheckBox Grid.Row="6" Grid.Column="1"
Height="32" Height="32"
Content="{DynamicResource Text.Preference.Appearance.UseFixedTabWidth}" Content="{DynamicResource Text.Preference.Appearance.UseFixedTabWidth}"
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseFixedTabWidth, Mode=TwoWay}"/> IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseFixedTabWidth, Mode=TwoWay}"/>
<CheckBox Grid.Row="8" Grid.Column="1" <CheckBox Grid.Row="7" Grid.Column="1"
Height="32" Height="32"
Content="{DynamicResource Text.Preference.Appearance.UseNativeWindowFrame}" Content="{DynamicResource Text.Preference.Appearance.UseNativeWindowFrame}"
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSystemWindowFrame, Mode=OneTime}" IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSystemWindowFrame, Mode=OneTime}"