From 121296834a5aacb7f82d27063902914077f037e0 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> Date: Mon, 5 Dec 2022 17:04:18 -0500 Subject: [PATCH] Ava GUI: Several UI Fixes (#3991) * Fix accessability violations in ListView * Use accent colour for favourite star * Hide progress bar when its done * App Data Formating - Added space before storage unit - Changed so minutes have 0 decimals, and hours and days have 1 * Fix theming * Fix mismatched corner radius * Fix acceability violations in GridView * More consistency between Grid and List View * Fix margin * Let whitespace defocus controls --- Ryujinx.Ava/Assets/Styles/BaseDark.xaml | 2 + Ryujinx.Ava/Assets/Styles/BaseLight.xaml | 2 + Ryujinx.Ava/Ui/Applet/ErrorAppletWindow.axaml | 3 +- Ryujinx.Ava/Ui/Applet/SwkbdAppletDialog.axaml | 3 +- Ryujinx.Ava/Ui/Controls/GameGridView.axaml | 64 ++++++------------- Ryujinx.Ava/Ui/Controls/GameListView.axaml | 32 ++++------ Ryujinx.Ava/Ui/Controls/InputDialog.axaml | 3 +- .../Ui/Controls/NavigationDialogHost.axaml | 3 +- .../ProfileImageSelectionDialog.axaml | 3 +- Ryujinx.Ava/Ui/Controls/RendererHost.axaml | 3 +- Ryujinx.Ava/Ui/Controls/SaveManager.axaml | 3 +- .../Ui/Controls/UpdateWaitWindow.axaml | 3 +- Ryujinx.Ava/Ui/Controls/UserEditor.axaml | 3 +- Ryujinx.Ava/Ui/Controls/UserRecoverer.axaml | 3 +- Ryujinx.Ava/Ui/Controls/UserSelector.axaml | 3 +- .../Ui/ViewModels/MainWindowViewModel.cs | 11 ++-- Ryujinx.Ava/Ui/Windows/AboutWindow.axaml | 3 +- Ryujinx.Ava/Ui/Windows/AmiiboWindow.axaml | 3 +- Ryujinx.Ava/Ui/Windows/AvatarWindow.axaml | 3 +- Ryujinx.Ava/Ui/Windows/CheatWindow.axaml | 3 +- .../Windows/ContentDialogOverlayWindow.axaml | 3 +- .../Ui/Windows/ControllerSettingsWindow.axaml | 3 +- .../DownloadableContentManagerWindow.axaml | 3 +- Ryujinx.Ava/Ui/Windows/MainWindow.axaml | 3 +- .../Ui/Windows/MotionSettingsWindow.axaml | 3 +- .../Ui/Windows/RumbleSettingsWindow.axaml | 3 +- Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml | 3 +- .../Ui/Windows/TitleUpdateWindow.axaml | 3 +- Ryujinx.Ui.Common/App/ApplicationLibrary.cs | 10 +-- 29 files changed, 94 insertions(+), 96 deletions(-) diff --git a/Ryujinx.Ava/Assets/Styles/BaseDark.xaml b/Ryujinx.Ava/Assets/Styles/BaseDark.xaml index fbd4d4b37..8991808fd 100644 --- a/Ryujinx.Ava/Assets/Styles/BaseDark.xaml +++ b/Ryujinx.Ava/Assets/Styles/BaseDark.xaml @@ -58,5 +58,7 @@ #FFFFFFFF #FFFFFFFF #3D3D3D + #0FFFFFFF + #1EFFFFFF \ No newline at end of file diff --git a/Ryujinx.Ava/Assets/Styles/BaseLight.xaml b/Ryujinx.Ava/Assets/Styles/BaseLight.xaml index 45012c5b5..130d2bd4c 100644 --- a/Ryujinx.Ava/Assets/Styles/BaseLight.xaml +++ b/Ryujinx.Ava/Assets/Styles/BaseLight.xaml @@ -50,5 +50,7 @@ #FFFFFFFF #FF000000 #C1C1C1 + #b3ffffff + #80cccccc \ No newline at end of file diff --git a/Ryujinx.Ava/Ui/Applet/ErrorAppletWindow.axaml b/Ryujinx.Ava/Ui/Applet/ErrorAppletWindow.axaml index 9816dbec7..aae66ccca 100644 --- a/Ryujinx.Ava/Ui/Applet/ErrorAppletWindow.axaml +++ b/Ryujinx.Ava/Ui/Applet/ErrorAppletWindow.axaml @@ -11,7 +11,8 @@ Height="340" CanResize="False" SizeToContent="Height" - mc:Ignorable="d"> + mc:Ignorable="d" + Focusable="True"> + mc:Ignorable="d" + Focusable="True"> + mc:Ignorable="d" + Focusable="True"> @@ -113,8 +114,8 @@ + + - - - - - - - + CornerRadius="4"> + - - + - diff --git a/Ryujinx.Ava/Ui/Controls/GameListView.axaml b/Ryujinx.Ava/Ui/Controls/GameListView.axaml index 2c6022bde..b99bab440 100644 --- a/Ryujinx.Ava/Ui/Controls/GameListView.axaml +++ b/Ryujinx.Ava/Ui/Controls/GameListView.axaml @@ -10,7 +10,8 @@ xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" d:DesignHeight="450" d:DesignWidth="800" - mc:Ignorable="d"> + mc:Ignorable="d" + Focusable="True"> @@ -115,8 +116,8 @@ - - + + @@ -134,6 +135,12 @@ + + @@ -152,9 +159,6 @@ - - - + Spacing="5" > - diff --git a/Ryujinx.Ava/Ui/Controls/InputDialog.axaml b/Ryujinx.Ava/Ui/Controls/InputDialog.axaml index e665a8128..56f96f82a 100644 --- a/Ryujinx.Ava/Ui/Controls/InputDialog.axaml +++ b/Ryujinx.Ava/Ui/Controls/InputDialog.axaml @@ -4,7 +4,8 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - mc:Ignorable="d"> + mc:Ignorable="d" + Focusable="True"> + x:Class="Ryujinx.Ava.Ui.Controls.NavigationDialogHost" + Focusable="True"> \ No newline at end of file diff --git a/Ryujinx.Ava/Ui/Controls/ProfileImageSelectionDialog.axaml b/Ryujinx.Ava/Ui/Controls/ProfileImageSelectionDialog.axaml index 750edf8b0..7bbd03ca2 100644 --- a/Ryujinx.Ava/Ui/Controls/ProfileImageSelectionDialog.axaml +++ b/Ryujinx.Ava/Ui/Controls/ProfileImageSelectionDialog.axaml @@ -4,7 +4,8 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:Locale="clr-namespace:Ryujinx.Ava.Common.Locale" - x:Class="Ryujinx.Ava.Ui.Controls.ProfileImageSelectionDialog"> + x:Class="Ryujinx.Ava.Ui.Controls.ProfileImageSelectionDialog" + Focusable="True"> diff --git a/Ryujinx.Ava/Ui/Controls/RendererHost.axaml b/Ryujinx.Ava/Ui/Controls/RendererHost.axaml index 5b27182df..45bc1b2b8 100644 --- a/Ryujinx.Ava/Ui/Controls/RendererHost.axaml +++ b/Ryujinx.Ava/Ui/Controls/RendererHost.axaml @@ -3,5 +3,6 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" - x:Class="Ryujinx.Ava.Ui.Controls.RendererHost"> + x:Class="Ryujinx.Ava.Ui.Controls.RendererHost" + Focusable="True"> diff --git a/Ryujinx.Ava/Ui/Controls/SaveManager.axaml b/Ryujinx.Ava/Ui/Controls/SaveManager.axaml index ce337c7b4..8721d2a7b 100644 --- a/Ryujinx.Ava/Ui/Controls/SaveManager.axaml +++ b/Ryujinx.Ava/Ui/Controls/SaveManager.axaml @@ -9,7 +9,8 @@ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" Height="400" Width="550" - x:Class="Ryujinx.Ava.Ui.Controls.SaveManager"> + x:Class="Ryujinx.Ava.Ui.Controls.SaveManager" + Focusable="True"> diff --git a/Ryujinx.Ava/Ui/Controls/UpdateWaitWindow.axaml b/Ryujinx.Ava/Ui/Controls/UpdateWaitWindow.axaml index 247849adf..8309e3690 100644 --- a/Ryujinx.Ava/Ui/Controls/UpdateWaitWindow.axaml +++ b/Ryujinx.Ava/Ui/Controls/UpdateWaitWindow.axaml @@ -8,7 +8,8 @@ Title="Ryujinx - Waiting" SizeToContent="WidthAndHeight" WindowStartupLocation="CenterOwner" - mc:Ignorable="d"> + mc:Ignorable="d" + Focusable="True"> + mc:Ignorable="d" + Focusable="True"> diff --git a/Ryujinx.Ava/Ui/Controls/UserRecoverer.axaml b/Ryujinx.Ava/Ui/Controls/UserRecoverer.axaml index 6345ec674..0efb50190 100644 --- a/Ryujinx.Ava/Ui/Controls/UserRecoverer.axaml +++ b/Ryujinx.Ava/Ui/Controls/UserRecoverer.axaml @@ -10,7 +10,8 @@ xmlns:Locale="clr-namespace:Ryujinx.Ava.Common.Locale" xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" xmlns:viewModels="clr-namespace:Ryujinx.Ava.Ui.ViewModels" - x:Class="Ryujinx.Ava.Ui.Controls.UserRecoverer"> + x:Class="Ryujinx.Ava.Ui.Controls.UserRecoverer" + Focusable="True"> diff --git a/Ryujinx.Ava/Ui/Controls/UserSelector.axaml b/Ryujinx.Ava/Ui/Controls/UserSelector.axaml index bc6d8c09c..7cfdc481d 100644 --- a/Ryujinx.Ava/Ui/Controls/UserSelector.axaml +++ b/Ryujinx.Ava/Ui/Controls/UserSelector.axaml @@ -12,7 +12,8 @@ d:DesignHeight="450" MinWidth="500" d:DesignWidth="800" - mc:Ignorable="d"> + mc:Ignorable="d" + Focusable="True"> diff --git a/Ryujinx.Ava/Ui/ViewModels/MainWindowViewModel.cs b/Ryujinx.Ava/Ui/ViewModels/MainWindowViewModel.cs index c7053eb18..0db20792a 100644 --- a/Ryujinx.Ava/Ui/ViewModels/MainWindowViewModel.cs +++ b/Ryujinx.Ava/Ui/ViewModels/MainWindowViewModel.cs @@ -435,9 +435,7 @@ namespace Ryujinx.Ava.Ui.ViewModels OnPropertyChanged(); } } - - public Thickness GridItemPadding => ShowNames ? new Thickness() : new Thickness(5); - + public bool ShowMenuAndStatusBar { get => _showMenuAndStatusBar; @@ -599,7 +597,6 @@ namespace Ryujinx.Ava.Ui.ViewModels ConfigurationState.Instance.Ui.ShowNames.Value = value; OnPropertyChanged(); - OnPropertyChanged(nameof(GridItemPadding)); OnPropertyChanged(nameof(GridSizeScale)); ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath); @@ -716,7 +713,6 @@ namespace Ryujinx.Ava.Ui.ViewModels OnPropertyChanged(nameof(IsGridLarge)); OnPropertyChanged(nameof(IsGridHuge)); OnPropertyChanged(nameof(ShowNames)); - OnPropertyChanged(nameof(GridItemPadding)); ConfigurationState.Instance.ToFileFormat().SaveConfig(Program.ConfigurationPath); } @@ -780,6 +776,11 @@ namespace Ryujinx.Ava.Ui.ViewModels { _owner.LoadProgressBar.IsVisible = false; } + + if (e.NumAppsLoaded == e.NumAppsFound) + { + _owner.LoadProgressBar.IsVisible = false; + } }); } diff --git a/Ryujinx.Ava/Ui/Windows/AboutWindow.axaml b/Ryujinx.Ava/Ui/Windows/AboutWindow.axaml index 8f5e2d23d..f3e42eb7e 100644 --- a/Ryujinx.Ava/Ui/Windows/AboutWindow.axaml +++ b/Ryujinx.Ava/Ui/Windows/AboutWindow.axaml @@ -15,7 +15,8 @@ CanResize="False" SizeToContent="Width" WindowStartupLocation="CenterOwner" - mc:Ignorable="d"> + mc:Ignorable="d" + Focusable="True"> + MinWidth="600" + Focusable="True"> diff --git a/Ryujinx.Ava/Ui/Windows/AvatarWindow.axaml b/Ryujinx.Ava/Ui/Windows/AvatarWindow.axaml index 0be651300..a1099d1b5 100644 --- a/Ryujinx.Ava/Ui/Windows/AvatarWindow.axaml +++ b/Ryujinx.Ava/Ui/Windows/AvatarWindow.axaml @@ -11,7 +11,8 @@ xmlns:viewModels="clr-namespace:Ryujinx.Ava.Ui.ViewModels" xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls" x:CompileBindings="True" - x:DataType="viewModels:AvatarProfileViewModel"> + x:DataType="viewModels:AvatarProfileViewModel" + Focusable="True"> diff --git a/Ryujinx.Ava/Ui/Windows/CheatWindow.axaml b/Ryujinx.Ava/Ui/Windows/CheatWindow.axaml index 8d9116116..8d313d647 100644 --- a/Ryujinx.Ava/Ui/Windows/CheatWindow.axaml +++ b/Ryujinx.Ava/Ui/Windows/CheatWindow.axaml @@ -12,7 +12,8 @@ MinWidth="500" MinHeight="500" WindowStartupLocation="CenterOwner" - mc:Ignorable="d"> + mc:Ignorable="d" + Focusable="True">