From 9b2e6f2071e9a016f0b7bfb3f8d195aa2a7f826e Mon Sep 17 00:00:00 2001
From: Michael Krisper <michael.krisper@tugraz.at>
Date: Thu, 2 Sep 2021 11:47:50 +0200
Subject: [PATCH] changed default button style

---
 VECTO3GUI2020/MainWindow.xaml                 |  2 +-
 .../Resources/Styles/ButtonStyles.xaml        |  3 ++-
 .../Implementation/MainWindowViewModel.cs     | 24 +++----------------
 .../Views/Multistage/MultiStageView.xaml      | 16 ++++---------
 .../Multistage/NewMultistageFileView.xaml     |  3 +--
 5 files changed, 11 insertions(+), 37 deletions(-)

diff --git a/VECTO3GUI2020/MainWindow.xaml b/VECTO3GUI2020/MainWindow.xaml
index cf03eac8e3..b53002f38c 100644
--- a/VECTO3GUI2020/MainWindow.xaml
+++ b/VECTO3GUI2020/MainWindow.xaml
@@ -116,7 +116,7 @@
                     </Button>
                 </Border>
             </UniformGrid>
-            <Border DockPanel.Dock="Top" BorderBrush="{DynamicResource AccentColorButton}" BorderThickness="3" VerticalAlignment="Stretch">
+            <Border DockPanel.Dock="Top" BorderBrush="{DynamicResource AccentColorButton}" BorderThickness="0 1 0 0" VerticalAlignment="Stretch">
                 <ContentControl Content="{Binding CurrentViewModel}"></ContentControl>
             </Border>
         </DockPanel>
diff --git a/VECTO3GUI2020/Resources/Styles/ButtonStyles.xaml b/VECTO3GUI2020/Resources/Styles/ButtonStyles.xaml
index b5b95eb545..04a17539e0 100644
--- a/VECTO3GUI2020/Resources/Styles/ButtonStyles.xaml
+++ b/VECTO3GUI2020/Resources/Styles/ButtonStyles.xaml
@@ -14,10 +14,11 @@
         <Setter Property="HorizontalContentAlignment" Value="Center"/>
         <Setter Property="VerticalContentAlignment" Value="Center"/>
         <Setter Property="Padding" Value="1"/>
+        <Setter Property="Margin" Value="4"/>
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
-                    <Border x:Name="border" BorderBrush="{DynamicResource AccentColorButton}" BorderThickness="0,0,0,1" Background="White" SnapsToDevicePixels="true" Width="Auto" Height="30">
+                    <Border x:Name="border" BorderBrush="{DynamicResource AccentColorButton}" BorderThickness="1,1,1,1" Background="White" SnapsToDevicePixels="true" Width="Auto" Height="30">
                         <VisualStateManager.VisualStateGroups>
                             <VisualStateGroup x:Name="CommonStates">
                                 <VisualStateGroup.Transitions>
diff --git a/VECTO3GUI2020/ViewModel/Implementation/MainWindowViewModel.cs b/VECTO3GUI2020/ViewModel/Implementation/MainWindowViewModel.cs
index a9ba9f4948..9d35d979eb 100644
--- a/VECTO3GUI2020/ViewModel/Implementation/MainWindowViewModel.cs
+++ b/VECTO3GUI2020/ViewModel/Implementation/MainWindowViewModel.cs
@@ -48,29 +48,11 @@ namespace VECTO3GUI2020.ViewModel.Implementation
 			CurrentViewModel = _viewModels[key];
 		}
 
-		public bool JobsSelected
-		{
-			get
-			{
-				return CurrentViewModel == _jobListVm;
-			}
-		}
+		public bool JobsSelected => CurrentViewModel == _jobListVm;
 
-		public bool SettingsSelected
-		{
-			get
-			{ 
-				return CurrentViewModel == _settingsViewModel;
-			}
-		}
+		public bool SettingsSelected => CurrentViewModel == _settingsViewModel;
 
-		public bool AboutSelected
-		{
-			get
-			{
-				return CurrentViewModel == _aboutViewModel;
-			}
-		}
+		public bool AboutSelected => CurrentViewModel == _aboutViewModel;
 
 		public IMainViewModel CurrentViewModel
         {
diff --git a/VECTO3GUI2020/Views/Multistage/MultiStageView.xaml b/VECTO3GUI2020/Views/Multistage/MultiStageView.xaml
index 46ff212b1a..7a337ab3fd 100644
--- a/VECTO3GUI2020/Views/Multistage/MultiStageView.xaml
+++ b/VECTO3GUI2020/Views/Multistage/MultiStageView.xaml
@@ -21,28 +21,20 @@
                         Width="100"
                         Command="{Binding CloseWindowCommand}" 
                         CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"
-                        Style="{DynamicResource MultiStageButtonStyle1}"
-                        Margin="4"
-                        Padding="4">Close</Button>
+                        Style="{DynamicResource MultiStageButtonStyle1}">Close</Button>
                     <Button DockPanel.Dock="Right"
                             Width="100"
                             Command="{Binding SaveVIFCommand}"
-                            Style="{DynamicResource MultiStageButtonStyle1}"
-                            Margin="4"
-                            Padding="4">Save as new VIF</Button>
+                            Style="{DynamicResource MultiStageButtonStyle1}">Save as new VIF</Button>
                     <Button 
                         DockPanel.Dock="Right" 
-                        Width="100"  
+                        Width="100"
                         Style="{DynamicResource MultiStageButtonStyle1}" 
-                        Margin="4" 
-                        Padding="4" 
                         Command="{Binding ManufacturingStageViewModel.SaveInputDataCommand}">Save Input</Button>
                     <Button 
                         DockPanel.Dock="Right" 
-                        Width="100"  
+                        Width="100"
                         Style="{DynamicResource MultiStageButtonStyle1}" 
-                        Margin="4" 
-                        Padding="4" 
                         Command="{Binding ManufacturingStageViewModel.SaveInputDataAsCommand}">Save Input As ... </Button>
                 </DockPanel>
             </Border>
diff --git a/VECTO3GUI2020/Views/Multistage/NewMultistageFileView.xaml b/VECTO3GUI2020/Views/Multistage/NewMultistageFileView.xaml
index b8e27af00a..c199a09aca 100644
--- a/VECTO3GUI2020/Views/Multistage/NewMultistageFileView.xaml
+++ b/VECTO3GUI2020/Views/Multistage/NewMultistageFileView.xaml
@@ -14,8 +14,7 @@
                 <Grid DockPanel.Dock="Top">
                     <customControls:FilePicker x:Name="NewMultistageFilePicker" Grid.Row="0" Text="{Binding VifPath}" HorizontalAlignment="Stretch" Command="{Binding AddVifFileCommand}"/>
                 </Grid>
-                <Button Style="{DynamicResource MultiStageButtonStyle1}" 
-                        Margin="4"  DockPanel.Dock="Bottom" 
+                <Button Style="{DynamicResource MultiStageButtonStyle1}" DockPanel.Dock="Bottom" 
                         Visibility="{Binding MultiStageJobViewModel, Converter={StaticResource NullToVisibilityConverter}, ConverterParameter=invert}"
                         Command="{Binding CloseWindow}" 
                         CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}">
-- 
GitLab