Browse Source

偏好设置-修复取色板显示不全的问题

ZhouJieSheng 1 year ago
parent
commit
65cf17353e

+ 3 - 2
PDF Office/CustomControl/ColorDropBox.xaml.cs

@@ -128,12 +128,13 @@ namespace PDF_Master.CustomControl
                 colorPop.Visibility = Visibility.Visible;
                 colorPop.Measure(new Size(parentWnd.ActualWidth, parentWnd.ActualHeight));
                 colorPop.SetValue(Canvas.TopProperty, offset.Y + this.ActualHeight + 2);
-
                 if (offset.X + colorPop.DesiredSize.Width + SystemParameters.ResizeFrameVerticalBorderWidth * 2 > parentWnd.ActualWidth)
                 {
                     colorPop.SetValue(Canvas.LeftProperty, parentWnd.ActualWidth - colorPop.DesiredSize.Width - 5 - SystemParameters.ResizeFrameVerticalBorderWidth * 2);
                 }
-                else if(offset.Y+ colorPop.DesiredSize.Height+SystemParameters.ResizeFrameVerticalBorderWidth * 2 > parentWnd.ActualHeight)
+          
+                //因为第一次计算弹窗高度时,会有偏差(加载未完成),暂时固定当作209来计算
+                else if(offset.Y+ 209+SystemParameters.ResizeFrameVerticalBorderWidth * 2 > parentWnd.ActualHeight)
                 {
                     //超出窗体高度时 重新计算定位
                     colorPop.SetValue(Canvas.TopProperty, parentWnd.ActualHeight - 260);

+ 2 - 2
PDF Office/Styles/ButtonStyle.xaml

@@ -620,7 +620,7 @@
         BasedOn="{StaticResource Btn.cta}"
         TargetType="{x:Type Button}">
         <Setter Property="Template" Value="{StaticResource ButtonControlTemplateWithCorner4}" />
-        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Background" Value="White" />
         <Setter Property="Foreground" Value="{StaticResource color.icon.base.neutral.norm.lv1}" />
         <Setter Property="BorderBrush" Value="{StaticResource color.field.border.norm}" />
         <Setter Property="BorderThickness" Value="1" />
@@ -628,7 +628,7 @@
         <Setter Property="Height" Value="24" />
         <Style.Triggers>
             <Trigger Property="IsDefaulted" Value="true">
-                <Setter Property="Background" Value="Transparent" />
+                <Setter Property="Background" Value="White" />
             </Trigger>
             <Trigger Property="IsMouseOver" Value="true">
                 <Setter Property="Background" Value="{StaticResource color.item-state.hov.bg}" />