mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
background colours for aero theme
This commit is contained in:
parent
f9a5e89d0e
commit
8004e7322a
@ -23,8 +23,8 @@
|
||||
WindowStyle="None"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<!-- Background is a hack to stop weirdness -->
|
||||
<Grid Background="#01ffffff">
|
||||
<!-- Background is for Aero theme only -->
|
||||
<Grid Background="{Binding Path=BackgroundColourBrush, Mode=OneTime}">
|
||||
<!-- Allow for drag -->
|
||||
<ui:TitleBar
|
||||
VerticalAlignment="Top"
|
||||
|
@ -25,7 +25,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
/// </summary>
|
||||
public partial class ProgressFluentDialog : IBootstrapperDialog
|
||||
{
|
||||
private readonly BootstrapperDialogViewModel _viewModel;
|
||||
private readonly ProgressFluentDialogViewModel _viewModel;
|
||||
|
||||
public Bloxstrap.Bootstrapper? Bootstrapper { get; set; }
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user