mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
@@ -69,12 +69,10 @@ internal sealed class WindowController
|
|||||||
window.Activate();
|
window.Activate();
|
||||||
options.BringToForeground();
|
options.BringToForeground();
|
||||||
|
|
||||||
if (options.UseSystemBackdrop)
|
AppOptions appOptions = serviceProvider.GetRequiredService<AppOptions>();
|
||||||
{
|
UpdateElementTheme(appOptions.ElementTheme);
|
||||||
AppOptions appOptions = serviceProvider.GetRequiredService<AppOptions>();
|
UpdateSystemBackdrop(appOptions.BackdropType);
|
||||||
UpdateSystemBackdrop(appOptions.BackdropType);
|
appOptions.PropertyChanged += OnOptionsPropertyChanged;
|
||||||
appOptions.PropertyChanged += OnOptionsPropertyChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
subclass.Initialize();
|
subclass.Initialize();
|
||||||
|
|
||||||
|
|||||||
@@ -41,21 +41,18 @@ internal readonly struct WindowOptions
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly bool PersistSize;
|
public readonly bool PersistSize;
|
||||||
|
|
||||||
public readonly bool UseSystemBackdrop;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否使用 Win UI 3 自带的拓展标题栏实现
|
/// 是否使用 Win UI 3 自带的拓展标题栏实现
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly bool UseLegacyDragBarImplementation = !AppWindowTitleBar.IsCustomizationSupported();
|
public readonly bool UseLegacyDragBarImplementation = !AppWindowTitleBar.IsCustomizationSupported();
|
||||||
|
|
||||||
public WindowOptions(Window window, FrameworkElement titleBar, SizeInt32 initSize, bool persistSize = false, bool useSystemBackdrop = true)
|
public WindowOptions(Window window, FrameworkElement titleBar, SizeInt32 initSize, bool persistSize = false)
|
||||||
{
|
{
|
||||||
Hwnd = WindowNative.GetWindowHandle(window);
|
Hwnd = WindowNative.GetWindowHandle(window);
|
||||||
InputNonClientPointerSource = InputNonClientPointerSource.GetForWindowId(window.AppWindow.Id);
|
InputNonClientPointerSource = InputNonClientPointerSource.GetForWindowId(window.AppWindow.Id);
|
||||||
TitleBar = titleBar;
|
TitleBar = titleBar;
|
||||||
InitSize = initSize;
|
InitSize = initSize;
|
||||||
PersistSize = persistSize;
|
PersistSize = persistSize;
|
||||||
UseSystemBackdrop = useSystemBackdrop;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user