Visual fixes and improvements

One weird bug
This commit is contained in:
Isaac Marovitz 2023-05-19 10:08:24 -04:00 committed by Isaac Marovitz
parent 7dddee5971
commit b9cf223d86
3 changed files with 28 additions and 26 deletions

View file

@ -24,6 +24,7 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
{ {
_isLeft = value; _isLeft = value;
OnPropertyChanged(); OnPropertyChanged();
OnPropertyChanged(nameof(HasSides));
} }
} }
@ -35,9 +36,12 @@ namespace Ryujinx.Ava.UI.ViewModels.Input
{ {
_isRight = value; _isRight = value;
OnPropertyChanged(); OnPropertyChanged();
OnPropertyChanged(nameof(HasSides));
} }
} }
public bool HasSides => IsLeft ^ IsRight;
private SvgImage _image; private SvgImage _image;
public SvgImage Image public SvgImage Image
{ {

View file

@ -316,6 +316,13 @@
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<!-- Controller Picture -->
<Image
Margin="0,10"
MaxHeight="300"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Source="{Binding Image}" />
<Border <Border
BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderBrush="{DynamicResource ThemeControlBorderColor}"
BorderThickness="1" BorderThickness="1"
@ -346,7 +353,7 @@
Margin="0,4,0,0" Margin="0,4,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !IsRight}" IsVisible="{Binding IsLeft}"
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <TextBlock
Width="20" Width="20"
@ -364,7 +371,7 @@
Margin="0,4,0,0" Margin="0,4,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !IsRight}" IsVisible="{Binding IsLeft}"
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <TextBlock
Width="20" Width="20"
@ -382,7 +389,7 @@
Margin="0,4,0,0" Margin="0,4,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !IsLeft}" IsVisible="{Binding IsRight}"
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <TextBlock
Width="20" Width="20"
@ -400,7 +407,7 @@
Margin="0,4,0,0" Margin="0,4,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !IsLeft}" IsVisible="{Binding IsRight}"
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <TextBlock
Width="20" Width="20"
@ -416,13 +423,6 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Border> </Border>
<!-- Controller Picture -->
<Image
Margin="0,10,0,0"
MaxHeight="300"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Source="{Binding Image}" />
<!-- Motion + Rumble --> <!-- Motion + Rumble -->
<StackPanel <StackPanel
Margin="0,10,0,0" Margin="0,10,0,0"

View file

@ -311,22 +311,27 @@
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch">
<!-- Controller Picture -->
<Image
Margin="0,10"
MaxHeight="300"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Source="{Binding Image}" />
<Border <Border
BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderBrush="{DynamicResource ThemeControlBorderColor}"
BorderThickness="1" BorderThickness="1"
CornerRadius="5" CornerRadius="5"
MinHeight="90"> MinHeight="90"
IsVisible="{Binding HasSides}">
<StackPanel <StackPanel
Margin="8" Margin="8"
Orientation="Vertical"> Orientation="Vertical">
<TextBlock
HorizontalAlignment="Center"
Text="{locale:Locale ControllerSettingsTriggerThreshold}" />
<StackPanel <StackPanel
Margin="0,4,0,0" Margin="0,4,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !IsRight}" IsVisible="{Binding IsLeft}"
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <TextBlock
Width="20" Width="20"
@ -344,7 +349,7 @@
Margin="0,4,0,0" Margin="0,4,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !IsRight}" IsVisible="{Binding IsLeft}"
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <TextBlock
Width="20" Width="20"
@ -362,7 +367,7 @@
Margin="0,4,0,0" Margin="0,4,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !IsLeft}" IsVisible="{Binding IsRight}"
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <TextBlock
Width="20" Width="20"
@ -380,7 +385,7 @@
Margin="0,4,0,0" Margin="0,4,0,0"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !IsLeft}" IsVisible="{Binding IsRight}"
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <TextBlock
Width="20" Width="20"
@ -396,13 +401,6 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Border> </Border>
<!-- Controller Picture -->
<Image
Margin="0,10,0,0"
MaxHeight="300"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Source="{Binding Image}" />
</StackPanel> </StackPanel>
<!-- Right Controls --> <!-- Right Controls -->
<StackPanel <StackPanel