|
12 | 12 | </Border> |
13 | 13 | </Design.PreviewWith> |
14 | 14 |
|
| 15 | + <StreamGeometry x:Key="CheckBoxIndeterminatePathData">M3.997 13H20a1 1 0 1 0 0-2H3.997a1 1 0 1 0 0 2Z</StreamGeometry> |
15 | 16 | <StreamGeometry x:Key="CheckMarkPathData">M5.5 10.586 1.707 6.793A1 1 0 0 0 .293 8.207l4.5 4.5a1 1 0 0 0 1.414 0l11-11A1 1 0 0 0 15.793.293L5.5 10.586Z</StreamGeometry> |
16 | 17 | <x:Double x:Key="CheckBoxMinHeight">32</x:Double> |
17 | 18 | <!-- WinUI forces MinWidth=120, which breaks desktop form layouts (and v1 never had it). |
18 | 19 | Deliberately 0 here; override this resource to restore the WinUI metric. --> |
19 | 20 | <x:Double x:Key="CheckBoxMinWidth">0</x:Double> |
| 21 | + <x:Double x:Key="CheckBoxSize">20</x:Double> |
| 22 | + <x:Double x:Key="CheckBoxGlyphSize">12</x:Double> |
20 | 23 |
|
21 | 24 | <!-- WinUI reference: CheckBox_themeresources.xaml (DefaultCheckBoxStyle), tag winui3/release/1.5.2 --> |
22 | 25 | <ControlTheme x:Key="{x:Type CheckBox}" TargetType="CheckBox"> |
|
50 | 53 | BorderThickness="{DynamicResource CheckBoxBorderThemeThickness}" |
51 | 54 | CornerRadius="{TemplateBinding CornerRadius}" |
52 | 55 | UseLayoutRounding="False" |
53 | | - Height="20" |
54 | | - Width="20" /> |
| 56 | + Height="{DynamicResource CheckBoxSize}" |
| 57 | + Width="{DynamicResource CheckBoxSize}" /> |
55 | 58 |
|
56 | 59 | <Viewbox UseLayoutRounding="False"> |
57 | 60 | <Panel> |
58 | | - <Panel Height="16" Width="16" /> |
| 61 | + <Panel Height="{DynamicResource CheckBoxGlyphSize}" Width="{DynamicResource CheckBoxGlyphSize}" /> |
59 | 62 | <Path x:Name="CheckGlyph" |
60 | 63 | Opacity="0" |
61 | 64 | Fill="{DynamicResource CheckBoxCheckGlyphForegroundUnchecked}" |
|
239 | 242 |
|
240 | 243 | <Style Selector="^ /template/ Path#CheckGlyph"> |
241 | 244 | <Setter Property="Fill" Value="{DynamicResource CheckBoxCheckGlyphForegroundIndeterminate}" /> |
242 | | - <Setter Property="Data" Value="M1536 1536v-1024h-1024v1024h1024z" /> |
| 245 | + <Setter Property="Data" Value="{DynamicResource CheckBoxIndeterminatePathData}" /> |
243 | 246 | <Setter Property="Width" Value="7" /> |
244 | 247 | <Setter Property="Opacity" Value="1" /> |
245 | 248 | </Style> |
|
0 commit comments