From afbe9f4b906df0ac20d194d9fade9c08a3c6cef8 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Thu, 29 Jun 2023 23:21:43 +0100 Subject: [PATCH] Disable Mica, change FluentDialog a bit rip mica :( --- Bloxstrap/Bootstrapper.cs | 2 -- .../WPF/ViewModels/FluentDialogViewModel.cs | 2 ++ .../WPF/Views/FluentDialog.xaml | 29 +++++++++++-------- Bloxstrap/UI/Menu/Views/MainWindow.xaml | 7 +---- Bloxstrap/UI/MessageBox/FluentMessageBox.xaml | 7 ++--- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index 6a276ae6..33d2fabd 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -127,8 +127,6 @@ public async Task Run() { App.Logger.WriteLine("[Bootstrapper::Run] Running bootstrapper"); - Controls.ShowMessageBox("hi :D", MessageBoxImage.Error, MessageBoxButton.YesNoCancel); - if (App.IsUninstall) { Uninstall(); diff --git a/Bloxstrap/UI/BootstrapperDialogs/WPF/ViewModels/FluentDialogViewModel.cs b/Bloxstrap/UI/BootstrapperDialogs/WPF/ViewModels/FluentDialogViewModel.cs index 89c95c19..703e8682 100644 --- a/Bloxstrap/UI/BootstrapperDialogs/WPF/ViewModels/FluentDialogViewModel.cs +++ b/Bloxstrap/UI/BootstrapperDialogs/WPF/ViewModels/FluentDialogViewModel.cs @@ -13,6 +13,7 @@ public class FluentDialogViewModel : INotifyPropertyChanged { public event PropertyChangedEventHandler? PropertyChanged; public void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + private readonly IBootstrapperDialog _dialog; public ICommand CancelInstallCommand => new RelayCommand(CancelInstall); @@ -23,6 +24,7 @@ public class FluentDialogViewModel : INotifyPropertyChanged public bool ProgressIndeterminate { get; set; } = true; public int ProgressValue { get; set; } = 0; + public bool CancelButtonEnabled { get; set; } = false; public Visibility CancelButtonVisibility { get; set; } = Visibility.Collapsed; public string CancelButtonText { get; set; } = "Cancel"; diff --git a/Bloxstrap/UI/BootstrapperDialogs/WPF/Views/FluentDialog.xaml b/Bloxstrap/UI/BootstrapperDialogs/WPF/Views/FluentDialog.xaml index b5c1879d..0de1cce5 100644 --- a/Bloxstrap/UI/BootstrapperDialogs/WPF/Views/FluentDialog.xaml +++ b/Bloxstrap/UI/BootstrapperDialogs/WPF/Views/FluentDialog.xaml @@ -6,18 +6,22 @@ xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" mc:Ignorable="d" Width="420" - Height="192" - MinHeight="191" - MaxHeight="192" + MinHeight="0" + SizeToContent="Height" ResizeMode="NoResize" Background="{ui:ThemeResource ApplicationBackgroundBrush}" ExtendsContentIntoTitleBar="True" - WindowBackdropType="Mica" - WindowCornerPreference="Round" WindowStartupLocation="CenterScreen"> - - - + + + + + + + + + + @@ -32,8 +36,9 @@ - -