From 467f55c4b22dda6fc466f8d470011348a1d4eab1 Mon Sep 17 00:00:00 2001 From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com> Date: Sat, 18 Feb 2023 22:27:32 +0000 Subject: [PATCH] Fix Windows 11 titlebars (#92) also fixed the fluent style not changing the taskbar icon --- Bloxstrap/Dialogs/FluentDialog.xaml | 8 ++++---- Bloxstrap/Dialogs/FluentDialog.xaml.cs | 16 ++++------------ Bloxstrap/Views/MainWindow.xaml | 4 ++-- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/Bloxstrap/Dialogs/FluentDialog.xaml b/Bloxstrap/Dialogs/FluentDialog.xaml index 604b2e4..cfd310e 100644 --- a/Bloxstrap/Dialogs/FluentDialog.xaml +++ b/Bloxstrap/Dialogs/FluentDialog.xaml @@ -7,9 +7,9 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" mc:Ignorable="d" Width="420" - Height="178" - MinHeight="178" - MaxHeight="178" + Height="192" + MinHeight="191" + MaxHeight="192" ResizeMode="NoResize" Background="{ui:ThemeResource ApplicationBackgroundBrush}" ExtendsContentIntoTitleBar="True" @@ -17,7 +17,7 @@ WindowCornerPreference="Round" WindowStartupLocation="CenterScreen"> - + diff --git a/Bloxstrap/Dialogs/FluentDialog.xaml.cs b/Bloxstrap/Dialogs/FluentDialog.xaml.cs index 8b24834..1c31415 100644 --- a/Bloxstrap/Dialogs/FluentDialog.xaml.cs +++ b/Bloxstrap/Dialogs/FluentDialog.xaml.cs @@ -1,20 +1,11 @@ using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; using System.Windows.Forms; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Shapes; + using Bloxstrap.Enums; +using Bloxstrap.Helpers.Extensions; using Bloxstrap.ViewModels; + using Wpf.Ui.Appearance; using Wpf.Ui.Mvvm.Contracts; using Wpf.Ui.Mvvm.Services; @@ -79,6 +70,7 @@ namespace Bloxstrap.Dialogs _viewModel = new FluentDialogViewModel(this); DataContext = _viewModel; Title = App.ProjectName; + Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource(); _themeService.SetTheme(App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Dark ? ThemeType.Dark : ThemeType.Light); _themeService.SetSystemAccent(); diff --git a/Bloxstrap/Views/MainWindow.xaml b/Bloxstrap/Views/MainWindow.xaml index b498818..18b037b 100644 --- a/Bloxstrap/Views/MainWindow.xaml +++ b/Bloxstrap/Views/MainWindow.xaml @@ -27,9 +27,9 @@ - + - +