|
14 | 14 | <Design.DataContext> |
15 | 15 | <vm:SettingPageViewModel /> |
16 | 16 | </Design.DataContext> |
| 17 | + <UserControl.Styles> |
| 18 | + <Style Selector="ComboBox.ListFontAll"> |
| 19 | + <Setter Property="ItemsSource" Value="{Binding SystemFontList}" /> |
| 20 | + </Style> |
| 21 | + <Style Selector="ComboBox.ListFontMono"> |
| 22 | + <Setter Property="ItemsSource" Value="{Binding MonoFontList}" /> |
| 23 | + </Style> |
| 24 | + </UserControl.Styles> |
17 | 25 | <TabControl> |
18 | 26 | <TabItem Header="常规设置"> |
19 | 27 | <ScrollViewer Background="{DynamicResource SemiGrey0}"> |
|
25 | 33 | <TabItem Header="外观与字体" IsSelected="True"> |
26 | 34 | <ScrollViewer Background="{DynamicResource SemiGrey0}"> |
27 | 35 | <StackPanel Margin="10" Spacing="5"> |
| 36 | + <CheckBox |
| 37 | + Margin="5,5,5,0" |
| 38 | + Command="{Binding RefreshFontIndexCommand}" |
| 39 | + Content="限制使用等宽字体" |
| 40 | + IsChecked="{Binding UseMonoFont}" /> |
| 41 | + <Separator Margin="0,10" /> |
28 | 42 | <Grid |
29 | 43 | Margin="5,0" |
30 | 44 | ColumnDefinitions="*, 250" |
|
38 | 52 | Grid.Row="0" |
39 | 53 | Grid.Column="1" |
40 | 54 | Width="250" |
41 | | - ItemsSource="{Binding SystemFontList}" |
| 55 | + Classes.ListFontAll="{Binding !UseMonoFont}" |
| 56 | + Classes.ListFontMono="{Binding UseMonoFont}" |
42 | 57 | SelectedIndex="{Binding PacketFontIndex}" |
43 | 58 | SelectedItem="{Binding PacketFontFamily, Source={x:Static services:Utils.Setting}}"> |
44 | 59 | <ComboBox.ItemTemplate> |
|
56 | 71 | Grid.Row="2" |
57 | 72 | Grid.Column="1" |
58 | 73 | Width="250" |
59 | | - ItemsSource="{Binding SystemFontList}" |
| 74 | + Classes.ListFontAll="{Binding !UseMonoFont}" |
| 75 | + Classes.ListFontMono="{Binding UseMonoFont}" |
60 | 76 | SelectedIndex="{Binding PacketHexFontIndex}" |
61 | 77 | SelectedItem="{Binding PacketHexFontFamily, Source={x:Static services:Utils.Setting}}"> |
62 | 78 | <ComboBox.ItemTemplate> |
|
74 | 90 | Grid.Row="4" |
75 | 91 | Grid.Column="1" |
76 | 92 | Width="250" |
77 | | - ItemsSource="{Binding SystemFontList}" |
| 93 | + Classes.ListFontAll="{Binding !UseMonoFont}" |
| 94 | + Classes.ListFontMono="{Binding UseMonoFont}" |
78 | 95 | SelectedIndex="{Binding PacketHeaderFontIndex}" |
79 | 96 | SelectedItem="{Binding PacketHeaderFontFamily, Source={x:Static services:Utils.Setting}}"> |
80 | 97 | <ComboBox.ItemTemplate> |
|
92 | 109 | Grid.Row="6" |
93 | 110 | Grid.Column="1" |
94 | 111 | Width="250" |
95 | | - ItemsSource="{Binding SystemFontList}" |
| 112 | + Classes.ListFontAll="{Binding !UseMonoFont}" |
| 113 | + Classes.ListFontMono="{Binding UseMonoFont}" |
96 | 114 | SelectedIndex="{Binding PacketExtraFontIndex}" |
97 | 115 | SelectedItem="{Binding PacketExtraFontFamily, Source={x:Static services:Utils.Setting}}"> |
98 | 116 | <ComboBox.ItemTemplate> |
|
0 commit comments