Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
HandyControl
提交
6c353093
H
HandyControl
项目概览
jobily
/
HandyControl
10 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
HandyControl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
6c353093
编写于
1月 22, 2023
作者:
N
NaBian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enhance: high dpi optimization.
上级
37d69e19
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
121 addition
and
117 deletion
+121
-117
src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckBoxBaseStyle.xaml
...yControl_Shared/Themes/Styles/Base/CheckBoxBaseStyle.xaml
+34
-32
src/Shared/HandyControl_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml
...ntrol_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml
+87
-85
未找到文件。
src/Shared/HandyControl_Shared/Themes/Styles/Base/CheckBoxBaseStyle.xaml
浏览文件 @
6c353093
...
...
@@ -9,87 +9,89 @@
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="-4" Opacity=".6" SnapsToDevicePixels="true" Stroke="{DynamicResource SecondaryBorderBrush}" StrokeThickness="2" StrokeDashArray="1 1" RadiusX="4" RadiusY="4"/>
<Rectangle Margin="-4" Opacity=".6" SnapsToDevicePixels="true" Stroke="{DynamicResource SecondaryBorderBrush}" StrokeThickness="2" StrokeDashArray="1 1" RadiusX="4" RadiusY="4"
/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="6,0,0,0"/>
<Setter Property="Background" Value="White"
/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"
/>
<Setter Property="BorderThickness" Value="1"
/>
<Setter Property="HorizontalAlignment" Value="Stretch"
/>
<Setter Property="VerticalAlignment" Value="Center"
/>
<Setter Property="VerticalContentAlignment" Value="Center"
/>
<Setter Property="Padding" Value="6,0,0,0"
/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<ControlTemplate.Resources>
<Storyboard x:Key="StoryboardCheckedTrue">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.StrokeDashOffset)" Storyboard.TargetName="path">
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"
/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="StoryboardCheckedFalse">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Shape.StrokeDashOffset)" Storyboard.TargetName="path">
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="8"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="8"
/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"
/>
<ColumnDefinition Width="*"
/>
</Grid.ColumnDefinitions>
<Border Height="16" Width="16"
x:Name="checkBoxBorder" Background="{TemplateBinding Background}" CornerRadius="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
/>
<Border Height="16" Width="16"
Background="{TemplateBinding Background}" CornerRadius="2"
/>
<hc:SimplePanel Grid.Column="0" Height="16" Width="16" x:Name="markGrid">
<Path FlowDirection="LeftToRight" UseLayoutRounding="True" x:Name="path" StrokeDashOffset="8" StrokeDashArray="8,8" Width="12" Height="12" Data="{StaticResource CheckedGeometry}" StrokeThickness="2" Stretch="Uniform" Stroke="{DynamicResource TextIconBrush}"/>
<Rectangle x:Name="indeterminateMark" RadiusX="2" RadiusY="2" Fill="{DynamicResource PrimaryBrush}" Margin="2" Opacity="0"/>
<Path FlowDirection="LeftToRight" UseLayoutRounding="True" x:Name="path" StrokeDashOffset="8" StrokeDashArray="8,8" Width="12" Height="12" Data="{StaticResource CheckedGeometry}" StrokeThickness="2" Stretch="Uniform" Stroke="{DynamicResource TextIconBrush}"
/>
<Rectangle x:Name="indeterminateMark" RadiusX="2" RadiusY="2" Fill="{DynamicResource PrimaryBrush}" Margin="2" Opacity="0"
/>
</hc:SimplePanel>
<ContentPresenter x:Name="contentPresenter" Visibility="Collapsed" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Border Height="16" Width="16" x:Name="border" CornerRadius="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
<ContentPresenter x:Name="contentPresenter" Visibility="Collapsed" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="HasContent" Value="true">
<Setter Property="Visibility" TargetName="contentPresenter" Value="Visible"/>
<Setter Property="Visibility" TargetName="contentPresenter" Value="Visible"
/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource SecondaryBorderBrush}"
/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsChecked" Value="true"/>
<Condition Property="IsPressed" Value="true"/>
<Condition Property="IsChecked" Value="true"
/>
<Condition Property="IsPressed" Value="true"
/>
</MultiTrigger.Conditions>
<Setter Property="Opacity" Value=".8"/>
<Setter Property="Opacity" Value=".8"
/>
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsChecked" Value="false"/>
<Condition Property="IsPressed" Value="true"/>
<Condition Property="IsChecked" Value="false"
/>
<Condition Property="IsPressed" Value="true"
/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"
/>
</MultiTrigger>
<Trigger Property="IsChecked" Value="true">
<Trigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource StoryboardCheckedTrue}"/>
<BeginStoryboard Storyboard="{StaticResource StoryboardCheckedTrue}"
/>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard Storyboard="{StaticResource StoryboardCheckedFalse}"/>
<BeginStoryboard Storyboard="{StaticResource StoryboardCheckedFalse}"
/>
</Trigger.ExitActions>
<Setter Property="Opacity" TargetName="indeterminateMark" Value="0"/>
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource DarkPrimaryBrush}"/>
<Setter Property="Opacity" TargetName="indeterminateMark" Value="0" />
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource DarkPrimaryBrush}" />
<Setter TargetName="border" Property="Visibility" Value="Collapsed" />
</Trigger>
<Trigger Property="IsChecked" Value="false">
<Setter Property="Stroke" Value="{DynamicResource BorderBrush}" TargetName="path"/>
<Setter Property="Stroke" Value="{DynamicResource BorderBrush}" TargetName="path"
/>
</Trigger>
<Trigger Property="IsChecked" Value="{x:Null}">
<Setter Property="Opacity" TargetName="indeterminateMark" Value="1"/>
<Setter Property="Opacity" TargetName="indeterminateMark" Value="1"
/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4"/>
<Setter Property="Opacity" Value="0.4"
/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
...
...
src/Shared/HandyControl_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml
浏览文件 @
6c353093
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录