clean_ryujinx/src/Ryujinx/UI/Views/User/UserEditorView.axaml
_Neo_ 5d0fc6d456 Minor cleanup
Going over changed files and adjusting structure and looks
2026-01-17 17:21:37 +02:00

110 lines
4.7 KiB
XML

<UserControl
x:Class="Ryujinx.Ava.UI.Views.User.UserEditorView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
xmlns:models="clr-namespace:Ryujinx.Ava.UI.Models"
mc:Ignorable="d"
MinWidth="500"
Focusable="True"
x:DataType="models:TempProfile">
<Grid Margin="0,10,0,0" ColumnDefinitions="Auto,*" RowDefinitions="*,Auto">
<StackPanel Spacing="10">
<TextBlock Text="{ext:Locale UserProfiles_NameLabel}" />
<TextBox
Name="NameBox"
Margin="0,0,0,5"
Width="300"
MaxLength="{Binding MaxProfileNameLength}"
Watermark="{ext:Locale UserProfiles_ProfileNameSelectionWatermark}"
Text="{Binding Name}" />
<TextBlock Name="IdText" Text="{ext:Locale UserProfiles_UserIdLabel}" />
<TextBox
Name="IdLabel"
Width="300"
IsReadOnly="True"
Text="{Binding UserIdString}" />
</StackPanel>
<Grid Grid.Column="1">
<Border
Name="ImageBox"
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
BorderThickness="1"
VerticalAlignment="Bottom"
HorizontalAlignment="Right">
<Panel>
<ui:SymbolIcon
FontSize="70"
Width="120"
Height="120"
Foreground="{DynamicResource AppListHoverBackgroundColor}"
Symbol="Camera" />
<Image
Name="ProfileImage"
Width="120"
Height="120"
Source="{Binding Image, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
<Border
Margin="2"
Height="27"
Width="27"
CornerRadius="17"
VerticalAlignment="Top"
HorizontalAlignment="Right"
Background="{DynamicResource ThemeContentBackgroundColor}">
<Button
Name="ProfileImageButton"
MaxHeight="27"
MaxWidth="27"
MinWidth="27"
MinHeight="27"
CornerRadius="17"
Padding="0">
<ui:SymbolIcon Symbol="Edit" />
<Button.Flyout>
<MenuFlyout Placement="Bottom">
<MenuItem
Header="{ext:Locale UserProfiles_ProfileImage_Import}"
Icon="{ext:Icon fa-solid fa-image}"
Click="Import_OnClick" />
<MenuItem
Header="{ext:Locale UserProfiles_ProfileImage_SelectAvatar}"
Icon="{ext:Icon fa-solid fa-floppy-disk}"
Click="SelectFirmwareImage_OnClick" />
</MenuFlyout>
</Button.Flyout>
</Button>
</Border>
</Panel>
</Border>
</Grid>
<StackPanel
Grid.Row="1"
Grid.ColumnSpan="2"
Orientation="Horizontal"
Margin="0,30,0,0"
Spacing="10">
<Button MinWidth="50" Width="50" Click="BackButton_Click">
<ui:SymbolIcon Symbol="Back" />
</Button>
</StackPanel>
<StackPanel
Grid.Row="1"
Grid.ColumnSpan="2"
HorizontalAlignment="Right"
Orientation="Horizontal"
Margin="0,30,0,0"
Spacing="10">
<Button Name="DeleteButton" Click="DeleteButton_Click">
<TextBlock Text="{ext:Locale UserProfiles_ButtonDelete}" />
</Button>
<Button Name="SaveButton" Click="SaveButton_Click">
<TextBlock Text="{ext:Locale UserProfiles_ButtonSave}" />
</Button>
</StackPanel>
</Grid>
</UserControl>