aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Ava/Ui/Controls/UserEditor.axaml
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2022-07-28 19:16:23 +0200
committerGitHub <noreply@github.com>2022-07-28 14:16:23 -0300
commit8cfec5de4bde7087734beb2f7203f0d930e1b2d8 (patch)
tree1305b1e5a345f8e7d9a0f6d464948aa064749c30 /Ryujinx.Ava/Ui/Controls/UserEditor.axaml
parent37b6e081da6acb6d0ecbe34385d4e09b1ffca5b7 (diff)
Avalonia: Cleanup UserEditor a bit (#3492)
This PR cleanup the UserEditor code a bit, 2 texts are added for "Name" and "User Id", because when you create a new profile, the textbox is empty without any hints. `axaml` files are autoformated too.
Diffstat (limited to 'Ryujinx.Ava/Ui/Controls/UserEditor.axaml')
-rw-r--r--Ryujinx.Ava/Ui/Controls/UserEditor.axaml106
1 files changed, 69 insertions, 37 deletions
diff --git a/Ryujinx.Ava/Ui/Controls/UserEditor.axaml b/Ryujinx.Ava/Ui/Controls/UserEditor.axaml
index fed5f8cb..90c5c1fe 100644
--- a/Ryujinx.Ava/Ui/Controls/UserEditor.axaml
+++ b/Ryujinx.Ava/Ui/Controls/UserEditor.axaml
@@ -1,55 +1,87 @@
-<UserControl xmlns="https://github.com/avaloniaui"
- 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"
- Padding="0"
- Margin="0"
- xmlns:Locale="clr-namespace:Ryujinx.Ava.Common.Locale"
- xmlns:viewModels="clr-namespace:Ryujinx.Ava.Ui.ViewModels"
- xmlns:models="clr-namespace:Ryujinx.Ava.Ui.Models"
- xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls"
- xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
- x:Class="Ryujinx.Ava.Ui.Controls.UserEditor">
+<UserControl
+ x:Class="Ryujinx.Ava.Ui.Controls.UserEditor"
+ xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:Locale="clr-namespace:Ryujinx.Ava.Common.Locale"
+ xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:models="clr-namespace:Ryujinx.Ava.Ui.Models"
+ xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
+ xmlns:viewModels="clr-namespace:Ryujinx.Ava.Ui.ViewModels"
+ Margin="0"
+ Padding="0"
+ mc:Ignorable="d">
<UserControl.Resources>
<controls:BitmapArrayValueConverter x:Key="ByteImage" />
</UserControl.Resources>
<Grid Margin="0">
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition/>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
- <StackPanel Orientation="Vertical" VerticalAlignment="Stretch" HorizontalAlignment="Left">
+ <StackPanel
+ HorizontalAlignment="Left"
+ VerticalAlignment="Stretch"
+ Orientation="Vertical">
<Image
+ Name="ProfileImage"
+ Width="96"
+ Height="96"
Margin="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
- Height="96" Width="96"
- Name="ProfileImage"
Source="{Binding Image, Converter={StaticResource ByteImage}}" />
- <Button Margin="5" Content="{Locale:Locale UserProfilesChangeProfileImage}"
- Name="ChangePictureButton"
- Click="ChangePictureButton_Click"
- HorizontalAlignment="Stretch"/>
- <Button Margin="5" Content="{Locale:Locale UserProfilesSetProfileImage}"
- Name="AddPictureButton"
- Click="ChangePictureButton_Click"
- HorizontalAlignment="Stretch"/>
+ <Button
+ Name="ChangePictureButton"
+ Margin="5"
+ HorizontalAlignment="Stretch"
+ Click="ChangePictureButton_Click"
+ Content="{Locale:Locale UserProfilesChangeProfileImage}" />
+ <Button
+ Name="AddPictureButton"
+ Margin="5"
+ HorizontalAlignment="Stretch"
+ Click="ChangePictureButton_Click"
+ Content="{Locale:Locale UserProfilesSetProfileImage}" />
</StackPanel>
- <StackPanel Grid.Row="0" Orientation="Vertical" HorizontalAlignment="Stretch" Grid.Column="1" Spacing="10"
- Margin="5, 10">
- <TextBox Name="NameBox" Width="300" Text="{Binding Name}" MaxLength="{Binding MaxProfileNameLength}"
- HorizontalAlignment="Stretch" />
- <TextBlock Text="{Binding UserId}" Name="IdLabel" />
+ <StackPanel
+ Grid.Row="0"
+ Grid.Column="1"
+ Margin="5,10"
+ HorizontalAlignment="Stretch"
+ Orientation="Vertical"
+ Spacing="10">
+ <TextBlock Text="{Locale:Locale UserProfilesName}" />
+ <TextBox
+ Name="NameBox"
+ Width="300"
+ HorizontalAlignment="Stretch"
+ MaxLength="{Binding MaxProfileNameLength}"
+ Text="{Binding Name}" />
+ <TextBlock Text="{Locale:Locale UserProfilesUserId}" />
+ <TextBlock Name="IdLabel" Text="{Binding UserId}" />
</StackPanel>
- <StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Orientation="Horizontal" Spacing="10" HorizontalAlignment="Right">
- <Button Content="{Locale:Locale Save}" Name="SaveButton" Click="SaveButton_Click"/>
- <Button HorizontalAlignment="Right" Content="{Locale:Locale Discard}"
- Name="CloseButton" Click="CloseButton_Click"/>
+ <StackPanel
+ Grid.Row="1"
+ Grid.Column="0"
+ Grid.ColumnSpan="2"
+ HorizontalAlignment="Right"
+ Orientation="Horizontal"
+ Spacing="10">
+ <Button
+ Name="SaveButton"
+ Click="SaveButton_Click"
+ Content="{Locale:Locale Save}" />
+ <Button
+ Name="CloseButton"
+ HorizontalAlignment="Right"
+ Click="CloseButton_Click"
+ Content="{Locale:Locale Discard}" />
</StackPanel>
</Grid>
</UserControl>