Skip to content

Commit c601328

Browse files
committed
Improved layout in settings view
1 parent b6a2d3a commit c601328

File tree

1 file changed

+50
-34
lines changed

1 file changed

+50
-34
lines changed

src/CodeSnip/Views/SettingsView/SettingsView.xaml

Lines changed: 50 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<mah:MetroTabItem Header="Appearance">
2222
<ScrollViewer Margin="10,0,0,0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
2323
<StackPanel>
24-
<GroupBox Header="Application theme" Margin="5">
24+
<GroupBox Header="Application theme">
2525
<GroupBox.Resources>
2626
<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource MahApps.Styles.GroupBox}"/>
2727
</GroupBox.Resources>
@@ -51,19 +51,19 @@
5151
</StackPanel>
5252
</GroupBox>
5353

54-
<GroupBox Header="Snippets TreeView fonts" Margin="5,20,5,5">
54+
<GroupBox Header="Snippets TreeView fonts" Margin="0,20,0,0">
5555
<GroupBox.Resources>
5656
<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource MahApps.Styles.GroupBox}"/>
5757
</GroupBox.Resources>
5858
<StackPanel>
59-
<TextBlock Text="Language Font Size:" Margin="0,8,0,0" />
59+
<TextBlock Text="Language Font Size:" Margin="0,5,0,0" />
6060
<mah:NumericUpDown Maximum="30" Minimum="8" NumericInputMode="Numbers" InterceptManualEnter="False"
6161
ParsingNumberStyle="Integer" TextAlignment="Center"
6262
Value="{Binding LanguageFontSize, Mode=TwoWay}" />
6363

6464
<TextBlock Text="Language Font Weight:" Margin="0,8,0,0" />
6565
<ComboBox ItemsSource="{Binding FontWeights}"
66-
SelectedItem="{Binding LanguageFontWeight, Mode=TwoWay}" />
66+
SelectedItem="{Binding LanguageFontWeight, Mode=TwoWay}" HorizontalContentAlignment="Center" />
6767

6868
<TextBlock Text="Category Font Size:" Margin="0,8,0,0" />
6969
<mah:NumericUpDown Maximum="30" Minimum="8" NumericInputMode="Numbers" InterceptManualEnter="False"
@@ -72,7 +72,7 @@
7272

7373
<TextBlock Text="Category Font Weight:" Margin="0,8,0,0" />
7474
<ComboBox ItemsSource="{Binding FontWeights}"
75-
SelectedItem="{Binding CategoryFontWeight, Mode=TwoWay}" />
75+
SelectedItem="{Binding CategoryFontWeight, Mode=TwoWay}" HorizontalContentAlignment="Center" />
7676

7777
<TextBlock Text="Snippet Font Size:" Margin="0,8,0,0" />
7878
<mah:NumericUpDown Maximum="30" Minimum="8" NumericInputMode="Numbers" InterceptManualEnter="False"
@@ -81,7 +81,7 @@
8181

8282
<TextBlock Text="Snippet Font Weight:" Margin="0,8,0,0" />
8383
<ComboBox ItemsSource="{Binding FontWeights}"
84-
SelectedItem="{Binding SnippetFontWeight, Mode=TwoWay}" />
84+
SelectedItem="{Binding SnippetFontWeight, Mode=TwoWay}" HorizontalContentAlignment="Center" />
8585
</StackPanel>
8686
</GroupBox>
8787
</StackPanel>
@@ -91,56 +91,72 @@
9191
<!-- Application settings Tab -->
9292
<mah:MetroTabItem Header="Application">
9393
<ScrollViewer Margin="10,0,0,0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
94-
<StackPanel>
95-
<CheckBox Content="Load snippets on startup" Margin="0,8,0,0"
94+
<GroupBox VerticalAlignment="Top" Header="Application settings">
95+
<GroupBox.Resources>
96+
<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource MahApps.Styles.GroupBox}"/>
97+
</GroupBox.Resources>
98+
<StackPanel>
99+
<CheckBox Content="Load snippets on startup" Margin="0,5,0,0"
96100
IsChecked="{Binding LoadOnStartup, Mode=TwoWay}" />
97-
<CheckBox Content="Enable filtering" Margin="0,8,0,0"
101+
<CheckBox Content="Enable filtering" Margin="0,8,0,0"
98102
IsChecked="{Binding EnableFiltering, Mode=TwoWay}" />
99-
<CheckBox Content="Enable notification" Margin="0,8,0,0"
103+
<CheckBox Content="Enable notification" Margin="0,8,0,0"
100104
IsChecked="{Binding IsNotificationEnabled, Mode=TwoWay}" />
101-
<CheckBox Content="Show empty languages" Margin="0,8,0,0"
105+
<CheckBox Content="Show empty languages" Margin="0,8,0,0"
102106
IsChecked="{Binding ShowEmptyLanguages, Mode=TwoWay}" />
103-
<CheckBox Content="Show empty categories" Margin="0,8,0,0"
107+
<CheckBox Content="Show empty categories" Margin="0,8,0,0"
104108
IsChecked="{Binding ShowEmptyCategories, Mode=TwoWay}" />
105-
</StackPanel>
109+
</StackPanel>
110+
</GroupBox>
106111
</ScrollViewer>
107112
</mah:MetroTabItem>
108113

