From 298de8e8dc2f522005ea55f8c255312a691f9b86 Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sat, 3 Feb 2024 21:08:32 +0000
Subject: [PATCH 01/14] add fluent progress dialog
---
Bloxstrap/Enums/BootstrapperStyle.cs | 3 +-
.../Bootstrapper/ProgressFluentDialog.xaml | 68 ++++++++++
.../Bootstrapper/ProgressFluentDialog.xaml.cs | 117 ++++++++++++++++++
Bloxstrap/UI/Frontend.cs | 1 +
.../BootstrapperDialogViewModel.cs | 6 +
5 files changed, 194 insertions(+), 1 deletion(-)
create mode 100644 Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
create mode 100644 Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs
diff --git a/Bloxstrap/Enums/BootstrapperStyle.cs b/Bloxstrap/Enums/BootstrapperStyle.cs
index 2d1b063..6b1d36b 100644
--- a/Bloxstrap/Enums/BootstrapperStyle.cs
+++ b/Bloxstrap/Enums/BootstrapperStyle.cs
@@ -7,6 +7,7 @@
LegacyDialog2011,
ProgressDialog,
FluentDialog,
- ByfronDialog
+ ByfronDialog,
+ ProgressFluentDialog,
}
}
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
new file mode 100644
index 0000000..77ccc24
--- /dev/null
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs
new file mode 100644
index 0000000..710682e
--- /dev/null
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs
@@ -0,0 +1,117 @@
+using Bloxstrap.UI.Elements.Bootstrapper.Base;
+using Bloxstrap.UI.ViewModels.Bootstrapper;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+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 System.Windows.Threading;
+
+namespace Bloxstrap.UI.Elements.Bootstrapper
+{
+ ///
+ /// Interaction logic for ProgressFluentDialog.xaml
+ ///
+ public partial class ProgressFluentDialog : IBootstrapperDialog
+ {
+ private readonly BootstrapperDialogViewModel _viewModel;
+
+ public Bloxstrap.Bootstrapper? Bootstrapper { get; set; }
+
+ private bool _isClosing;
+
+ #region UI Elements
+ public string Message
+ {
+ get => _viewModel.Message;
+ set
+ {
+ _viewModel.Message = value;
+ _viewModel.OnPropertyChanged(nameof(_viewModel.Message));
+ }
+ }
+
+ public ProgressBarStyle ProgressStyle
+ {
+ get => _viewModel.ProgressIndeterminate ? ProgressBarStyle.Marquee : ProgressBarStyle.Continuous;
+ set
+ {
+ _viewModel.ProgressIndeterminate = (value == ProgressBarStyle.Marquee);
+ _viewModel.OnPropertyChanged(nameof(_viewModel.ProgressIndeterminate));
+ }
+ }
+
+ public int ProgressMaximum
+ {
+ get => _viewModel.ProgressMaximum;
+ set
+ {
+ _viewModel.ProgressMaximum = value;
+ _viewModel.OnPropertyChanged(nameof(_viewModel.ProgressMaximum));
+ }
+ }
+
+ public int ProgressValue
+ {
+ get => _viewModel.ProgressValue;
+ set
+ {
+ _viewModel.ProgressValue = value;
+ _viewModel.OnPropertyChanged(nameof(_viewModel.ProgressValue));
+ }
+ }
+
+ public bool CancelEnabled
+ {
+ get => _viewModel.CancelEnabled;
+ set
+ {
+ _viewModel.CancelEnabled = value;
+
+ _viewModel.OnPropertyChanged(nameof(_viewModel.CancelButtonVisibility));
+ _viewModel.OnPropertyChanged(nameof(_viewModel.CancelEnabled));
+ }
+ }
+ #endregion
+
+ public ProgressFluentDialog()
+ {
+ InitializeComponent();
+ ApplyTheme();
+
+ _viewModel = new FluentDialogViewModel(this);
+ DataContext = _viewModel;
+ Title = App.Settings.Prop.BootstrapperTitle;
+ Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource();
+ }
+
+ private void UiWindow_Closing(object sender, CancelEventArgs e)
+ {
+ if (!_isClosing)
+ Bootstrapper?.CancelInstall();
+ }
+
+ #region IBootstrapperDialog Methods
+ public void ShowBootstrapper() => this.ShowDialog();
+
+ public void CloseBootstrapper()
+ {
+ _isClosing = true;
+ Dispatcher.BeginInvoke(this.Close);
+ }
+
+ public void ShowSuccess(string message, Action? callback) => BaseFunctions.ShowSuccess(message, callback);
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Bloxstrap/UI/Frontend.cs b/Bloxstrap/UI/Frontend.cs
index bce2d8a..d151115 100644
--- a/Bloxstrap/UI/Frontend.cs
+++ b/Bloxstrap/UI/Frontend.cs
@@ -57,6 +57,7 @@ namespace Bloxstrap.UI
BootstrapperStyle.ProgressDialog => new ProgressDialog(),
BootstrapperStyle.FluentDialog => new FluentDialog(),
BootstrapperStyle.ByfronDialog => new ByfronDialog(),
+ BootstrapperStyle.ProgressFluentDialog => new ProgressFluentDialog(),
_ => new FluentDialog()
};
}
diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs
index 2a5c523..27e21da 100644
--- a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs
+++ b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs
@@ -22,6 +22,12 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
public bool CancelEnabled { get; set; } = false;
public Visibility CancelButtonVisibility => CancelEnabled ? Visibility.Visible : Visibility.Collapsed;
+ [Obsolete("Do not use this! This is for the designer only.", true)]
+ public BootstrapperDialogViewModel()
+ {
+ _dialog = null!;
+ }
+
public BootstrapperDialogViewModel(IBootstrapperDialog dialog)
{
_dialog = dialog;
From fa53c2cc729b45f9ec88c018fae7c4460a398fe0 Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sat, 3 Feb 2024 21:13:58 +0000
Subject: [PATCH 02/14] Update wpfui
---
wpfui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wpfui b/wpfui
index 2a50f38..00bc84a 160000
--- a/wpfui
+++ b/wpfui
@@ -1 +1 @@
-Subproject commit 2a50f387e6c3b0a9160f3ce42bc95fbb7185e87d
+Subproject commit 00bc84a7419c5aebffd45530febad9cbe48783ed
From 4119792514b89f72da81d7a4f02c22531a319a91 Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sat, 3 Feb 2024 21:27:09 +0000
Subject: [PATCH 03/14] add aero
---
Bloxstrap/Enums/BootstrapperStyle.cs | 1 +
.../Bootstrapper/ProgressFluentDialog.xaml | 4 ++--
.../Bootstrapper/ProgressFluentDialog.xaml.cs | 4 ++--
Bloxstrap/UI/Frontend.cs | 3 ++-
.../ProgressFluentDialogViewModel.cs | 23 +++++++++++++++++++
5 files changed, 30 insertions(+), 5 deletions(-)
create mode 100644 Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
diff --git a/Bloxstrap/Enums/BootstrapperStyle.cs b/Bloxstrap/Enums/BootstrapperStyle.cs
index 6b1d36b..118f3d2 100644
--- a/Bloxstrap/Enums/BootstrapperStyle.cs
+++ b/Bloxstrap/Enums/BootstrapperStyle.cs
@@ -9,5 +9,6 @@
FluentDialog,
ByfronDialog,
ProgressFluentDialog,
+ ProgressFluentAeroDialog
}
}
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
index 77ccc24..74df835 100644
--- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
@@ -11,14 +11,14 @@
Width="520"
Height="280"
MinHeight="0"
- d:DataContext="{d:DesignInstance vms:BootstrapperDialogViewModel,
+ d:DataContext="{d:DesignInstance vms:ProgressFluentDialogViewModel,
IsDesignTimeCreatable=True}"
AllowsTransparency="True"
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
Closing="UiWindow_Closing"
ExtendsContentIntoTitleBar="True"
ResizeMode="NoResize"
- WindowBackdropType="Acrylic"
+ WindowBackdropType="{Binding Path=WindowBackdropType, Mode=OneTime}"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs
index 710682e..83405c8 100644
--- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs
@@ -85,12 +85,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
}
#endregion
- public ProgressFluentDialog()
+ public ProgressFluentDialog(bool aero)
{
InitializeComponent();
ApplyTheme();
- _viewModel = new FluentDialogViewModel(this);
+ _viewModel = new ProgressFluentDialogViewModel(this, aero);
DataContext = _viewModel;
Title = App.Settings.Prop.BootstrapperTitle;
Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource();
diff --git a/Bloxstrap/UI/Frontend.cs b/Bloxstrap/UI/Frontend.cs
index d151115..9ba7fad 100644
--- a/Bloxstrap/UI/Frontend.cs
+++ b/Bloxstrap/UI/Frontend.cs
@@ -57,7 +57,8 @@ namespace Bloxstrap.UI
BootstrapperStyle.ProgressDialog => new ProgressDialog(),
BootstrapperStyle.FluentDialog => new FluentDialog(),
BootstrapperStyle.ByfronDialog => new ByfronDialog(),
- BootstrapperStyle.ProgressFluentDialog => new ProgressFluentDialog(),
+ BootstrapperStyle.ProgressFluentDialog => new ProgressFluentDialog(false),
+ BootstrapperStyle.ProgressFluentAeroDialog => new ProgressFluentDialog(true),
_ => new FluentDialog()
};
}
diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
new file mode 100644
index 0000000..1f3d7b6
--- /dev/null
+++ b/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Wpf.Ui.Appearance;
+
+namespace Bloxstrap.UI.ViewModels.Bootstrapper
+{
+ public class ProgressFluentDialogViewModel : BootstrapperDialogViewModel
+ {
+ public BackgroundType WindowBackdropType { get; set; } = BackgroundType.Mica;
+
+ [Obsolete("Do not use this! This is for the designer only.", true)]
+ public ProgressFluentDialogViewModel() : base()
+ { }
+
+ public ProgressFluentDialogViewModel(IBootstrapperDialog dialog, bool aero) : base(dialog)
+ {
+ WindowBackdropType = aero ? BackgroundType.Aero : BackgroundType.Mica;
+ }
+ }
+}
From fce067ab4f2ed0daf05d586592ce8bd2050846b7 Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sat, 3 Feb 2024 21:47:54 +0000
Subject: [PATCH 04/14] fix aero windows freaking out
---
.../Bootstrapper/ProgressFluentDialog.xaml | 79 ++++++++++---------
1 file changed, 41 insertions(+), 38 deletions(-)
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
index 74df835..fc83537 100644
--- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
@@ -22,47 +22,50 @@
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
+
From 3f48c3069b09a388641856cb824bc5f1387e20f6 Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sat, 3 Feb 2024 23:27:02 +0000
Subject: [PATCH 05/14] better list of bootstrapper styles
---
Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs
index 8df58df..df430fb 100644
--- a/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs
+++ b/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs
@@ -65,7 +65,16 @@ namespace Bloxstrap.UI.ViewModels.Menu
}
}
- public IEnumerable Dialogs { get; } = Enum.GetValues(typeof(BootstrapperStyle)).Cast();
+ public IEnumerable Dialogs { get; } = new BootstrapperStyle[]
+ {
+ BootstrapperStyle.FluentDialog,
+ BootstrapperStyle.ProgressFluentDialog,
+ BootstrapperStyle.ProgressFluentAeroDialog,
+ BootstrapperStyle.ByfronDialog,
+ BootstrapperStyle.LegacyDialog2011,
+ BootstrapperStyle.LegacyDialog2008,
+ BootstrapperStyle.VistaDialog
+ };
public BootstrapperStyle Dialog
{
From bf2885429276d06b2057498bdf1bd2123d2b0ac4 Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sat, 3 Feb 2024 23:30:02 +0000
Subject: [PATCH 06/14] add translation strings
---
Bloxstrap/Resources/Strings.Designer.cs | 18 ++++++++++++++++++
Bloxstrap/Resources/Strings.resx | 6 ++++++
2 files changed, 24 insertions(+)
diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs
index d1ad1f1..4f01855 100644
--- a/Bloxstrap/Resources/Strings.Designer.cs
+++ b/Bloxstrap/Resources/Strings.Designer.cs
@@ -846,6 +846,24 @@ namespace Bloxstrap.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Fluent Progress (Aero).
+ ///
+ public static string Enums_BootstrapperStyle_ProgressFluentAeroDialog {
+ get {
+ return ResourceManager.GetString("Enums.BootstrapperStyle.ProgressFluentAeroDialog", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Fluent Progress.
+ ///
+ public static string Enums_BootstrapperStyle_ProgressFluentDialog {
+ get {
+ return ResourceManager.GetString("Enums.BootstrapperStyle.ProgressFluentDialog", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Vista (2008 - 2011).
///
diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx
index a8f5b58..afaea78 100644
--- a/Bloxstrap/Resources/Strings.resx
+++ b/Bloxstrap/Resources/Strings.resx
@@ -383,6 +383,12 @@ Your ReShade configuration files will still be saved, and you can locate them by
Progress (~2014)
+
+ Fluent Progress (Aero)
+
+
+ Fluent Progress
+
Vista (2008 - 2011)
From 150e3d6de41eaef22a09efb4537651755b66ac49 Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sun, 4 Feb 2024 00:32:43 +0000
Subject: [PATCH 07/14] add titlebar to progress fluent
---
.../UI/Elements/Bootstrapper/ProgressFluentDialog.xaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
index fc83537..f7e7f59 100644
--- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
@@ -22,8 +22,16 @@
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">
+
+
+
+
From 520f0bda48113eafaf2d1c758afca77d33fa21ab Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sun, 4 Feb 2024 12:47:18 +0000
Subject: [PATCH 08/14] move to selections
---
Bloxstrap/Extensions/BootstrapperStyleEx.cs | 11 +++++++++++
Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs | 11 +----------
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/Bloxstrap/Extensions/BootstrapperStyleEx.cs b/Bloxstrap/Extensions/BootstrapperStyleEx.cs
index b170629..0681e54 100644
--- a/Bloxstrap/Extensions/BootstrapperStyleEx.cs
+++ b/Bloxstrap/Extensions/BootstrapperStyleEx.cs
@@ -3,5 +3,16 @@
static class BootstrapperStyleEx
{
public static IBootstrapperDialog GetNew(this BootstrapperStyle bootstrapperStyle) => Frontend.GetBootstrapperDialog(bootstrapperStyle);
+
+ public static IReadOnlyCollection Selections => new BootstrapperStyle[]
+ {
+ BootstrapperStyle.FluentDialog,
+ BootstrapperStyle.ProgressFluentDialog,
+ BootstrapperStyle.ProgressFluentAeroDialog,
+ BootstrapperStyle.ByfronDialog,
+ BootstrapperStyle.LegacyDialog2011,
+ BootstrapperStyle.LegacyDialog2008,
+ BootstrapperStyle.VistaDialog
+ };
}
}
diff --git a/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs
index df430fb..2d8c94c 100644
--- a/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs
+++ b/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs
@@ -65,16 +65,7 @@ namespace Bloxstrap.UI.ViewModels.Menu
}
}
- public IEnumerable Dialogs { get; } = new BootstrapperStyle[]
- {
- BootstrapperStyle.FluentDialog,
- BootstrapperStyle.ProgressFluentDialog,
- BootstrapperStyle.ProgressFluentAeroDialog,
- BootstrapperStyle.ByfronDialog,
- BootstrapperStyle.LegacyDialog2011,
- BootstrapperStyle.LegacyDialog2008,
- BootstrapperStyle.VistaDialog
- };
+ public IEnumerable Dialogs { get; } = BootstrapperStyleEx.Selections;
public BootstrapperStyle Dialog
{
From 1de98fd8cc78665d962e0616b686b33a2dbb79dd Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sun, 4 Feb 2024 13:41:14 +0000
Subject: [PATCH 09/14] Update wpfui
---
wpfui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wpfui b/wpfui
index 00bc84a..8f61545 160000
--- a/wpfui
+++ b/wpfui
@@ -1 +1 @@
-Subproject commit 00bc84a7419c5aebffd45530febad9cbe48783ed
+Subproject commit 8f61545b386cc393f4502fb485cae9f052afbd46
From f9a5e89d0e6d56e41e25bcb2a4838d29f9ca612e Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sun, 4 Feb 2024 13:50:30 +0000
Subject: [PATCH 10/14] disable maximising
---
Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
index f7e7f59..306ff35 100644
--- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
@@ -28,6 +28,7 @@
From 8004e7322a63ad471fb746bdca4de5eb497be85a Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sun, 4 Feb 2024 15:03:42 +0000
Subject: [PATCH 11/14] background colours for aero theme
---
.../UI/Elements/Bootstrapper/ProgressFluentDialog.xaml | 4 ++--
.../UI/Elements/Bootstrapper/ProgressFluentDialog.xaml.cs | 2 +-
.../Bootstrapper/ProgressFluentDialogViewModel.cs | 7 +++++++
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
index 306ff35..d3b165a 100644
--- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
@@ -23,8 +23,8 @@
WindowStyle="None"
mc:Ignorable="d">
-
-
+
+
public partial class ProgressFluentDialog : IBootstrapperDialog
{
- private readonly BootstrapperDialogViewModel _viewModel;
+ private readonly ProgressFluentDialogViewModel _viewModel;
public Bloxstrap.Bootstrapper? Bootstrapper { get; set; }
diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
index 1f3d7b6..3f4a251 100644
--- a/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
+++ b/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Media;
using Wpf.Ui.Appearance;
namespace Bloxstrap.UI.ViewModels.Bootstrapper
@@ -10,6 +11,7 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
public class ProgressFluentDialogViewModel : BootstrapperDialogViewModel
{
public BackgroundType WindowBackdropType { get; set; } = BackgroundType.Mica;
+ public SolidColorBrush BackgroundColourBrush { get; set; } = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
[Obsolete("Do not use this! This is for the designer only.", true)]
public ProgressFluentDialogViewModel() : base()
@@ -18,6 +20,11 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
public ProgressFluentDialogViewModel(IBootstrapperDialog dialog, bool aero) : base(dialog)
{
WindowBackdropType = aero ? BackgroundType.Aero : BackgroundType.Mica;
+
+ if (aero)
+ BackgroundColourBrush = App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Light ?
+ new SolidColorBrush(Color.FromArgb(32, 255, 255, 255)) :
+ new SolidColorBrush(Color.FromArgb(32, 0, 0, 0));
}
}
}
From 65730fab19eb8ee6f8f0d1feef1e185355d6ad71 Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sun, 4 Feb 2024 15:23:13 +0000
Subject: [PATCH 12/14] move alpha to a constant
---
.../Bootstrapper/ProgressFluentDialogViewModel.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
index 3f4a251..fa8ff8d 100644
--- a/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
+++ b/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
@@ -19,12 +19,14 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
public ProgressFluentDialogViewModel(IBootstrapperDialog dialog, bool aero) : base(dialog)
{
+ const int alpha = 32;
+
WindowBackdropType = aero ? BackgroundType.Aero : BackgroundType.Mica;
if (aero)
BackgroundColourBrush = App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Light ?
- new SolidColorBrush(Color.FromArgb(32, 255, 255, 255)) :
- new SolidColorBrush(Color.FromArgb(32, 0, 0, 0));
+ new SolidColorBrush(Color.FromArgb(alpha, 255, 255, 255)) :
+ new SolidColorBrush(Color.FromArgb(alpha, 0, 0, 0));
}
}
}
From 1f46439e32f7ad6573edf3b787d3326a21830aaa Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sun, 4 Feb 2024 15:40:30 +0000
Subject: [PATCH 13/14] better colours & alpha
---
.../Bootstrapper/ProgressFluentDialogViewModel.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
index fa8ff8d..9290714 100644
--- a/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
+++ b/Bloxstrap/UI/ViewModels/Bootstrapper/ProgressFluentDialogViewModel.cs
@@ -19,14 +19,14 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
public ProgressFluentDialogViewModel(IBootstrapperDialog dialog, bool aero) : base(dialog)
{
- const int alpha = 32;
+ const int alpha = 128;
WindowBackdropType = aero ? BackgroundType.Aero : BackgroundType.Mica;
if (aero)
BackgroundColourBrush = App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Light ?
- new SolidColorBrush(Color.FromArgb(alpha, 255, 255, 255)) :
- new SolidColorBrush(Color.FromArgb(alpha, 0, 0, 0));
+ new SolidColorBrush(Color.FromArgb(alpha, 225, 225, 225)) :
+ new SolidColorBrush(Color.FromArgb(alpha, 30, 30, 30));
}
}
}
From c37d12cde7ce33b4bc5183387ffe9ac5bd3406d2 Mon Sep 17 00:00:00 2001
From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com>
Date: Sun, 4 Feb 2024 16:29:14 +0000
Subject: [PATCH 14/14] make fluent progress less rectangular
---
Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
index d3b165a..c80cef3 100644
--- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
+++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressFluentDialog.xaml
@@ -8,7 +8,7 @@
xmlns:resources="clr-namespace:Bloxstrap.Resources"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:vms="clr-namespace:Bloxstrap.UI.ViewModels.Bootstrapper"
- Width="520"
+ Width="500"
Height="280"
MinHeight="0"
d:DataContext="{d:DesignInstance vms:ProgressFluentDialogViewModel,