完善了日历组件
This commit is contained in:
lincube
2026-03-02 20:02:14 +08:00
parent 87f47e1887
commit 2436e43f65
25 changed files with 3660 additions and 609 deletions

View File

@@ -126,7 +126,7 @@
Grid.Column="1"
Classes="glass-panel"
ClipToBounds="False"
CornerRadius="18"
CornerRadius="36"
Padding="18">
<Grid RowDefinitions="Auto,*">
<StackPanel Spacing="4">
@@ -160,7 +160,7 @@
Margin="52"
MaxWidth="760"
MaxHeight="520"
CornerRadius="18"
CornerRadius="36"
Padding="14">
<Border.RenderTransform>
<TranslateTransform Y="42" />
@@ -232,12 +232,13 @@
</Border>
<Border x:Name="BottomTaskbarContainer"
Classes="glass-strong"
Classes="glass-island"
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="1"
Margin="4"
CornerRadius="18"
HorizontalAlignment="Stretch"
Margin="0"
CornerRadius="36"
Padding="6">
<Grid ColumnDefinitions="Auto,*,Auto"
ColumnSpacing="8">
@@ -374,14 +375,14 @@
</Border.RenderTransform>
<Border Classes="mica-strong"
CornerRadius="14"
CornerRadius="32"
Padding="18">
<Grid ColumnDefinitions="220,*"
ColumnSpacing="16">
<Border x:Name="SettingsNavPanelBorder"
Classes="glass-panel"
Grid.Column="0"
CornerRadius="10"
CornerRadius="28"
Padding="10">
<Border.Styles>
<Style Selector="ListBox#SettingsNavListBox">
@@ -394,7 +395,7 @@
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="10,8" />
<Setter Property="Margin" Value="0,2" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="CornerRadius" Value="12" />
</Style>
<Style Selector="ListBox#SettingsNavListBox ListBoxItem:pointerover">
<Setter Property="Background" Value="{DynamicResource AdaptiveNavItemHoverBackgroundBrush}" />
@@ -443,13 +444,19 @@
<TextBlock x:Name="SettingsNavRegionTextBlock" Text="&#22320;&#21306;" VerticalAlignment="Center" />
</StackPanel>
</ListBoxItem>
<ListBoxItem x:Name="SettingsNavAboutItem" ToolTip.Tip="&#20851;&#20110;">
<StackPanel Orientation="Horizontal" Spacing="12">
<fi:SymbolIcon x:Name="SettingsNavAboutIcon" Symbol="Info" IconVariant="Regular" />
<TextBlock x:Name="SettingsNavAboutTextBlock" Text="&#20851;&#20110;" VerticalAlignment="Center" />
</StackPanel>
</ListBoxItem>
</ListBox>
</StackPanel>
</Border>
<Border Grid.Column="1"
Classes="glass-panel"
CornerRadius="10"
CornerRadius="20"
Padding="14">
<Grid>
<Grid x:Name="WallpaperSettingsPanel"
@@ -468,17 +475,17 @@
<Border x:Name="WallpaperPreviewHost"
Grid.Row="1" Grid.Column="0"
Margin="0,0,16,0"
VerticalAlignment="Top"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch">
<!-- Monitor Frame (Bezel) -->
<Border x:Name="WallpaperPreviewFrame"
HorizontalAlignment="Stretch"
CornerRadius="14"
CornerRadius="28"
Background="#FF1A1A1A"
Padding="12">
<Border x:Name="WallpaperPreviewViewport"
ClipToBounds="True"
CornerRadius="4"
CornerRadius="12"
Background="#30111827">
<Grid>
<vlc:VideoView x:Name="WallpaperPreviewVideoView"
@@ -497,13 +504,8 @@
<StackPanel x:Name="WallpaperPreviewTopStatusComponentsPanel"
Orientation="Horizontal"
Spacing="3">
<Border x:Name="WallpaperPreviewClockContainer"
IsVisible="False">
<TextBlock x:Name="WallpaperPreviewClockTextBlock"
FontWeight="SemiBold"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
Text="12:34" />
</Border>
<comp:ClockWidget x:Name="WallpaperPreviewClockWidget"
IsVisible="False" />
</StackPanel>
</Border>
@@ -511,7 +513,7 @@
Classes="glass-strong"
Grid.Row="1"
Margin="3"
CornerRadius="8"
CornerRadius="16"
Padding="2">
<Grid ColumnDefinitions="Auto,*,Auto"
ColumnSpacing="3">
@@ -619,15 +621,18 @@
HorizontalAlignment="Stretch">
<Border x:Name="GridPreviewFrame"
HorizontalAlignment="Stretch"
CornerRadius="14"
CornerRadius="28"
Background="#FF1A1A1A"
Padding="12">
<Border x:Name="GridPreviewViewport"
ClipToBounds="True"
CornerRadius="4"
CornerRadius="16"
Background="#30111827">
<Panel>
<Canvas x:Name="GridPreviewLinesCanvas" />
<Canvas x:Name="GridPreviewLinesCanvas"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsHitTestVisible="False" />
<Grid x:Name="GridPreviewGrid"
HorizontalAlignment="Center"
VerticalAlignment="Center">
@@ -645,7 +650,7 @@
Classes="glass-strong"
Grid.Row="1"
Margin="3"
CornerRadius="8"
CornerRadius="16"
Padding="2">
<Grid ColumnDefinitions="Auto,*,Auto"
ColumnSpacing="3">
@@ -683,29 +688,70 @@
Spacing="16">
<TextBlock Text="竖排格数" FontSize="16" FontWeight="SemiBold" Foreground="{DynamicResource AdaptiveTextPrimaryBrush}" />
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="12">
<Slider x:Name="GridSizeSlider"
Grid.Column="0"
Minimum="6"
Maximum="96"
TickFrequency="1"
TickPlacement="None"
Value="12"
ValueChanged="OnGridSizeSliderChanged" />
<ui:NumberBox x:Name="GridSizeNumberBox"
Grid.Column="1"
Width="80"
Minimum="6"
Maximum="96"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
Value="12" />
</Grid>
<TextBlock x:Name="GridSpacingPresetLabelTextBlock"
FontSize="16"
FontWeight="SemiBold"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
Text="Spacing" />
<ComboBox x:Name="GridSpacingPresetComboBox"
Width="220"
SelectionChanged="OnGridSpacingPresetSelectionChanged">
<ComboBoxItem x:Name="GridSpacingRelaxedComboBoxItem" Tag="Relaxed" Content="Relaxed" />
<ComboBoxItem x:Name="GridSpacingCompactComboBoxItem" Tag="Compact" Content="Compact" />
</ComboBox>
<TextBlock x:Name="GridEdgeInsetLabelTextBlock"
FontSize="16"
FontWeight="SemiBold"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
Text="Screen Inset" />
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="12">
<Slider x:Name="GridSizeSlider"
<Slider x:Name="GridEdgeInsetSlider"
Grid.Column="0"
Minimum="6"
Maximum="96"
Minimum="0"
Maximum="30"
TickFrequency="1"
TickPlacement="None"
Value="12"
ValueChanged="OnGridSizeSliderChanged" />
<ui:NumberBox x:Name="GridSizeNumberBox"
Value="18"
ValueChanged="OnGridEdgeInsetSliderChanged" />
<ui:NumberBox x:Name="GridEdgeInsetNumberBox"
Grid.Column="1"
Width="80"
Minimum="6"
Maximum="96"
Minimum="0"
Maximum="30"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
Value="12" />
Value="18" />
</Grid>
<Button x:Name="ApplyGridButton"
HorizontalAlignment="Stretch"
Padding="0,10"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
Click="OnApplyGridSizeClick"
<TextBlock x:Name="GridEdgeInsetComputedPxTextBlock"
Foreground="{DynamicResource AdaptiveTextSecondaryBrush}"
Text="≈ 0 px" />
<Button x:Name="ApplyGridButton"
HorizontalAlignment="Stretch"
Padding="0,10"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
Click="OnApplyGridSizeClick"
Content="&#24212;&#29992;" />
<TextBlock x:Name="GridInfoTextBlock"
@@ -762,7 +808,7 @@
<Border x:Name="RecommendedColorSwatch1"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
<Button x:Name="RecommendedColorButton2"
@@ -773,7 +819,7 @@
<Border x:Name="RecommendedColorSwatch2"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
<Button x:Name="RecommendedColorButton3"
@@ -784,7 +830,7 @@
<Border x:Name="RecommendedColorSwatch3"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
<Button x:Name="RecommendedColorButton4"
@@ -795,7 +841,7 @@
<Border x:Name="RecommendedColorSwatch4"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
<Button x:Name="RecommendedColorButton5"
@@ -806,7 +852,7 @@
<Border x:Name="RecommendedColorSwatch5"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
<Button x:Name="RecommendedColorButton6"
@@ -817,7 +863,7 @@
<Border x:Name="RecommendedColorSwatch6"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
</WrapPanel>
@@ -852,7 +898,7 @@
<Border x:Name="MonetColorSwatch1"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
<Button x:Name="MonetColorButton2"
@@ -863,7 +909,7 @@
<Border x:Name="MonetColorSwatch2"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
<Button x:Name="MonetColorButton3"
@@ -874,7 +920,7 @@
<Border x:Name="MonetColorSwatch3"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
<Button x:Name="MonetColorButton4"
@@ -885,7 +931,7 @@
<Border x:Name="MonetColorSwatch4"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
<Button x:Name="MonetColorButton5"
@@ -896,7 +942,7 @@
<Border x:Name="MonetColorSwatch5"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
<Button x:Name="MonetColorButton6"
@@ -907,7 +953,7 @@
<Border x:Name="MonetColorSwatch6"
Width="26"
Height="26"
CornerRadius="6"
CornerRadius="12"
BorderThickness="0" />
</Button>
</WrapPanel>
@@ -932,7 +978,8 @@
<ui:SettingsExpander x:Name="StatusBarClockSettingsExpander"
Header="&#26102;&#38388;&#32452;&#20214;"
Description="&#22312;&#39030;&#37096;&#29366;&#24577;&#26639;&#26174;&#31034;&#26102;&#38047;&#12290;">
Description="&#22312;&#39030;&#37096;&#29366;&#24577;&#26639;&#26174;&#31034;&#26102;&#38047;&#12290;"
IsExpanded="False">
<ui:SettingsExpander.IconSource>
</ui:SettingsExpander.IconSource>
@@ -943,11 +990,77 @@
Checked="OnStatusBarClockChecked"
Unchecked="OnStatusBarClockUnchecked" />
</ui:SettingsExpander.Footer>
</ui:SettingsExpander>
</StackPanel>
<StackPanel Margin="0,8,0,0" Spacing="12">
<TextBlock Text="显示格式" FontSize="14" FontWeight="SemiBold" Foreground="{DynamicResource AdaptiveTextPrimaryBrush}" />
<StackPanel Orientation="Horizontal" Spacing="8">
<RadioButton x:Name="ClockFormatHMSSRadio"
Content="时分秒 (HH:mm:ss)"
GroupName="ClockFormat"
Checked="OnClockFormatChanged"
Tag="Hms" />
<RadioButton x:Name="ClockFormatHMRadio"
Content="时分 (HH:mm)"
GroupName="ClockFormat"
Checked="OnClockFormatChanged"
Tag="Hm" />
</StackPanel>
</StackPanel>
</ui:SettingsExpander>
<StackPanel x:Name="RegionSettingsPanel"
IsVisible="False"
<ui:SettingsExpander x:Name="StatusBarSpacingSettingsExpander"
Header="Component spacing"
Description="Adjust spacing between status bar components."
IsExpanded="False">
<ui:SettingsExpander.IconSource>
</ui:SettingsExpander.IconSource>
<ui:SettingsExpander.Footer>
<ComboBox x:Name="StatusBarSpacingModeComboBox"
Width="220"
SelectionChanged="OnStatusBarSpacingModeChanged">
<ComboBoxItem x:Name="StatusBarSpacingModeCompactItem" Tag="Compact" Content="Compact" />
<ComboBoxItem x:Name="StatusBarSpacingModeRelaxedItem" Tag="Relaxed" Content="Relaxed" />
<ComboBoxItem x:Name="StatusBarSpacingModeCustomItem" Tag="Custom" Content="Custom" />
</ComboBox>
</ui:SettingsExpander.Footer>
<StackPanel x:Name="StatusBarSpacingCustomPanel"
Margin="0,8,0,0"
Spacing="12"
IsVisible="False">
<TextBlock x:Name="StatusBarSpacingCustomLabelTextBlock"
FontSize="14"
FontWeight="SemiBold"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
Text="Custom spacing" />
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="12">
<Slider x:Name="StatusBarSpacingSlider"
Grid.Column="0"
Minimum="0"
Maximum="30"
TickFrequency="1"
TickPlacement="None"
Value="12"
ValueChanged="OnStatusBarSpacingSliderChanged" />
<ui:NumberBox x:Name="StatusBarSpacingNumberBox"
Grid.Column="1"
Width="80"
Minimum="0"
Maximum="30"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
Value="12" />
</Grid>
<TextBlock x:Name="StatusBarSpacingComputedPxTextBlock"
Foreground="{DynamicResource AdaptiveTextSecondaryBrush}"
Text="≈ 0 px" />
</StackPanel>
</ui:SettingsExpander>
</StackPanel>
<StackPanel x:Name="RegionSettingsPanel"
IsVisible="False"
Spacing="16">
<TextBlock x:Name="RegionPanelTitleTextBlock"
FontSize="24"
@@ -983,6 +1096,19 @@
</ui:SettingsExpander.Footer>
</ui:SettingsExpander>
</StackPanel>
<StackPanel x:Name="AboutSettingsPanel" IsVisible="False" Spacing="20">
<TextBlock x:Name="AboutPanelTitleTextBlock" FontSize="24" FontWeight="SemiBold" Foreground="{DynamicResource AdaptiveTextPrimaryBrush}" Text="关于" />
<Border Background="{DynamicResource AdaptiveSurfaceRaisedBrush}" CornerRadius="20" Padding="20">
<StackPanel Spacing="12">
<TextBlock Text="LanMontainDesktop" FontSize="20" FontWeight="SemiBold" Foreground="{DynamicResource AdaptiveTextPrimaryBrush}" />
<TextBlock Text="现代化桌面壳层应用" FontSize="13" Foreground="{DynamicResource AdaptiveTextSecondaryBrush}" />
<Separator Background="{DynamicResource AdaptiveButtonBorderBrush}" Margin="0,8" />
<TextBlock x:Name="VersionTextBlock" Text="版本号: 1.0.0" FontSize="13" Foreground="{DynamicResource AdaptiveTextPrimaryBrush}" />
<TextBlock x:Name="CodeNameTextBlock" Text="版本代号: Administrate" FontSize="13" FontWeight="SemiBold" Foreground="{DynamicResource AdaptiveAccentBrush}" />
</StackPanel>
</Border>
</StackPanel>
</Grid>
</Border>
</Grid>
@@ -990,6 +1116,47 @@
</Border>
</Grid>
<Border x:Name="ComponentSettingsWindow"
IsVisible="False"
Opacity="0"
Classes="glass-strong"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
Width="400"
MinWidth="300"
MaxWidth="500"
Height="300"
MinHeight="200"
Margin="24,24,24,100"
CornerRadius="36"
Padding="0">
<Grid RowDefinitions="Auto,*">
<Border Grid.Row="0"
Background="{DynamicResource AdaptiveAccentBrush}"
CornerRadius="36,36,0,0"
Padding="16,12">
<Grid ColumnDefinitions="*,Auto">
<TextBlock Text="组件设置"
FontSize="16"
FontWeight="SemiBold"
Foreground="White"
VerticalAlignment="Center" />
<Button Grid.Column="1"
Padding="8"
Background="Transparent"
BorderThickness="0"
Click="OnCloseComponentSettingsClick">
<fi:FluentIcon Icon="Dismiss"
FontSize="14"
Foreground="White" />
</Button>
</Grid>
</Border>
<ContentControl x:Name="ComponentSettingsContentHost"
Grid.Row="1" />
</Grid>
</Border>
<Border x:Name="ComponentLibraryWindow"
IsVisible="False"
Opacity="0"
@@ -1002,8 +1169,11 @@
Height="260"
MinHeight="220"
Margin="24,24,24,100"
CornerRadius="18"
Padding="14">
CornerRadius="36"
Padding="14"
PointerPressed="OnComponentLibraryWindowPointerPressed"
PointerMoved="OnComponentLibraryWindowPointerMoved"
PointerReleased="OnComponentLibraryWindowPointerReleased">
<Border.Transitions>
<Transitions>
<DoubleTransition Property="Opacity" Duration="0:0:0.2" />
@@ -1018,7 +1188,7 @@
FontSize="16"
FontWeight="SemiBold"
Foreground="{DynamicResource AdaptiveTextPrimaryBrush}"
Text="&#32452;&#20214;&#24211;" />
Text="小组件" />
<Button x:Name="CloseComponentLibraryButton"
Grid.Column="1"
Padding="8"