improve:计时器UI
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
<Window x:Class="Ink_Canvas.MinimizedTimerWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Ink_Canvas"
|
||||
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
|
||||
Topmost="True" Background="Transparent"
|
||||
mc:Ignorable="d" WindowStyle="None" AllowsTransparency="True"
|
||||
WindowStartupLocation="Manual" Title="计时器" Height="120" Width="300"
|
||||
MouseLeftButtonDown="Window_MouseLeftButtonDown" MouseEnter="Window_MouseEnter" MouseLeave="Window_MouseLeave"
|
||||
ResizeMode="NoResize">
|
||||
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="DigitResources.xaml" />
|
||||
<ResourceDictionary Source="../Resources/Styles/Light.xaml" />
|
||||
<ResourceDictionary Source="../Resources/Styles/Dark.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
|
||||
<Border Background="{DynamicResource SeewoTimerWindowBackground}"
|
||||
CornerRadius="8"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource SeewoTimerWindowBorderBrush}"
|
||||
Margin="5">
|
||||
<Grid>
|
||||
<!-- 时间显示 -->
|
||||
<Grid HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<!-- 小时 -->
|
||||
<Path x:Name="MinHour1Display" Data="{StaticResource Digit0}"
|
||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||
Width="24" Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,2,0"/>
|
||||
<Path x:Name="MinHour2Display" Data="{StaticResource Digit0}"
|
||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||
Width="24" Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,2,0"/>
|
||||
|
||||
<!-- 冒号 -->
|
||||
<TextBlock Text=":" FontSize="20" FontWeight="Bold"
|
||||
Foreground="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Margin="0,0,2,0"/>
|
||||
|
||||
<!-- 分钟 -->
|
||||
<Path x:Name="MinMinute1Display" Data="{StaticResource Digit0}"
|
||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||
Width="24" Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,2,0"/>
|
||||
<Path x:Name="MinMinute2Display" Data="{StaticResource Digit0}"
|
||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||
Width="24" Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,2,0"/>
|
||||
|
||||
<!-- 冒号 -->
|
||||
<TextBlock Text=":" FontSize="20" FontWeight="Bold"
|
||||
Foreground="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Margin="0,0,2,0"/>
|
||||
|
||||
<!-- 秒 -->
|
||||
<Path x:Name="MinSecond1Display" Data="{StaticResource Digit0}"
|
||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||
Width="24" Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,2,0"/>
|
||||
<Path x:Name="MinSecond2Display" Data="{StaticResource Digit0}"
|
||||
Fill="{DynamicResource SeewoTimerWindowDigitForeground}"
|
||||
Width="24" Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Stretch="Uniform"
|
||||
Margin="0,0,0,0"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<!-- 关闭按钮 -->
|
||||
<Button x:Name="CloseButton"
|
||||
Width="20" Height="20"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0,5,5,0"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Click="CloseButton_Click"
|
||||
Cursor="Hand"
|
||||
Opacity="0.7">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="10">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#E81123"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
<TextBlock Text="✕" FontSize="12" FontWeight="Bold"
|
||||
Foreground="{DynamicResource SeewoTimerWindowButtonForeground}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user