diff --git a/src/NebulaAuth/Components/DialogHeader.xaml b/src/NebulaAuth/Components/DialogHeader.xaml new file mode 100644 index 0000000..39f64a7 --- /dev/null +++ b/src/NebulaAuth/Components/DialogHeader.xaml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/NebulaAuth/Components/DialogHeader.xaml.cs b/src/NebulaAuth/Components/DialogHeader.xaml.cs new file mode 100644 index 0000000..5adf9dd --- /dev/null +++ b/src/NebulaAuth/Components/DialogHeader.xaml.cs @@ -0,0 +1,63 @@ +using System.Windows; +using System.Windows.Controls; +using MaterialDesignThemes.Wpf; + +namespace NebulaAuth; + +public partial class DialogHeader : UserControl +{ + public static readonly DependencyProperty IconKindProperty = + DependencyProperty.Register(nameof(IconKind), typeof(PackIconKind), typeof(DialogHeader), + new PropertyMetadata(PackIconKind.None)); + + public static readonly DependencyProperty TitleProperty = + DependencyProperty.Register(nameof(Title), typeof(string), typeof(DialogHeader), + new PropertyMetadata(null)); + + public static readonly DependencyProperty TitleAccentProperty = + DependencyProperty.Register(nameof(TitleAccent), typeof(string), typeof(DialogHeader), + new PropertyMetadata(null)); + + public static readonly DependencyProperty CloseParameterProperty = + DependencyProperty.Register(nameof(CloseParameter), typeof(object), typeof(DialogHeader), + new PropertyMetadata(null)); + + public static readonly DependencyProperty IsCloseEnabledProperty = + DependencyProperty.Register(nameof(IsCloseEnabled), typeof(bool), typeof(DialogHeader), + new PropertyMetadata(true)); + + public PackIconKind IconKind + { + get => (PackIconKind) GetValue(IconKindProperty); + set => SetValue(IconKindProperty, value); + } + + public string? Title + { + get => (string?) GetValue(TitleProperty); + set => SetValue(TitleProperty, value); + } + + public string? TitleAccent + { + get => (string?) GetValue(TitleAccentProperty); + set => SetValue(TitleAccentProperty, value); + } + + public object? CloseParameter + { + get => GetValue(CloseParameterProperty); + set => SetValue(CloseParameterProperty, value); + } + + public bool IsCloseEnabled + { + get => (bool) GetValue(IsCloseEnabledProperty); + set => SetValue(IsCloseEnabledProperty, value); + } + + public DialogHeader() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/src/NebulaAuth/MainWindow.xaml b/src/NebulaAuth/MainWindow.xaml index 47654ed..28ee118 100644 --- a/src/NebulaAuth/MainWindow.xaml +++ b/src/NebulaAuth/MainWindow.xaml @@ -42,6 +42,7 @@ DialogClosed="DialogHost_DialogClosed" ApplyBlurBackground="{Binding Settings.ApplyBlurBackground}" BlurRadius="12" + DialogContentUniformCornerRadius="12" x:Name="DialogHostInstance"> diff --git a/src/NebulaAuth/Theme/WindowStyle/WindowStyle.xaml b/src/NebulaAuth/Theme/WindowStyle/WindowStyle.xaml index c17a41b..0a74beb 100644 --- a/src/NebulaAuth/Theme/WindowStyle/WindowStyle.xaml +++ b/src/NebulaAuth/Theme/WindowStyle/WindowStyle.xaml @@ -36,7 +36,8 @@ + Orientation="Horizontal" + TextElement.Foreground="{DynamicResource PrimaryContentBrush}"> - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - + + @@ -233,8 +213,8 @@ - - - - + + Grid.Row="2" Margin="20" Content="{Binding CurrentStep}" /> \ No newline at end of file diff --git a/src/NebulaAuth/View/ProxyManagerView.xaml b/src/NebulaAuth/View/ProxyManagerView.xaml index 0497079..8266353 100644 --- a/src/NebulaAuth/View/ProxyManagerView.xaml +++ b/src/NebulaAuth/View/ProxyManagerView.xaml @@ -20,34 +20,14 @@ FontSize="16"> - - - - - - - - - - - - - - + - diff --git a/src/NebulaAuth/View/SetAccountPasswordsView.xaml b/src/NebulaAuth/View/SetAccountPasswordsView.xaml index 2feda85..2f72e30 100644 --- a/src/NebulaAuth/View/SetAccountPasswordsView.xaml +++ b/src/NebulaAuth/View/SetAccountPasswordsView.xaml @@ -20,7 +20,6 @@ FontSize="16"> - @@ -29,36 +28,10 @@ - - - - - - - - - - - - - - - - + - + @@ -109,7 +82,7 @@ - - - - - + + Style="{StaticResource MaterialDesignUniformTabControl}" Grid.Row="1">