mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[Settings] Mica & modern titlebar (#25936)
* Adding Mica * Working Mica * Fluent titlebar * Modern titlebar * Fixing OOBE * Fix build issue * Add missing entry to NOTICE.md * Update App.xaml.cs
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
x:Class="Microsoft.PowerToys.Settings.UI.Views.ShellPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:animations="using:CommunityToolkit.WinUI.UI.Animations"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:helpers="using:Microsoft.PowerToys.Settings.UI.Helpers"
|
||||
xmlns:i="using:Microsoft.Xaml.Interactivity"
|
||||
@@ -10,11 +11,8 @@
|
||||
xmlns:ui="using:CommunityToolkit.WinUI.UI"
|
||||
xmlns:views="using:Microsoft.PowerToys.Settings.UI.Views"
|
||||
HighContrastAdjustment="None"
|
||||
Loaded="ShellPage_Loaded"
|
||||
mc:Ignorable="d">
|
||||
<!--
|
||||
TODO(stefan): Bring back Should be available in v1.1
|
||||
BackdropMaterial.ApplyToRootOrPageBackground="True"
|
||||
-->
|
||||
|
||||
<i:Interaction.Behaviors>
|
||||
<ic:EventTriggerBehavior EventName="Loaded">
|
||||
@@ -22,14 +20,61 @@
|
||||
</ic:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
|
||||
<Grid x:Name="RootGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid x:Name="RootGrid">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="48" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Button
|
||||
x:Name="PaneToggleBtn"
|
||||
Width="48"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Click="PaneToggleBtn_Click"
|
||||
Style="{StaticResource PaneToggleButtonStyle}" />
|
||||
<Grid
|
||||
x:Name="AppTitleBar"
|
||||
Height="{Binding ElementName=navigationView, Path=CompactPaneLength}"
|
||||
Margin="48,0,0,0"
|
||||
VerticalAlignment="Top"
|
||||
IsHitTestVisible="True">
|
||||
<animations:Implicit.Animations>
|
||||
<animations:OffsetAnimation Duration="0:0:0.3" />
|
||||
</animations:Implicit.Animations>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image
|
||||
Width="16"
|
||||
Height="16"
|
||||
HorizontalAlignment="Left"
|
||||
Source="/icon.ico" />
|
||||
<TextBlock
|
||||
x:Name="AppTitleBarText"
|
||||
x:Uid="SettingsWindow_TitleTxt"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
TextWrapping="NoWrap" />
|
||||
<TextBlock
|
||||
x:Name="DebugMessage"
|
||||
Margin="8,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="Debug"
|
||||
TextWrapping="NoWrap"
|
||||
Visibility="Collapsed" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<NavigationView
|
||||
x:Name="navigationView"
|
||||
Grid.Row="1"
|
||||
Canvas.ZIndex="0"
|
||||
CompactModeThresholdWidth="1007"
|
||||
DisplayModeChanged="NavigationView_DisplayModeChanged"
|
||||
ExpandedModeThresholdWidth="1007"
|
||||
IsBackButtonVisible="Collapsed"
|
||||
IsBackEnabled="{x:Bind ViewModel.IsBackEnabled, Mode=OneWay}"
|
||||
IsPaneToggleButtonVisible="False"
|
||||
IsSettingsVisible="False"
|
||||
IsTitleBarAutoPaddingEnabled="False"
|
||||
PaneClosed="NavigationView_PaneClosed"
|
||||
|
||||
Reference in New Issue
Block a user