Browse Source

Change icon when changing UI visibility

Ruben 1 year ago
parent
commit
f045cc5bb1

File diff suppressed because it is too large
+ 2 - 0
src/PicView.Avalonia/PicViewTheme/Icons.axaml


File diff suppressed because it is too large
+ 8 - 0
src/PicView.Avalonia/Views/AppearanceView.axaml


+ 22 - 1
src/PicView.Avalonia/Views/MainView.axaml

@@ -247,7 +247,12 @@
 
                 <Separator />
 
-                <MenuItem Command="{CompiledBinding ToggleUICommand}" Header="{CompiledBinding GetIsShowingUITranslation, Mode=OneWay}">
+                <MenuItem
+                    Command="{CompiledBinding ToggleUICommand}"
+                    Header="{CompiledBinding GetIsShowingUITranslation,
+                                             Mode=OneWay}"
+                    IsVisible="{CompiledBinding IsUIShown,
+                                                Mode=OneWay}">
                     <MenuItem.Icon>
                         <Image
                             Height="12"
@@ -256,6 +261,20 @@
                     </MenuItem.Icon>
                 </MenuItem>
 
+                <MenuItem
+                    Command="{CompiledBinding ToggleUICommand}"
+                    Header="{CompiledBinding GetIsShowingUITranslation,
+                                             Mode=OneWay}"
+                    IsVisible="{CompiledBinding !IsUIShown,
+                                                Mode=OneWay}">
+                    <MenuItem.Icon>
+                        <Image
+                            Height="12"
+                            Source="{StaticResource EyeImage}"
+                            Width="12" />
+                    </MenuItem.Icon>
+                </MenuItem>
+
                 <MenuItem
                     Command="{CompiledBinding ChangeBackgroundCommand}"
                     Header="{CompiledBinding ChangeBackground,
@@ -744,6 +763,8 @@
             </MenuItem>
         </ContextMenu>
     </UserControl.ContextMenu>
+
+
     <Panel x:Name="MainGrid">
         <uc:SpinWaiter
             HorizontalAlignment="Center"

Some files were not shown because too many files changed in this diff