improve:计时器UI
This commit is contained in:
@@ -5,9 +5,9 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Ink_Canvas"
|
xmlns:local="clr-namespace:Ink_Canvas"
|
||||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||||
Topmost="True" Background="Transparent"
|
Topmost="True" Background="{DynamicResource SeewoTimerWindowBackground}"
|
||||||
mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True"
|
mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True"
|
||||||
WindowStartupLocation="Manual" Title="计时器" Height="120" Width="350"
|
WindowStartupLocation="Manual" Title="计时器" Height="200" Width="600"
|
||||||
MouseLeftButtonDown="Window_MouseLeftButtonDown" MouseLeftButtonUp="Window_MouseLeftButtonUp"
|
MouseLeftButtonDown="Window_MouseLeftButtonDown" MouseLeftButtonUp="Window_MouseLeftButtonUp"
|
||||||
MouseEnter="Window_MouseEnter" MouseLeave="Window_MouseLeave" MouseMove="Window_MouseMove">
|
MouseEnter="Window_MouseEnter" MouseLeave="Window_MouseLeave" MouseMove="Window_MouseMove">
|
||||||
|
|
||||||
@@ -15,76 +15,76 @@
|
|||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary Source="DigitResources.xaml" />
|
<ResourceDictionary Source="DigitResources.xaml" />
|
||||||
<ResourceDictionary Source="../Resources/Styles/Light.xaml" />
|
|
||||||
<ResourceDictionary Source="../Resources/Styles/Dark.xaml" />
|
|
||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
<Border Background="{DynamicResource SeewoTimerWindowBackground}"
|
<Border Background="{DynamicResource SeewoTimerWindowBackground}"
|
||||||
CornerRadius="8"
|
CornerRadius="15"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
BorderBrush="{DynamicResource SeewoTimerWindowBorderBrush}"
|
BorderBrush="{DynamicResource SeewoTimerWindowBorderBrush}"
|
||||||
Margin="5">
|
Margin="0"
|
||||||
|
UseLayoutRounding="True"
|
||||||
|
SnapsToDevicePixels="True">
|
||||||
<Grid>
|
<Grid>
|
||||||
<!-- 时间显示 -->
|
<!-- 时间显示 -->
|
||||||
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
|
<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20,20,20,20">
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||||
<!-- 小时 -->
|
<!-- 小时 -->
|
||||||
<Path x:Name="MinHour1Display" Data="{StaticResource Digit0}"
|
<Path x:Name="MinHour1Display" Data="{StaticResource Digit0}"
|
||||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||||
Width="32" Height="32"
|
Width="72" Height="72"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Stretch="Uniform"
|
Stretch="Uniform"
|
||||||
Margin="0,0,4,0"/>
|
Margin="0,0,12,0"/>
|
||||||
<Path x:Name="MinHour2Display" Data="{StaticResource Digit0}"
|
<Path x:Name="MinHour2Display" Data="{StaticResource Digit0}"
|
||||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||||
Width="32" Height="32"
|
Width="72" Height="72"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Stretch="Uniform"
|
Stretch="Uniform"
|
||||||
Margin="0,0,4,0"/>
|
Margin="0,0,12,0"/>
|
||||||
|
|
||||||
<!-- 冒号 -->
|
<!-- 冒号 -->
|
||||||
<TextBlock Text=":" FontSize="20" FontWeight="Bold"
|
<TextBlock Text=":" FontSize="48" FontWeight="Bold"
|
||||||
Foreground="{DynamicResource SeewoTimerWindowDigitForeground}"
|
Foreground="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||||
Margin="0,0,2,0"/>
|
Margin="0,0,12,0"/>
|
||||||
|
|
||||||
<!-- 分钟 -->
|
<!-- 分钟 -->
|
||||||
<Path x:Name="MinMinute1Display" Data="{StaticResource Digit0}"
|
<Path x:Name="MinMinute1Display" Data="{StaticResource Digit0}"
|
||||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||||
Width="32" Height="32"
|
Width="72" Height="72"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Stretch="Uniform"
|
Stretch="Uniform"
|
||||||
Margin="0,0,4,0"/>
|
Margin="0,0,12,0"/>
|
||||||
<Path x:Name="MinMinute2Display" Data="{StaticResource Digit0}"
|
<Path x:Name="MinMinute2Display" Data="{StaticResource Digit0}"
|
||||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||||
Width="32" Height="32"
|
Width="72" Height="72"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Stretch="Uniform"
|
Stretch="Uniform"
|
||||||
Margin="0,0,4,0"/>
|
Margin="0,0,12,0"/>
|
||||||
|
|
||||||
<!-- 冒号 -->
|
<!-- 冒号 -->
|
||||||
<TextBlock Text=":" FontSize="20" FontWeight="Bold"
|
<TextBlock Text=":" FontSize="48" FontWeight="Bold"
|
||||||
Foreground="{DynamicResource SeewoTimerWindowDigitForeground}"
|
Foreground="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||||
Margin="0,0,2,0"/>
|
Margin="0,0,12,0"/>
|
||||||
|
|
||||||
<!-- 秒 -->
|
<!-- 秒 -->
|
||||||
<Path x:Name="MinSecond1Display" Data="{StaticResource Digit0}"
|
<Path x:Name="MinSecond1Display" Data="{StaticResource Digit0}"
|
||||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||||
Width="32" Height="32"
|
Width="72" Height="72"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Stretch="Uniform"
|
Stretch="Uniform"
|
||||||
Margin="0,0,4,0"/>
|
Margin="0,0,12,0"/>
|
||||||
<Path x:Name="MinSecond2Display" Data="{StaticResource Digit0}"
|
<Path x:Name="MinSecond2Display" Data="{StaticResource Digit0}"
|
||||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||||
Width="32" Height="32"
|
Width="72" Height="72"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Stretch="Uniform"
|
Stretch="Uniform"
|
||||||
@@ -94,10 +94,10 @@
|
|||||||
|
|
||||||
<!-- 关闭按钮 -->
|
<!-- 关闭按钮 -->
|
||||||
<Button x:Name="CloseButton"
|
<Button x:Name="CloseButton"
|
||||||
Width="20" Height="20"
|
Width="24" Height="24"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Margin="0,5,5,0"
|
Margin="0,8,8,0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Click="CloseButton_Click"
|
Click="CloseButton_Click"
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
Opacity="0.7">
|
Opacity="0.7">
|
||||||
<Button.Template>
|
<Button.Template>
|
||||||
<ControlTemplate TargetType="Button">
|
<ControlTemplate TargetType="Button">
|
||||||
<Border Background="{TemplateBinding Background}" CornerRadius="10">
|
<Border Background="{TemplateBinding Background}" CornerRadius="12">
|
||||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
|
|||||||
Reference in New Issue
Block a user