Browse Source

Fix menu buttons

Ruben 4 years ago
parent
commit
70715d2b18

+ 2 - 0
PicView/ConfigureSettings/UpdateUIValues.cs

@@ -103,12 +103,14 @@ namespace PicView.ConfigureSettings
             {
                 Properties.Settings.Default.Looping = false;
                 loopcmHeader.IsChecked = false;
+                UC.GetQuickSettingsMenu.ToggleLooping.IsChecked = false;
                 ShowTooltipMessage(Application.Current.Resources["LoopingDisabled"]);
             }
             else
             {
                 Properties.Settings.Default.Looping = true;
                 loopcmHeader.IsChecked = true;
+                UC.GetQuickSettingsMenu.ToggleLooping.IsChecked = true;
                 ShowTooltipMessage(Application.Current.Resources["LoopingEnabled"]);
             }
         }

+ 22 - 25
PicView/Views/UserControls/Menus/QuickSettingsMenu.xaml

@@ -156,15 +156,12 @@
                                 TextTrimming="CharacterEllipsis"
                                 TextAlignment="Center"
                                 VerticalAlignment="Center"
-                                HorizontalAlignment="Center" />
-                            <CheckBox
-                                x:Name="SetFit"
-                                HorizontalContentAlignment="Center"
-                                Style="{StaticResource Checkstyle}">
-                                <CheckBox.Foreground>
+                                HorizontalAlignment="Center">
+                                <TextBlock.Foreground>
                                     <SolidColorBrush x:Name="SetFitFill" Color="{StaticResource MainColor}" />
-                                </CheckBox.Foreground>
-                            </CheckBox>
+                                </TextBlock.Foreground>
+                            </TextBlock>
+                            <CheckBox x:Name="SetFit" Style="{StaticResource Checkstyle}" />
                         </StackPanel>
                     </Border>
                 </Border>
@@ -174,7 +171,7 @@
                     Canvas.Left="184"
                     Canvas.Top="114"
                     Width="167"
-                    Height="51"
+                    Height="51" 
                     Background="{StaticResource BackgroundColorBrushAlt}"
                     BorderBrush="{StaticResource BorderBrush}"
                     BorderThickness="1"
@@ -194,15 +191,15 @@
                                 TextTrimming="CharacterEllipsis"
                                 TextAlignment="Center"
                                 VerticalAlignment="Center"
-                                HorizontalAlignment="Center" />
+                                HorizontalAlignment="Center">
+                                <TextBlock.Foreground>
+                                    <SolidColorBrush x:Name="ToggleFillFill" Color="{StaticResource MainColor}" />
+                                </TextBlock.Foreground>
+                            </TextBlock>
                             <CheckBox
                                 x:Name="ToggleFill"
                                 HorizontalContentAlignment="Center" 
-                                Style="{StaticResource Checkstyle}">
-                                <CheckBox.Foreground>
-                                    <SolidColorBrush x:Name="ToggleFillFill" Color="{StaticResource MainColor}" />
-                                </CheckBox.Foreground>
-                            </CheckBox>
+                                Style="{StaticResource Checkstyle}" />
                         </StackPanel>
                     </Border>
                 </Border>
@@ -232,12 +229,12 @@
                                 TextTrimming="CharacterEllipsis"
                                 TextAlignment="Center"
                                 VerticalAlignment="Center"
-                                HorizontalAlignment="Center" />
-                            <CheckBox x:Name="ToggleScroll" Style="{StaticResource Checkstyle}">
-                                <CheckBox.Foreground>
+                                HorizontalAlignment="Center">
+                                <TextBlock.Foreground>
                                     <SolidColorBrush x:Name="ToggleScrollFill" Color="{StaticResource MainColor}" />
-                                </CheckBox.Foreground>
-                            </CheckBox>
+                                </TextBlock.Foreground>
+                            </TextBlock>
+                            <CheckBox x:Name="ToggleScroll" Style="{StaticResource Checkstyle}" />
                         </StackPanel>
                     </Border>
                 </Border>
@@ -267,12 +264,12 @@
                                 TextTrimming="CharacterEllipsis"
                                 TextAlignment="Center"
                                 VerticalAlignment="Center"
-                                HorizontalAlignment="Center" />
-                            <CheckBox x:Name="ToggleLooping" Style="{StaticResource Checkstyle}">
-                                <CheckBox.Foreground>
+                                HorizontalAlignment="Center">
+                                <TextBlock.Foreground>
                                     <SolidColorBrush x:Name="ToggleLoopFill" Color="{StaticResource MainColor}" />
-                                </CheckBox.Foreground>
-                            </CheckBox>
+                                </TextBlock.Foreground>
+                            </TextBlock>
+                            <CheckBox x:Name="ToggleLooping" Style="{StaticResource Checkstyle}" />
                         </StackPanel>
                     </Border>
                 </Border>

+ 1 - 2
PicView/Views/UserControls/Menus/QuickSettingsMenu.xaml.cs

@@ -23,7 +23,7 @@ namespace PicView.Views.UserControls
 
             ToggleScroll.IsChecked = Properties.Settings.Default.ScrollEnabled;
             ToggleScroll.Click += (s, x) => ConfigureSettings.UpdateUIValues.SetScrolling(Properties.Settings.Default.ScrollEnabled);
-            ToggleScroll.MouseLeftButtonDown += (s, x) => ConfigureSettings.UpdateUIValues.SetScrolling(Properties.Settings.Default.ScrollEnabled);
+            ToggleScrollBorder.MouseLeftButtonDown += (s, x) => ConfigureSettings.UpdateUIValues.SetScrolling(Properties.Settings.Default.ScrollEnabled);
 
             ToggleFill.IsChecked = Properties.Settings.Default.FillImage;
             ToggleFill.Click += async (s, e) => await ConfigureSettings.UpdateUIValues.SetAutoFillAsync(s, e).ConfigureAwait(false);
@@ -37,7 +37,6 @@ namespace PicView.Views.UserControls
             SetFit.Click += async (s, e) => await ConfigureSettings.UpdateUIValues.SetAutoFitAsync(s, e).ConfigureAwait(false);
             SetFitBorder.MouseLeftButtonDown += async (s, e) => await ConfigureSettings.UpdateUIValues.SetAutoFitAsync(s, e).ConfigureAwait(false);
 
-
             // CropButton
             CropButton.PreviewMouseLeftButtonDown += delegate
             {