fix(UI): 优化弹出菜单位置和层级管理

修复弹出菜单在移动时位置不更新的问题,添加节流机制避免频繁刷新
使用Win32 API强制刷新弹出菜单位置并提升到最顶层
调整浮动工具栏和弹出菜单的样式和位置
移除未使用的字体样式定义
This commit is contained in:
PrefacedCorg
2026-05-02 17:06:08 +08:00
parent f825211987
commit c8e3bceab2
5 changed files with 235 additions and 28 deletions
+9 -9
View File
@@ -2363,8 +2363,8 @@
HorizontalAlignment="Right" VerticalAlignment="Center"/>
<Grid Name="FloatingbarUIForInkReplay">
<Viewbox Name="ViewboxFloatingBar" Margin="100,5,0,0" Cursor="Arrow"
HorizontalAlignment="Left" Height="58" VerticalAlignment="Top" Width="1200"
<Viewbox Name="ViewboxFloatingBar" Margin="150,250,0,0" Cursor="Arrow"
HorizontalAlignment="Left" Height="58" VerticalAlignment="Top"
UseLayoutRounding="True" SnapsToDevicePixels="True"
RenderTransformOrigin="0.5,0.5">
<Viewbox.LayoutTransform>
@@ -2990,24 +2990,24 @@
AllowsTransparency="True"
StaysOpen="True"
IsOpen="False">
<Border CornerRadius="6" Background="#F4F4F5"
BorderBrush="#3b82f6" BorderThickness="1">
<Border CornerRadius="8" Background="#F4F4F5"
BorderBrush="#3b82f6" BorderThickness="2">
<ikw:SimpleStackPanel Margin="-1">
<Grid Margin="8,8,8,5">
<Grid Margin="8,7,10,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" VerticalAlignment="Center" FontSize="12"
<TextBlock Grid.Column="0" VerticalAlignment="Center" FontSize="10"
Text="{i18n:I18n Key=Tools_MoreFeaturesTitle}"
Foreground="#2563eb" FontWeight="Bold"/>
<ui:FontIcon Grid.Column="1" Icon="{x:Static ui:SegoeFluentIcons.ChromeCloseContrast}"
Foreground="#DC2626" FontSize="12" VerticalAlignment="Center"
Foreground="#DC2626" FontSize="8" VerticalAlignment="Center"
MouseDown="Border_MouseDown"
MouseUp="CloseBordertools_MouseUp" />
</Grid>
<Border Margin="8,0,8,8" BorderBrush="#D4D4D8" Background="#fafafa" BorderThickness="1"
CornerRadius="6">
<Border Margin="6,0,6,6" BorderBrush="#D4D4D8" Background="#fafafa" BorderThickness="1"
CornerRadius="4">
<ikw:SimpleStackPanel Margin="2" Spacing="1">
<ikw:SimpleStackPanel.Resources>
<Style TargetType="Label" BasedOn="{StaticResource AutoFitToolPopupLabel8}" />