Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Win11 Style #2

Merged
merged 8 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions TrueLove.UWP/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@
x:Class="TrueLove.UWP.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:IsWin10="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,14)"
xmlns:IsWin11="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,14)"
RequestedTheme="Dark">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<ResourceDictionary Source="Resources/Breakpoint.xaml" />
<ResourceDictionary Source="Resources/Button.xaml" />
<ResourceDictionary Source="Resources/Colors.xaml" />
<ResourceDictionary Source="Resources/Converter.xaml" />
<ResourceDictionary Source="Resources/Fonts.xaml" />
<ResourceDictionary Source="Resources/Navigation.xaml" />
<ResourceDictionary Source="Resources/Helper/Breakpoint.xaml" />
<ResourceDictionary Source="Resources/Helper/Converter.xaml" />
<ResourceDictionary Source="Resources/Helper/Fonts.xaml" />

<ResourceDictionary Source="Resources/Style/FlipView.xaml" />
<ResourceDictionary Source="Resources/Style/GridViewItem.xaml" />
<ResourceDictionary Source="Resources/Style/NavigationView.xaml" />

<ResourceDictionary Source="Resources/Theme/Colors.xaml" />
<IsWin10:ResourceDictionary Source="Resources/Theme/Win10.xaml" />
<IsWin11:ResourceDictionary Source="Resources/Theme/Win11.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Expand Down
Binary file modified TrueLove.UWP/Assets/Instagram/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 4 additions & 7 deletions TrueLove.UWP/Pages/CommentsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:model="using:TrueLove.Lib.Models.Code"
xmlns:viewModel="using:TrueLove.Lib.Models.Code.Page"
d:DataContext="{d:DesignInstance Type=viewModel:CommentViewModel}"
Background="Transparent"
Background="{ThemeResource PageBackgroundMicaBrush}"
RequestedTheme="Dark"
mc:Ignorable="d">
<Page.Resources>
Expand Down Expand Up @@ -41,10 +41,7 @@
DoubleTapped="Forebody_DoubleTapped"
ToolTipService.ToolTip="Double-click to back to top of page">
<Grid.Background>
<ImageBrush
ImageSource="/Assets/Instagram/4.jpg"
Opacity="0.4"
Stretch="UniformToFill" />
<ImageBrush ImageSource="/Assets/Instagram/4.jpg" Stretch="UniformToFill" />
</Grid.Background>
<TextBlock
x:Name="Title"
Expand All @@ -57,8 +54,8 @@
Margin="0,0,19,13"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Opacity="0"
Style="{StaticResource GhostButton}">
Background="{ThemeResource SystemAccentColor}"
Style="{StaticResource AccentButtonStyle}">
Leave a Memory
</Button>
<!-- 占位符 -->
Expand Down
17 changes: 13 additions & 4 deletions TrueLove.UWP/Pages/HomePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</Style>
</Page.Resources>
<Grid Name="Root">
<FlipView FocusVisualPrimaryThickness="0">
<FlipView FocusVisualPrimaryThickness="0" Style="{StaticResource DefaultFlipViewStyle1}">
<FlipView.Background>
<ImageBrush
AlignmentX="Left"
Expand Down Expand Up @@ -76,26 +76,35 @@
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button
Width="45"
Height="45"
Background="Transparent"
BorderBrush="Transparent"
Click="Links_Click"
Style="{StaticResource TransparentButton}"
Tag="spotify">
<FontIcon
FontFamily="{ThemeResource ExtraIconfont}"
Foreground="{ThemeResource SystemAccentColor}"
Glyph="&#xe71e;" />
</Button>
<Button
Width="45"
Height="45"
Background="Transparent"
BorderBrush="Transparent"
Click="Links_Click"
Style="{StaticResource TransparentButton}"
Tag="youTube">
<FontIcon
FontFamily="{ThemeResource ExtraIconfont}"
Foreground="{ThemeResource SystemAccentColor}"
Glyph="&#xe612;" />
</Button>
<Button
Width="45"
Height="45"
Background="Transparent"
BorderBrush="Transparent"
Click="Links_Click"
Style="{StaticResource TransparentButton}"
Tag="apple">
<FontIcon
FontFamily="{ThemeResource ExtraIconfont}"
Expand Down
13 changes: 7 additions & 6 deletions TrueLove.UWP/Pages/ImagesPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:data="using:TrueLove.Lib.Models.Code"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DataContext="{d:DesignInstance Type=data:ImageViewModel}"
Background="Transparent"
xmlns:viewModel="using:TrueLove.Lib.Models.Code.Page"
d:DataContext="{d:DesignInstance Type=viewModel:ImageViewModel}"
Background="{ThemeResource PageBackgroundMicaBrush}"
RequestedTheme="Dark"
mc:Ignorable="d">
<Page.Resources>
<Style TargetType="ScrollBar">
<Style BasedOn="{StaticResource DefaultScrollBarStyle}" TargetType="ScrollBar">
<Setter Property="Margin" Value="0,85,0,0" />
</Style>
</Page.Resources>
Expand Down Expand Up @@ -76,8 +76,9 @@
x:Name="TitleButton"
Margin="0,0,19,13"
HorizontalAlignment="Right"
Style="{StaticResource GhostButton}"
Visibility="Collapsed">
Background="{ThemeResource SystemAccentColor}"
Style="{StaticResource AccentButtonStyle}"
Visibility="Visible">
Leave a Memory
</Button>
</Grid>
Expand Down
15 changes: 8 additions & 7 deletions TrueLove.UWP/Pages/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
x:Class="TrueLove.UWP.Pages.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:IsWin10="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,14)"
xmlns:IsWin11="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,14)"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
Expand Down Expand Up @@ -35,11 +37,10 @@
Content="Comments"
Icon="Comment"
Tag="comment" />
<muxc:NavigationViewItem Content="Images" Tag="image">
<muxc:NavigationViewItem.Icon>
<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xEB9F;" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem
Content="Images"
Icon="Pictures"
Tag="image" />
</muxc:NavigationView.MenuItems>
</muxc:NavigationView>
<Grid
Expand All @@ -55,7 +56,7 @@
<AdaptiveTrigger MinWindowWidth="{StaticResource MinWindowBreakpoint}" />
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="AppTitleBar.Margin" Value="80 0 0 0" />
<Setter Target="AppTitleBar.Margin" Value="85 0 0 0" />
</VisualState.Setters>
</VisualState>
<VisualState>
Expand All @@ -64,7 +65,7 @@
</VisualState.StateTriggers>
<VisualState.Setters>
<Setter Target="NavView.PaneDisplayMode" Value="Top" />
<Setter Target="AppTitleBar.Margin" Value="440 0 0 0" />
<Setter Target="AppTitleBar.Margin" Value="400 0 0 0" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
Expand Down
Loading