This commit is contained in:
2509_92447106 committed 2026-11-07 20:18:34 +08:00
1 parent 639ff1ba57
commit e4ea4f054e
4 files changed
+46 -17

No files matched your search

@@ -252,28 +252,40 @@
<Setter Property="FontSize" Value="12.5" />
</Style>
<!-- 自建标题栏按钮 -->
<!--
自建标题栏按钮只做背景/前景色渐变,不参与全局的 scale 动画:
titlebtn 用优先级更高的选择器把 RenderTransform 固定为恒等变换,
并清空 Transitions 里的 TransformOperationsTransition,彻底避开
hover 时 RenderTransform 类型/过渡器不匹配导致的渲染异常。
-->
<Style Selector="Button.titlebtn">
<Setter Property="Width" Value="38" />
<Setter Property="Height" Value="30" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="#A9B8D4" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="FontSize" Value="13" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="CornerRadius" Value="7" />
<Setter Property="Margin" Value="2,0" />
<Setter Property="RenderTransform" Value="scale(1)" />
<Setter Property="Transitions">
<Transitions>
<DoubleTransition Property="Opacity" Duration="0:0:0.12" />
<BrushTransition Property="Background" Duration="0:0:0.12" />
<BrushTransition Property="Foreground" Duration="0:0:0.12" />
</Transitions>
</Setter>
</Style>
<Style Selector="Button.titlebtn:pointerover">
<Setter Property="Background" Value="#223252" />
<Setter Property="Foreground" Value="#FFFFFF" />
<Setter Property="RenderTransform" Value="scale(1)" />
</Style>
<Style Selector="Button.titlebtn:pressed">
<Setter Property="RenderTransform" Value="scale(1)" />
</Style>
<Style Selector="Button.titlebtn.close:pointerover">
<Setter Property="Background" Value="#D64545" />
@@ -5,16 +5,18 @@
Title="{loc:Loc app.name}"
Width="1220" Height="800"
MinWidth="1040" MinHeight="700"
Background="#0A1120"
TransparencyLevelHint="None"
Background="Transparent"
TransparencyLevelHint="Transparent"
SystemDecorations="None"
WindowStartupLocation="CenterScreen">
<!-- 禁用系统标题栏,改用自建标题栏;外层圆角容器让整个窗口四角变圆。
用深色不透明底,避免透明/亚克力在无边框窗口下露出系统白边。 -->
<!-- 禁用系统标题栏,改用自建标题栏。
窗口本身透明(四角露出桌面 => 圆角可见),内容 Border 自己不透明并
用 CornerRadius + ClipToBounds 裁出圆角;AcrylicBlur 会引入系统白色,
所以这里用纯 Transparent 避免白边。 -->
<Border CornerRadius="16" ClipToBounds="True"
Background="{DynamicResource AppBg}"
BorderBrush="#0A1120" BorderThickness="1"
BorderBrush="#1B2740" BorderThickness="1"
BoxShadow="0 18 50 0 #400A1226">
<Grid RowDefinitions="44,*">
<!-- 自建标题栏 -->