From e0544dd9c74e86cca6ee37c4d521d2d07f9ccdcc Mon Sep 17 00:00:00 2001 From: Nico Date: Thu, 11 May 2023 23:10:57 +0200 Subject: [PATCH] UI: Adjust input mapping view (#4866) * refactor: clean up controller settings ui - Remove inconsistencies between left and right side - Use style to set ToggleButton properties (since they are all the same) - Move topmost controller settings from one line to 2x2 grid for improved clarity - Properly adjust borders, text widths, etc. to neighboring elements to eliminate misaligned visual lines * fix: merge issues * fix: prevent sliders from jumping by giving text block fixed width * refactor: add more separators and increase margin * refactor: center deadzone and range descriptions * refactor: move rumble border top margin to -1 and prevent double border * refactor: remove margins & double borders + switch profile & input selection * style: apply suggestions from code review Co-authored-by: Ac_K --------- Co-authored-by: Ac_K --- .../UI/Windows/ControllerSettingsWindow.axaml | 715 ++++++++---------- 1 file changed, 334 insertions(+), 381 deletions(-) diff --git a/src/Ryujinx.Ava/UI/Windows/ControllerSettingsWindow.axaml b/src/Ryujinx.Ava/UI/Windows/ControllerSettingsWindow.axaml index 8a4d22ffa4..1a11a8ff30 100644 --- a/src/Ryujinx.Ava/UI/Windows/ControllerSettingsWindow.axaml +++ b/src/Ryujinx.Ava/UI/Windows/ControllerSettingsWindow.axaml @@ -21,35 +21,54 @@ + + + + - + - - - + + + + + + + - + + HorizontalAlignment="Stretch" + VerticalAlignment="Center"> + + + + @@ -59,69 +78,147 @@ - + - - + - - - - - - - - - - - - - + Grid.Row="1" + Grid.Column="0" + Margin="0,-1,0,0" + BorderBrush="{DynamicResource ThemeControlBorderColor}" + BorderThickness="1" + Padding="2"> - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -133,64 +230,6 @@ - - - - - - - - - - - @@ -206,7 +245,7 @@ @@ -221,7 +260,8 @@ Grid.Row="0" BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderThickness="1" - IsVisible="{Binding IsLeft}"> + IsVisible="{Binding IsLeft}" + MinHeight="90"> @@ -232,7 +272,6 @@ - + @@ -263,19 +299,15 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsTriggerL}" TextAlignment="Center" /> - + - + @@ -301,7 +330,8 @@ Grid.Row="1" BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderThickness="1" - IsVisible="{Binding IsLeft}"> + IsVisible="{Binding IsLeft}" + Margin="0,5,0,0"> - + @@ -339,10 +366,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsLStickUp}" TextAlignment="Center" /> - + @@ -358,10 +382,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsLStickDown}" TextAlignment="Center" /> - + @@ -377,10 +398,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsLStickLeft}" TextAlignment="Center" /> - + @@ -396,10 +414,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsLStickRight}" TextAlignment="Center" /> - + @@ -419,10 +434,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsLStickButton}" TextAlignment="Center" /> - + @@ -438,16 +450,13 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsLStickStick}" TextAlignment="Center" /> - + + @@ -457,9 +466,11 @@ - + - + - + @@ -502,7 +517,8 @@ BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderThickness="1" VerticalAlignment="Top" - IsVisible="{Binding IsLeft}"> + IsVisible="{Binding IsLeft}" + Margin="0,5,0,0"> - + - + BorderThickness="1" MinHeight="90"> + - + - + @@ -641,10 +648,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsLeftSL}" TextAlignment="Center" /> - + @@ -663,10 +667,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsRightSR}" TextAlignment="Center" /> - + @@ -685,10 +686,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsRightSL}" TextAlignment="Center" /> - + @@ -702,14 +700,15 @@ Margin="0,10,0,0" MaxHeight="250" HorizontalAlignment="Stretch" - VerticalAlignment="Top" + VerticalAlignment="Stretch" Source="{Binding Image}" /> - + @@ -733,7 +732,8 @@ BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderThickness="1" HorizontalAlignment="Stretch" - IsVisible="{Binding IsController}"> + IsVisible="{Binding IsController}" + Margin="0,-1,0,0"> @@ -756,7 +756,7 @@ @@ -770,165 +770,99 @@ Grid.Row="0" BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderThickness="1" - IsVisible="{Binding IsRight}"> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + Text="{locale:Locale ControllerSettingsTriggerZR}" + TextAlignment="Center" /> + - - - - - + + + + Text="{locale:Locale ControllerSettingsTriggerR}" + TextAlignment="Center" /> + - - - - - - + + + + + + + + + + IsVisible="{Binding IsRight}" + Margin="0,5,0,0"> - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -936,26 +870,59 @@ - + - + + + + + + + + + + + + + + + + IsVisible="{Binding IsRight}" + Margin="0,5,0,0"> - + @@ -1001,10 +966,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsRStickUp}" TextAlignment="Center" /> - + @@ -1020,10 +982,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsRStickDown}" TextAlignment="Center" /> - + @@ -1039,10 +998,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsRStickLeft}" TextAlignment="Center" /> - + @@ -1058,10 +1014,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsRStickRight}" TextAlignment="Center" /> - + @@ -1081,10 +1034,7 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsRStickButton}" TextAlignment="Center" /> - + @@ -1101,16 +1051,13 @@ VerticalAlignment="Center" Text="{locale:Locale ControllerSettingsRStickStick}" TextAlignment="Center" /> - + + @@ -1120,9 +1067,11 @@ - + - + - +