109114
<!-- Editor settings Tab -->
110115
<mah:MetroTabItem Header="Editor">
111116
<ScrollViewer Margin="10,0,0,0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
112117
<StackPanel>
113-
<CheckBox Content="Convert tabs to spaces" Margin="0,8,0,0"
118+
<GroupBox Header="Editor settings">
119+
<GroupBox.Resources>
120+
<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource MahApps.Styles.GroupBox}"/>
121+
</GroupBox.Resources>
122+
<StackPanel>
123+
<CheckBox Content="Convert tabs to spaces" Margin="0,5,0,0"
114124
IsChecked="{Binding TabToSpaces, Mode=TwoWay}" />
115-
<CheckBox Content="Enable email hyperlinks" Margin="0,8,0,0"
125+
<CheckBox Content="Enable email hyperlinks" Margin="0,8,0,0"
116126
IsChecked="{Binding EmailLinks, Mode=TwoWay}" />
117-
<CheckBox Content="Enable hyperlinks" Margin="0,8,0,0"
127+
<CheckBox Content="Enable hyperlinks" Margin="0,8,0,0"
118128
IsChecked="{Binding HyperLinks, Mode=TwoWay}" />
119-
<CheckBox Content="Highlight current line" Margin="0,8,0,0"
129+
<CheckBox Content="Highlight current line" Margin="0,8,0,0"
120130
IsChecked="{Binding HighlightLine, Mode=TwoWay}" />
121-
<TextBlock Text="Indentation size:" Margin="0,8,0,0"/>
122-
<mah:NumericUpDown Maximum="10" Minimum="1" NumericInputMode="Numbers"
123-
ParsingNumberStyle="Integer" TextAlignment="Center" Width="150"
124-
Value="{Binding IntendationSize, Mode=TwoWay}" HorizontalAlignment="Left"/>
131+
<TextBlock Text="Indentation size:" Margin="0,8,0,0"/>
132+
<mah:NumericUpDown Maximum="10" Minimum="1" NumericInputMode="Numbers"
133+
ParsingNumberStyle="Integer" TextAlignment="Center"
134+
Value="{Binding IntendationSize, Mode=TwoWay}" />
125135

126-
<TextBlock Text="Font:" Margin="0,8,0,0"/>
127-
<ComboBox ItemsSource="{Binding SystemFonts}"
136+
<TextBlock Text="Font:" Margin="0,8,0,0"/>
137+
<ComboBox ItemsSource="{Binding SystemFonts}"
128138
SelectedValue="{Binding EditorFontFamily, Mode=TwoWay}"
129-
SelectedValuePath="Source"
130-
Width="150" HorizontalAlignment="Left"/>
139+
SelectedValuePath="Source" HorizontalContentAlignment="Center"/>
131140

132-
<TextBlock Text="Font size:" Margin="0,8,0,0"/>
133-
<mah:NumericUpDown Maximum="30" Minimum="8" NumericInputMode="Numbers"
134-
ParsingNumberStyle="Integer" TextAlignment="Center" Width="150"
135-
Value="{Binding EditorFontSize, Mode=TwoWay}" HorizontalAlignment="Left"/>
136-
137-
<TextBlock Text="Folding:" FontWeight="Bold" Margin="0,10,0,0"/>
138-
<CheckBox Content="Enable Brace Style Folding" Margin="0,8,0,0" ToolTip="C#,C++,Java..."
141+
<TextBlock Text="Font size:" Margin="0,8,0,0"/>
142+
<mah:NumericUpDown Maximum="30" Minimum="8" NumericInputMode="Numbers"
143+
ParsingNumberStyle="Integer" TextAlignment="Center"
144+
Value="{Binding EditorFontSize, Mode=TwoWay}" />
145+
</StackPanel>
146+
</GroupBox>
147+
<GroupBox Margin="0,20,0,0" Header="Folding">
148+
<GroupBox.Resources>
149+
<Style TargetType="{x:Type GroupBox}" BasedOn="{StaticResource MahApps.Styles.GroupBox}"/>
150+
</GroupBox.Resources>
151+
<StackPanel>
152+
<CheckBox Content="Enable Brace Style Folding" Margin="0,5,0,0" ToolTip="C#,C++,Java..."
139153
IsChecked="{Binding EnableBraceStyleFolding, Mode=TwoWay}" />
140-
<CheckBox Content="Enable Python Folding" Margin="0,8,0,0"
154+
<CheckBox Content="Enable Python Folding" Margin="0,8,0,0"
141155
IsChecked="{Binding EnablePythonFolding, Mode=TwoWay}" />
142-
<CheckBox Content="Enable XML Folding" Margin="0,8,0,0"
156+
<CheckBox Content="Enable XML Folding" Margin="0,8,0,0"
143157
IsChecked="{Binding EnableXmlFolding, Mode=TwoWay}" />
158+
</StackPanel>
159+
</GroupBox>
144160
</StackPanel>
145161
</ScrollViewer>
146162
</mah:MetroTabItem>

0 commit comments

Comments
 (0)