Browse Source

Merge branch 'dev' of http://git.kdan.cc:8865/Windows/PDFOffice_Windows_exe into dev

ZhouJieSheng 1 year ago
parent
commit
1538931f8e

BIN
PDF Office/ComPDFKit.Viewer.dll


+ 4 - 2
PDF Office/Styles/OutLineItemStyle.xaml

@@ -71,7 +71,7 @@
         <Setter Property="Background" Value="Transparent" />
         <Setter Property="HorizontalContentAlignment" Value="Center" />
         <Setter Property="VerticalContentAlignment" Value="Center" />
-        <Setter Property="Padding" Value="10,0" />
+        <Setter Property="Padding" Value="10,9" />
         <Setter Property="Foreground" Value="{StaticResource color.icon.base.neutral.norm.lv1}" />
         <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualRadius0Margin0}" />
         <Setter Property="Template">
@@ -96,10 +96,12 @@
                             BorderThickness="{TemplateBinding BorderThickness}"
                             CornerRadius="4"
                             SnapsToDevicePixels="True">
-                            <Grid>
+                            <Grid >
 
                                 <DockPanel x:Name="PART_DockPanel" LastChildFill="True">
                                     <ToggleButton
+                                        Margin="0,0,0,0"
+                                        VerticalAlignment="Top"
                                         x:Name="Expander"
                                         ClickMode="Press"
                                         IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"

+ 15 - 5
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Layout.cs

@@ -294,10 +294,16 @@ namespace PDF_Master.ViewModels.Tools
             ContextMenu popMenu = new ContextMenu();
             popMenu.FontSize = 14;
 
+            
             MenuItem menuItem = new MenuItem();
             menuItem = new MenuItem();
-            menuItem.CommandTarget = (UIElement)sender;
-            menuItem.Command = ApplicationCommands.Copy;
+            menuItem.CommandTarget = (UIElement)sender;
+            menuItem.Command = ApplicationCommands.Copy;
+            if (annotCommand.CommandTarget == TargetType.ImageSelection && PDFViewer.GetSelectImageCount() > 0)
+            {
+                menuItem.IsEnabled= true;
+            }
+           
             popMenu.Items.Add(menuItem);
 
             menuItem = new MenuItem();
@@ -312,6 +318,11 @@ namespace PDF_Master.ViewModels.Tools
                 popMenu.Items.Add(separator);
 
                 SetSelectTextOrImageMenuItem(App.MainPageLoader.GetString("ViewRightMenu_ExtractImage"), "ExportPicture", annotCommand, out menuItem);
+                if(PDFViewer.GetSelectImageCount() > 0)
+                {
+                    menuItem.IsEnabled= true;
+                }
+                
                 popMenu.Items.Add(menuItem);
             }
             else if (annotCommand.CommandTarget == TargetType.Annot)
@@ -898,9 +909,8 @@ namespace PDF_Master.ViewModels.Tools
             menuItem = new MenuItem();
             menuItem.Name = "StampExportPicture";
             menuItem.Header = "导出";
-            pop.AddItem(menuItem);
-
-    
+            pop.AddItem(menuItem);
+
             menuItem = new MenuItem();
             menuItem.Name = "StampExportPNG";
             menuItem.Header = "PNG";

+ 3 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/StickyNotePopup.xaml

@@ -8,6 +8,8 @@
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:prism="http://prismlibrary.com/"
     xmlns:viewmodels="clr-namespace:PDF_Master.ViewModels.PropertyPanel.AnnotPanel"
+    Width="240"
+    Height="200"
     d:DataContext="{d:DesignInstance Type=viewmodels:StickyNotePopupViewModel}"
     d:DesignHeight="450"
     d:DesignWidth="800"
@@ -56,7 +58,7 @@
             </Style.Triggers>
         </Style>
     </annotview:StickyPopupExt.Resources>
-    <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown" DataContext="{x:Null}">
+    <Grid DataContext="{x:Null}" MouseLeftButtonDown="Grid_MouseLeftButtonDown">
         <Border
             x:Name="border"
             Width="240"