From 3edbcf37b440a0e6e83f4e1a36dce1f0ea827a06 Mon Sep 17 00:00:00 2001 From: Eviral Date: Tue, 26 Dec 2023 21:26:14 +0100 Subject: [PATCH] All themed controls now have a nice looking tab navigation focus adorner style + misc fixes --- .../Accents/BaseColorsPalette.xaml | 8 +- .../Accents/SystemAccentColors.cs | 2 +- .../Avalonia.Themes.Neumorphism.csproj | 2 +- .../ColorPaletteResources.Properties.cs | 4 +- .../Dialogs/Styles/AlertDialogControl.axaml | 5 +- .../Themes/AdornerLayer.xaml | 4 +- .../Themes/ButtonSpinner.xaml | 14 +- .../Themes/CalendarDatePicker.xaml | 203 +++++++++--------- Avalonia.Themes.Neumorphism/Themes/Card.xaml | 2 +- .../Themes/ComboBox.xaml | 44 +++- .../Themes/ComboBoxItem.xaml | 2 +- .../Themes/ListBox.xaml | 116 +++++++--- .../Themes/ListBoxItem.xaml | 29 ++- .../Themes/MenuItem.xaml | 10 +- .../Themes/NumericUpDown.xaml | 98 ++------- .../Themes/RadioButton.xaml | 22 +- .../Themes/Slider.xaml | 48 ++++- .../Themes/TabItem.xaml | 15 +- .../Themes/TextBlock.xaml | 2 + .../Themes/TextBox.xaml | 58 +++-- .../Themes/TimePicker.xaml | 16 +- Neumorphism.Avalonia.Demo/App.axaml | 13 -- .../Pages/ComboBoxesDemo.axaml | 29 +-- .../Pages/ComboBoxesDemo.axaml.cs | 3 +- .../Pages/FieldsDemo.axaml | 45 ++-- .../Pages/IconsDemo.axaml | 4 +- .../Pages/ListsDemo.axaml | 18 +- .../Pages/MenusDemo.axaml | 28 ++- .../ViewModels/DialogsDemoViewModel.cs | 9 +- .../Windows/Dialogs/CustomFormDialog.axaml | 10 +- .../Dialogs/CustomSettingsDialog.axaml | 21 +- .../Dialogs/CustomFormDialogViewModel.cs | 6 +- 32 files changed, 505 insertions(+), 385 deletions(-) diff --git a/Avalonia.Themes.Neumorphism/Accents/BaseColorsPalette.xaml b/Avalonia.Themes.Neumorphism/Accents/BaseColorsPalette.xaml index d2c5956..54449c4 100644 --- a/Avalonia.Themes.Neumorphism/Accents/BaseColorsPalette.xaml +++ b/Avalonia.Themes.Neumorphism/Accents/BaseColorsPalette.xaml @@ -46,7 +46,7 @@ #89000000 #BC000000 #89000000 - #FFCFD4DA + #89000000 #1F000000 #44888b8f @@ -68,6 +68,8 @@ #CCFFFFFF #33000000 #66C4C7CB + #FFCFD4DA + #FFD3D8DE #00FFFFFF #CCCCCCCC @@ -121,7 +123,7 @@ #89FFFFFF #BCFFFFFF #89FFFFFF - #FF647076 + #89FFFFFF #1FFFFFFF #44888b8f @@ -143,6 +145,8 @@ #22FFFFFF #88000000 #FF404548 + #FF647076 + #FF42464A #00FFFFFF #44333333 diff --git a/Avalonia.Themes.Neumorphism/Accents/SystemAccentColors.cs b/Avalonia.Themes.Neumorphism/Accents/SystemAccentColors.cs index d089208..24397d6 100644 --- a/Avalonia.Themes.Neumorphism/Accents/SystemAccentColors.cs +++ b/Avalonia.Themes.Neumorphism/Accents/SystemAccentColors.cs @@ -41,7 +41,7 @@ internal class SystemAccentColors : IResourceProvider public const string MaterialDesignBodyLightKey = "MaterialDesignBodyLight"; public const string MaterialDesignColumnHeaderKey = "MaterialDesignColumnHeader"; public const string MaterialDesignCheckBoxOffKey = "MaterialDesignCheckBoxOff"; - public const string MaterialDesignCheckBoxDisabledKey = "MaterialDesignCheckBoxDisabled"; + public const string MaterialDesignDisabledKey = "MaterialDesignDisabled"; public const string MaterialDesignTextBoxBorderKey = "MaterialDesignTextBoxBorder"; public const string MaterialDesignDividerKey = "MaterialDesignDivider"; public const string MaterialDesignSelectionKey = "MaterialDesignSelection"; diff --git a/Avalonia.Themes.Neumorphism/Avalonia.Themes.Neumorphism.csproj b/Avalonia.Themes.Neumorphism/Avalonia.Themes.Neumorphism.csproj index bc0ae05..2288b7c 100644 --- a/Avalonia.Themes.Neumorphism/Avalonia.Themes.Neumorphism.csproj +++ b/Avalonia.Themes.Neumorphism/Avalonia.Themes.Neumorphism.csproj @@ -1,7 +1,7 @@  netstandard2.1 - 0.9.0 + 0.10.0 Neumorphism.Avalonia Eviral Eviral diff --git a/Avalonia.Themes.Neumorphism/ColorPaletteResources.Properties.cs b/Avalonia.Themes.Neumorphism/ColorPaletteResources.Properties.cs index 2c8ef85..103462c 100644 --- a/Avalonia.Themes.Neumorphism/ColorPaletteResources.Properties.cs +++ b/Avalonia.Themes.Neumorphism/ColorPaletteResources.Properties.cs @@ -213,9 +213,9 @@ public Color Accent public Color MaterialDesignCheckBoxOff { get => GetColor("MaterialDesignCheckBoxOff"); set => SetColor("MaterialDesignCheckBoxOff", value); } /// - /// Gets or sets the MaterialDesignCheckBoxDisabled color value. + /// Gets or sets the MaterialDesignDisabled color value. /// - public Color MaterialDesignCheckBoxDisabled { get => GetColor("MaterialDesignCheckBoxDisabled"); set => SetColor("MaterialDesignCheckBoxDisabled", value); } + public Color MaterialDesignDisabled { get => GetColor("MaterialDesignDisabled"); set => SetColor("MaterialDesignDisabled", value); } /// /// Gets or sets the MaterialDesignTextBoxBorder color value. diff --git a/Avalonia.Themes.Neumorphism/Dialogs/Styles/AlertDialogControl.axaml b/Avalonia.Themes.Neumorphism/Dialogs/Styles/AlertDialogControl.axaml index a07652d..30fecb2 100644 --- a/Avalonia.Themes.Neumorphism/Dialogs/Styles/AlertDialogControl.axaml +++ b/Avalonia.Themes.Neumorphism/Dialogs/Styles/AlertDialogControl.axaml @@ -34,7 +34,10 @@ - @@ -271,14 +271,14 @@ - - diff --git a/Neumorphism.Avalonia.Demo/Pages/ListsDemo.axaml b/Neumorphism.Avalonia.Demo/Pages/ListsDemo.axaml index 1c02961..a824579 100644 --- a/Neumorphism.Avalonia.Demo/Pages/ListsDemo.axaml +++ b/Neumorphism.Avalonia.Demo/Pages/ListsDemo.axaml @@ -23,19 +23,16 @@ - - + - - - + + + - - - + + + @@ -351,7 +361,7 @@ - + CreateImageDialog() var dialog = DialogHelper.CreateCommonDialog(new CommonDialogBuilderParams { - ContentHeader = "Welcome to use Material.Avalonia", - SupportingText = "Enjoy Material Design in AvaloniaUI!", + ContentHeader = "Sample title with image icon", + SupportingText = "Sample sub title, choose what you want...", StartupLocation = WindowStartupLocation.CenterOwner, Borderless = true, + Width = 500, DialogIcon = new Bitmap(icon), CenterDialogButtons = new[] { new DialogButton { - Content = "READ MORE", - Result = "read_more" + Content = "OK", + Result = "ok" } } }); diff --git a/Neumorphism.Avalonia.Demo/Windows/Dialogs/CustomFormDialog.axaml b/Neumorphism.Avalonia.Demo/Windows/Dialogs/CustomFormDialog.axaml index e9cd3d5..227eb16 100644 --- a/Neumorphism.Avalonia.Demo/Windows/Dialogs/CustomFormDialog.axaml +++ b/Neumorphism.Avalonia.Demo/Windows/Dialogs/CustomFormDialog.axaml @@ -27,7 +27,7 @@ - @@ -63,17 +63,17 @@ assist:ShadowAssist.ShadowDepth="Depth5" Mode="Standard" Background="Transparent"> - - - - - - - - - - - - diff --git a/Neumorphism.Avalonia.Demo/Windows/ViewModels/Dialogs/CustomFormDialogViewModel.cs b/Neumorphism.Avalonia.Demo/Windows/ViewModels/Dialogs/CustomFormDialogViewModel.cs index 3095fd9..71f8901 100644 --- a/Neumorphism.Avalonia.Demo/Windows/ViewModels/Dialogs/CustomFormDialogViewModel.cs +++ b/Neumorphism.Avalonia.Demo/Windows/ViewModels/Dialogs/CustomFormDialogViewModel.cs @@ -115,9 +115,9 @@ public CustomFormDialogViewModel(CustomFormDialog dialog) : base(dialog) { Civilities = [ - new KeyValuePair(1, "Mr"), - new KeyValuePair(2, "Mme"), - new KeyValuePair(3, "Melle"), + new KeyValuePair(1, "Mr."), + new KeyValuePair(2, "Ms."), + new KeyValuePair(3, "Miss") ]; ButtonOk = new ObsoleteDialogButtonViewModel(this, "OK", "ok");