Przeglądaj źródła

Fix "Copy Base64" option in gallery item context menu

Ruben 2 miesięcy temu
rodzic
commit
e8bdf757b2

+ 6 - 1
src/PicView.Avalonia/Views/Gallery/GalleryItem.axaml

@@ -273,7 +273,12 @@
                             Width="12" />
                     </MenuItem.Icon>
                 </MenuItem>
-                <MenuItem>
+                <MenuItem
+                    Command="{CompiledBinding Tools.CopyBase64Command}"
+                    CommandParameter="{CompiledBinding Path=Text,
+                                                       ElementName=FileLocation}"
+                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
+                                                Converter={x:Static ObjectConverters.IsNotNull}}">
                     <MenuItem.Header>
                         <TextBlock>
                             <Run Text="{CompiledBinding Translation.Copy.Value, Mode=OneWay}" />