mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2026-03-11 22:05:30 +00:00
Some fixes
Alignment, sizing, and selection indicator
This commit is contained in:
parent
af59454e19
commit
925ae1652b
4 changed files with 30 additions and 39 deletions
|
|
@ -17,21 +17,16 @@
|
|||
<viewModels:ProfileSelectorDialogViewModel />
|
||||
</Design.DataContext>
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RowDefinitions="*,Auto">
|
||||
<StackPanel>
|
||||
<Border BorderThickness="0" Padding="-3">
|
||||
<ListBox
|
||||
MaxHeight="300"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Padding="-3"
|
||||
Background="Transparent"
|
||||
ItemsSource="{Binding Profiles}"
|
||||
SelectionChanged="ProfilesList_SelectionChanged">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal" />
|
||||
<UniformGrid Columns="5" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.Styles>
|
||||
|
|
@ -82,6 +77,6 @@
|
|||
</DataTemplate>
|
||||
</ListBox.DataTemplates>
|
||||
</ListBox>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
|||
|
|
@ -46,17 +46,15 @@ namespace Ryujinx.Ava.UI.ViewModels
|
|||
};
|
||||
}
|
||||
|
||||
private int _selectedIndex = -1;
|
||||
|
||||
public int SelectedIndex
|
||||
{
|
||||
get;
|
||||
get => _selectedIndex;
|
||||
set
|
||||
{
|
||||
field = value;
|
||||
|
||||
SelectedImage = field == -1
|
||||
? null
|
||||
: Images[field].Data;
|
||||
|
||||
_selectedIndex = value;
|
||||
SelectedImage = value == -1 ? null : Images[value].Data;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(SelectedImage));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,22 +29,27 @@
|
|||
IsReadOnly="True"
|
||||
Text="{Binding UserIdString}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" HorizontalAlignment="Right">
|
||||
<Grid Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Stretch">
|
||||
<Border
|
||||
Name="ImageBox"
|
||||
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
|
||||
BorderThickness="1">
|
||||
<Panel>
|
||||
BorderThickness="1"
|
||||
VerticalAlignment="Stretch">
|
||||
<Grid>
|
||||
<ui:SymbolIcon
|
||||
FontSize="70"
|
||||
Width="120"
|
||||
Height="120"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource AppListHoverBackgroundColor}"
|
||||
Symbol="Camera" />
|
||||
<Image
|
||||
Name="ProfileImage"
|
||||
Width="120"
|
||||
Height="120"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Source="{Binding Image, Converter={x:Static helpers:BitmapArrayValueConverter.Instance}}" />
|
||||
<Border
|
||||
Margin="2"
|
||||
|
|
@ -65,21 +70,19 @@
|
|||
<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" />
|
||||
<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>
|
||||
</Grid>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Grid.ColumnSpan="2"
|
||||
|
|
|
|||
|
|
@ -19,21 +19,16 @@
|
|||
<viewModels:UserProfileViewModel />
|
||||
</Design.DataContext>
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RowDefinitions="*,Auto">
|
||||
<StackPanel>
|
||||
<Border BorderThickness="0" Padding="-3">
|
||||
<ListBox
|
||||
MaxHeight="300"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Padding="-3"
|
||||
SelectionChanged="ProfilesList_SelectionChanged"
|
||||
Background="Transparent"
|
||||
ItemsSource="{Binding Profiles}">
|
||||
ItemsSource="{Binding Profiles}"
|
||||
SelectionChanged="ProfilesList_SelectionChanged">
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<WrapPanel
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal"/>
|
||||
<UniformGrid Columns="5" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.Styles>
|
||||
|
|
@ -106,7 +101,7 @@
|
|||
DataType="viewModels:BaseModel">
|
||||
<Panel
|
||||
Height="120"
|
||||
Width="100">
|
||||
Width="106">
|
||||
<Button
|
||||
MinWidth="50"
|
||||
MinHeight="50"
|
||||
|
|
@ -124,7 +119,7 @@
|
|||
</DataTemplate>
|
||||
</ListBox.DataTemplates>
|
||||
</ListBox>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
Margin="0,30,0,0"
|
||||
|
|
|
|||
Loading…
Reference in a new issue