[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:
Niels Laute
2023-06-11 17:54:01 +02:00
committed by GitHub
parent 56cdd6dd40
commit 852778daa5
16 changed files with 272 additions and 74 deletions

View File

@@ -48,6 +48,8 @@ namespace Microsoft.PowerToys.Settings.UI
ThemeHelpers.SetImmersiveDarkMode(_hWnd, isDark);
}
SetTheme(isDark);
OverlappedPresenter presenter = _appWindow.Presenter as OverlappedPresenter;
presenter.IsMinimizable = false;
presenter.IsMaximizable = false;
@@ -118,5 +120,10 @@ namespace Microsoft.PowerToys.Settings.UI
mainWindow.CloseHiddenWindow();
}
}
private void SetTheme(bool isDark)
{
shellPage.RequestedTheme = isDark ? ElementTheme.Dark : ElementTheme.Light;
}
}
}