Browse Source

工具栏 - 高保真

liuaoran 2 years ago
parent
commit
47162ce870

+ 0 - 4
PDF Office/PDF Office.csproj

@@ -1236,10 +1236,6 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Styles\MenuStyle.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
     <Page Include="Styles\OutLineItemStyle.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 9 - 9
PDF Office/Styles/CustomBtnStyle.xaml

@@ -321,8 +321,9 @@
     <Style x:Key="InsideBarBtnStyle" TargetType="{x:Type Button}">
         <Setter Property="Background" Value="Transparent" />
         <Setter Property="BorderBrush" Value="Transparent" />
+        <Setter Property="Margin" Value="4,0,4,0"></Setter>
         <Setter Property="Width" Value="auto" />
-        <Setter Property="Height" Value="40" />
+        <Setter Property="Height" Value="28" />
         <Setter Property="Template">
             <Setter.Value>
                 <ControlTemplate TargetType="{x:Type Button}">
@@ -330,6 +331,7 @@
                         x:Name="border"
                         Background="{TemplateBinding Background}"
                         BorderBrush="{TemplateBinding BorderBrush}"
+                        CornerRadius="4"
                         BorderThickness="0,0,0,0"
                         SnapsToDevicePixels="true">
                         <ContentPresenter
@@ -343,18 +345,16 @@
                     </Border>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsMouseOver" Value="true">
-                            <Setter TargetName="border" Property="Background" Value="#1A000000" />
-                            <Setter TargetName="border" Property="BorderBrush" Value="gray" />
+                            <Setter TargetName="border" Property="Background"  Value="{StaticResource color.item-state.sel.bg.lv2}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" />
                         </Trigger>
                         <Trigger Property="IsPressed" Value="true">
-                            <Setter TargetName="border" Property="Background" Value="#26000000" />
-                            <Setter TargetName="border" Property="BorderBrush" Value="gray" />
+                            <Setter TargetName="border" Property="Background"  Value="{StaticResource color.item-state.sel.bg.lv2}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" />
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="false">
-                            <Setter TargetName="border" Property="Background" Value="Transparent" />
-                            <Setter TargetName="border" Property="BorderBrush" Value="#33000000" />
-                            <Setter TargetName="contentPresenter" Property="TextElement.Foreground" Value="#FF999999" />
-                            <Setter TargetName="contentPresenter" Property="Opacity" Value="0.4" />
+                            <Setter TargetName="border" Property="Background"  Value="{StaticResource color.item-state.sel.bg.lv2}" />
+                            <Setter TargetName="border" Property="BorderBrush" Value="{StaticResource color.item-state.sel.bg.lv2}" />
                         </Trigger>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>

+ 0 - 22
PDF Office/Styles/MenuStyle.xaml

@@ -1,22 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-	<Style x:Key="ToolsMenuStyle" TargetType="{x:Type MenuItem}">
-		<Setter Property="Background" Value="White"></Setter>
-		<Setter Property="Margin" Value="0,0,0,0"></Setter>
-		<Setter Property="Padding" Value="0,10,10,20"></Setter>
-		<Setter Property="Template">
-			<Setter.Value>
-				<ControlTemplate TargetType="{x:Type MenuItem}">
-					<Border Padding="17,0,17,0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
-						<ContentPresenter x:Name="ContentPresenter"  Content="{TemplateBinding Header}" Grid.Column="1" ContentSource="Header" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
-					</Border>
-					<ControlTemplate.Triggers>
-						<Trigger Property="IsMouseOver" Value="True">
-							<Setter Property="Background" Value="whitesmoke"/>
-						</Trigger>
-					</ControlTemplate.Triggers>
-				</ControlTemplate>
-			</Setter.Value>
-		</Setter>
-	</Style>
-</ResourceDictionary>

+ 1 - 0
PDF Office/Views/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterModSizeContent.xaml

@@ -11,6 +11,7 @@
              mc:Ignorable="d"
              d:DesignHeight="184"
              d:DesignWidth="466">
+    
     <Grid>
         <Grid.RowDefinitions>
             <RowDefinition   Height="108"></RowDefinition>

File diff suppressed because it is too large
+ 139 - 177
PDF Office/Views/Tools/ToolsBarContent.xaml


+ 11 - 0
PDF Office/Views/Tools/ToolsBarContent.xaml.cs

@@ -11,5 +11,16 @@ namespace PDF_Office.Views.Tools
         {
             InitializeComponent();
         }
+
+        private void SecurityButtonMore_Click(object sender, System.Windows.RoutedEventArgs e)
+        {
+            SecurityMenuMore.PlacementTarget = this.SecurityButtonMore;
+            SecurityMenuMore.IsOpen = true;
+        }
+
+        private void SecurityButtonMore_Initialized(object sender, System.EventArgs e)
+        {
+            this.SecurityButtonMore.ContextMenu = null;
+        }
     }
 }