Skip to content

Commit 5a8bdb2

Browse files
committed
margin adjustment
1 parent 0a916af commit 5a8bdb2

File tree

1 file changed

+23
-26
lines changed

1 file changed

+23
-26
lines changed

src/CodeSnip/MainWindow.xaml

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
<mah:MetroWindow.Flyouts>
105105
<mah:FlyoutsControl x:Name="flyControl"/>
106106
</mah:MetroWindow.Flyouts>
107-
<Grid Margin="2,2,2,2">
107+
<Grid Margin="0,1,2,0">
108108
<mah:SplitView x:Name="SplitViewControl"
109109
DisplayMode="CompactInline"
110110
CompactPaneLength="0"
@@ -119,7 +119,7 @@
119119
<RowDefinition Height="*"/>
120120
<!-- Snippets expander -->
121121
</Grid.RowDefinitions>
122-
<Expander Header="Search" Grid.Row="0" Margin="0,0,2,3" IsExpanded="{Binding IsSearchExpanded, Mode=TwoWay}">
122+
<Expander Header="Search" Grid.Row="0" Margin="0,0,2,1" IsExpanded="{Binding IsSearchExpanded, Mode=TwoWay}">
123123
<Grid Margin="0,5,0,5" VerticalAlignment="Center">
124124
<Grid.ColumnDefinitions>
125125
<ColumnDefinition Width="Auto" />
@@ -155,11 +155,8 @@
155155
ItemsSource="{Binding Languages}"
156156
SelectedItemChanged="TreeView_SelectedItemChanged">
157157
<TreeView.Resources>
158-
<!-- Ikona za jezik -->
159158
<Geometry x:Key="LanguageIcon">M9,15h6m-3,3V12M14,2v6h6M14,2H6A2,2 0 0 0 4,4v16a2,2 0 0 0 2,2h12a2,2 0 0 0 2,-2V8Z</Geometry>
160-
<!-- Ikona za kategoriju -->
161159
<Geometry x:Key="CategoryIcon">M3,6h18v2H3V6zm0,5h18v2H3v-2zm0,5h18v2H3v-2z</Geometry>
162-
<!-- Ikona za snippet -->
163160
<Geometry x:Key="SnippetIcon">M5,4h14a2,2 0 0 1 2,2v12a2,2 0 0 1 -2,2H5a2,2 0 0 1 -2,-2V6a2,2 0 0 1 2,-2zm0,2v12h14V6H5zm2,2h10v2H7V8zm0,4h6v2H7v-2z</Geometry>
164161
<Style TargetType="{x:Type ScrollBar}" BasedOn="{StaticResource TreeViewScrollBar}" />
165162
</TreeView.Resources>
@@ -204,7 +201,7 @@
204201
</HierarchicalDataTemplate>
205202
</TreeView.ItemTemplate>
206203
</TreeView>
207-
<!-- Kontrole ispod TreeView-a -->
204+
<!-- Controls below the TreeView -->
208205
<Expander Header="Snippet Metadata" Grid.Row="1" Margin="0,10,0,0"
209206
IsExpanded="{Binding IsSnippetMetadataExpanded, Mode=TwoWay}">
210207
<Expander.Resources>
@@ -213,17 +210,17 @@
213210
<Grid>
214211
<Grid.RowDefinitions>
215212
<RowDefinition Height="Auto"/>
216-
<!-- Labela Description -->
213+
<!-- Description label -->
217214
<RowDefinition Height="*"/>
218-
<!-- TextBox za Description -->
215+
<!-- Description TextBox -->
219216
<RowDefinition Height="Auto"/>
220-
<!-- Labela Tag -->
217+
<!-- Tag Label -->
221218
<RowDefinition Height="Auto"/>
222-
<!-- TextBox za Tag -->
219+
<!-- Tag TextBox -->
223220
</Grid.RowDefinitions>
224221
<!-- Description label -->
225222
<TextBlock Text="Description:" Margin="0,0,0,5" Grid.Row="0" />
226-
<!-- Description TextBox koji se rasteže -->
223+
<!-- Description TextBox that stretches-->
227224
<TextBox x:Name="txtDescription" Grid.Row="1" TextWrapping="Wrap" Focusable="False"
228225
VerticalScrollBarVisibility="Auto" Height="100" IsReadOnly="True" BorderThickness="0.5"
229226
Text="{Binding SelectedSnippet.Description}" />
@@ -257,71 +254,71 @@
257254
<Path Data="{StaticResource Save}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
258255
Width="20" Height="20" Stretch="Uniform" />
259256
</Button>
260-
<Button Command="{Binding AddSnippetCommand}" Margin="5,0,0,0" ToolTip="Add snippet&#xA;Ctrl+Shift+A">
257+
<Button Command="{Binding AddSnippetCommand}" Margin="2,0,0,0" ToolTip="Add snippet&#xA;Ctrl+Shift+A">
261258
<Path Data="{StaticResource FileAdd}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
262259
Width="20" Height="20" Stretch="Uniform" />
263260
</Button>
264-
<Button Command="{Binding EditSnippetCommand}" Margin="5,0,0,0" ToolTip="Edit snippet&#xA;Ctrl+Shift+E">
261+
<Button Command="{Binding EditSnippetCommand}" Margin="2,0,0,0" ToolTip="Edit snippet&#xA;Ctrl+Shift+E">
265262
<Path Data="{StaticResource FileEdit}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
266263
Width="20" Height="20" Stretch="Uniform" />
267264
</Button>
268-
<Button Command="{Binding DeleteSnippetCommand}" Margin="5,0,0,0" ToolTip="Delete snippet&#xA;Ctrl+Shift+D">
265+
<Button Command="{Binding DeleteSnippetCommand}" Margin="2,0,0,0" ToolTip="Delete snippet&#xA;Ctrl+Shift+D">
269266
<Path Data="{StaticResource Trash}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
270267
Width="20" Height="20" Stretch="Uniform" />
271268
</Button>
272-
<Button x:Name="btnLangCat" Margin="5,0,0,0" Command="{Binding OpenLanguageCategoryCommand}"
269+
<Button x:Name="btnLangCat" Margin="2,0,0,0" Command="{Binding OpenLanguageCategoryCommand}"
273270
ToolTip="Language/Category edit&#xA;Ctrl+Shift+L"
274271
IsEnabled="{Binding IsLoadSnippetEnabled, Converter={StaticResource InverseBooleanConverter}}" >
275272
<Path Data="{StaticResource CategoryEdit}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
276273
Width="20" Height="20" Stretch="Uniform" />
277274
</Button>
278-
<Button Margin="5,0,0,0" ToolTip="Load snippets" IsEnabled="{Binding IsLoadSnippetEnabled}"
275+
<Button Margin="2,0,0,0" ToolTip="Load snippets" IsEnabled="{Binding IsLoadSnippetEnabled}"
279276
Command="{Binding LoadSnippetsDatabaseCommand}">
280277
<Path Data="{StaticResource DatabaseRefresh}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
281278
Width="20" Height="20" Stretch="Uniform" />
282279
</Button>
283280
<Separator />
284-
<Button Margin="5,0,0,0" ToolTip="Run&#xA;Ctrl+Shift+R"
281+
<Button ToolTip="Run&#xA;Ctrl+Shift+R"
285282
Command="{Binding OpenCodeRunnerViewCommand}" >
286283
<Path Data="{StaticResource DebugStart}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
287284
Width="20" Height="20" Stretch="Uniform" />
288285
</Button>
289-
<Button Margin="5,0,0,0" ToolTip="Compiler explorer settings"
286+
<Button Margin="2,0,0,0" ToolTip="Compiler explorer settings"
290287
Command="{Binding OpenCompilerSettingsCommand}">
291288
<Path Data="{StaticResource CompilerExplorer}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
292289
Width="20" Height="20" Stretch="Uniform" />
293290
</Button>
294291
<Separator />
295-
<Button Margin="5,0,0,0" Command="{Binding IncreaseFontSizeCommand}" ToolTip="Zoom +">
292+
<Button Command="{Binding IncreaseFontSizeCommand}" ToolTip="Zoom +">
296293
<Path Data="{StaticResource ZoomIn}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
297294
Width="20" Height="20" Stretch="Uniform" />
298295
</Button>
299-
<Button Margin="5,0,0,0" Command="{Binding DecreaseFontSizeCommand}" ToolTip="Zoom -">
296+
<Button Margin="2,0,0,0" Command="{Binding DecreaseFontSizeCommand}" ToolTip="Zoom -">
300297
<Path Data="{StaticResource ZoomOut}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
301298
Width="20" Height="20" Stretch="Uniform" />
302299
</Button>
303-
<Button Margin="5,0,0,0" Command="{Binding ResetFontSizeCommand}" ToolTip="Reset zoom">
300+
<Button Margin="2,0,0,0" Command="{Binding ResetFontSizeCommand}" ToolTip="Reset zoom">
304301
<Path Data="{StaticResource ZoomOutMap}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
305302
Width="20" Height="20" Stretch="Uniform" />
306303
</Button>
307-
<Button Margin="5,0,0,0" ToolTip="Search / Replace" Command="{Binding OpenSearchReplaceCommand}" >
304+
<Button Margin="2,0,0,0" ToolTip="Search / Replace" Command="{Binding OpenSearchReplaceCommand}" >
308305
<Path Data="{StaticResource TextSearch}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
309306
Width="20" Height="20" Stretch="Uniform" />
310307
</Button>
311-
<Button Margin="5,0,0,0" ToolTip="Format code" Click="FormatAll_Click">
308+
<Button Margin="2,0,0,0" ToolTip="Format code" Click="FormatAll_Click">
312309
<Path Data="{StaticResource FormatText}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
313310
Width="20" Height="20" Stretch="Uniform" />
314311
</Button>
315-
<ToggleButton Margin="5,0,0,0" ToolTip="Disable intendation" IsChecked="{Binding DisableIntendation, Mode=TwoWay}">
312+
<ToggleButton Margin="2,0,0,0" ToolTip="Disable intendation" IsChecked="{Binding DisableIntendation, Mode=TwoWay}">
316313
<Path Data="{StaticResource FormatIndentDecrease}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
317314
Width="20" Height="20" Stretch="Uniform" />
318315
</ToggleButton>
319316
<Separator />
320-
<Button Margin="5,0,0,0" ToolTip="Highlighting Editor" Command="{Binding OpenHighlightingEditorCommand}">
317+
<Button ToolTip="Highlighting Editor" Command="{Binding OpenHighlightingEditorCommand}">
321318
<Path Data="{StaticResource ColorPaletteiOS}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
322319
Width="20" Height="20" Stretch="Uniform" />
323320
</Button>
324-
<Button Margin="5,0,0,0" ToolTip="Settings&#xA;Ctrl+Shift+P" Command="{Binding OpenSettingsCommand}">
321+
<Button Margin="2,0,0,0" ToolTip="Settings&#xA;Ctrl+Shift+P" Command="{Binding OpenSettingsCommand}">
325322
<Path Data="{StaticResource GearBold}" Fill="{DynamicResource MahApps.Brushes.AccentBase}"
326323
Width="20" Height="20" Stretch="Uniform" />
327324
</Button>

0 commit comments

Comments
 (0)