Archived
1
0
Fork 0
forked from Mirror/Ryujinx

UI: Some Avalonia cleanup (#3358)

This commit is contained in:
Ac_K 2022-06-23 20:59:02 +02:00 committed by GitHub
parent f2a41b7a1c
commit 8aff17a93c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1119 additions and 716 deletions

View file

@ -1,9 +1,9 @@
<Application <Application
x:Class="Ryujinx.Ava.App" x:Class="Ryujinx.Ava.App"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:sty="using:FluentAvalonia.Styling" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:sty="using:FluentAvalonia.Styling">
<Application.Styles> <Application.Styles>
<sty:FluentAvaloniaTheme UseSystemThemeOnWindows="False"/> <sty:FluentAvaloniaTheme UseSystemThemeOnWindows="False" />
</Application.Styles> </Application.Styles>
</Application> </Application>

View file

@ -2,7 +2,6 @@ using Avalonia;
using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml; using Avalonia.Markup.Xaml;
using Avalonia.Styling; using Avalonia.Styling;
using Avalonia.Threading;
using FluentAvalonia.Styling; using FluentAvalonia.Styling;
using Ryujinx.Ava.Ui.Windows; using Ryujinx.Ava.Ui.Windows;
using Ryujinx.Common; using Ryujinx.Common;
@ -13,7 +12,7 @@ using System.IO;
namespace Ryujinx.Ava namespace Ryujinx.Ava
{ {
public class App : Avalonia.Application public class App : Application
{ {
public override void Initialize() public override void Initialize()
{ {
@ -46,7 +45,7 @@ namespace Ryujinx.Ava
private void ShowRestartDialog() private void ShowRestartDialog()
{ {
// TODO. Implement Restart Dialog when SettingsWindow is implemented. // TODO: Implement Restart Dialog when SettingsWindow is implemented.
} }
private void ThemeChanged_Event(object sender, ReactiveEventArgs<string> e) private void ThemeChanged_Event(object sender, ReactiveEventArgs<string> e)

View file

@ -57,7 +57,7 @@ namespace Ryujinx.Ava
private static readonly Cursor InvisibleCursor = new Cursor(StandardCursorType.None); private static readonly Cursor InvisibleCursor = new Cursor(StandardCursorType.None);
private readonly AccountManager _accountManager; private readonly AccountManager _accountManager;
private UserChannelPersistence _userChannelPersistence; private readonly UserChannelPersistence _userChannelPersistence;
private readonly InputManager _inputManager; private readonly InputManager _inputManager;
@ -82,7 +82,6 @@ namespace Ryujinx.Ava
private bool _dialogShown; private bool _dialogShown;
private WindowsMultimediaTimerResolution _windowsMultimediaTimerResolution; private WindowsMultimediaTimerResolution _windowsMultimediaTimerResolution;
private KeyboardStateSnapshot _lastKeyboardSnapshot;
private readonly CancellationTokenSource _gpuCancellationTokenSource; private readonly CancellationTokenSource _gpuCancellationTokenSource;
@ -126,7 +125,6 @@ namespace Ryujinx.Ava
_glLogLevel = ConfigurationState.Instance.Logger.GraphicsDebugLevel; _glLogLevel = ConfigurationState.Instance.Logger.GraphicsDebugLevel;
_inputManager.SetMouseDriver(new AvaloniaMouseDriver(renderer)); _inputManager.SetMouseDriver(new AvaloniaMouseDriver(renderer));
_keyboardInterface = (IKeyboard)_inputManager.KeyboardDriver.GetGamepad("0"); _keyboardInterface = (IKeyboard)_inputManager.KeyboardDriver.GetGamepad("0");
_lastKeyboardSnapshot = _keyboardInterface.GetKeyboardStateSnapshot();
NpadManager = _inputManager.CreateNpadManager(); NpadManager = _inputManager.CreateNpadManager();
TouchScreenManager = _inputManager.CreateTouchScreenManager(); TouchScreenManager = _inputManager.CreateTouchScreenManager();
@ -722,9 +720,7 @@ namespace Ryujinx.Ava
} }
} }
var memoryConfiguration = ConfigurationState.Instance.System.ExpandRam.Value var memoryConfiguration = ConfigurationState.Instance.System.ExpandRam.Value ? HLE.MemoryConfiguration.MemoryConfiguration6GB : HLE.MemoryConfiguration.MemoryConfiguration4GB;
? HLE.MemoryConfiguration.MemoryConfiguration6GB
: HLE.MemoryConfiguration.MemoryConfiguration4GB;
IntegrityCheckLevel fsIntegrityCheckLevel = ConfigurationState.Instance.System.EnableFsIntegrityChecks ? IntegrityCheckLevel.ErrorOnInvalid : IntegrityCheckLevel.None; IntegrityCheckLevel fsIntegrityCheckLevel = ConfigurationState.Instance.System.EnableFsIntegrityChecks ? IntegrityCheckLevel.ErrorOnInvalid : IntegrityCheckLevel.None;
@ -898,7 +894,7 @@ namespace Ryujinx.Ava
} }
} }
private void HandleScreenState(KeyboardStateSnapshot keyboard, KeyboardStateSnapshot lastKeyboard) private void HandleScreenState()
{ {
if (ConfigurationState.Instance.Hid.EnableMouse) if (ConfigurationState.Instance.Hid.EnableMouse)
{ {
@ -935,19 +931,12 @@ namespace Ryujinx.Ava
{ {
Dispatcher.UIThread.Post(() => Dispatcher.UIThread.Post(() =>
{ {
KeyboardStateSnapshot keyboard = _keyboardInterface.GetKeyboardStateSnapshot(); HandleScreenState();
HandleScreenState(keyboard, _lastKeyboardSnapshot); if (_keyboardInterface.GetKeyboardStateSnapshot().IsPressed(Key.Delete) && _parent.WindowState != WindowState.FullScreen)
if (keyboard.IsPressed(Key.Delete))
{ {
if (_parent.WindowState != WindowState.FullScreen) Ptc.Continue();
{
Ptc.Continue();
}
} }
_lastKeyboardSnapshot = keyboard;
}); });
} }

View file

@ -1,9 +1,7 @@
<Styles <Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StyleInclude Source="avares://Ryujinx.Ava/Assets/Styles/Styles.xaml" /> <StyleInclude Source="avares://Ryujinx.Ava/Assets/Styles/Styles.xaml" />
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20" Height="2000"> <Border Height="2000" Padding="20">
<StackPanel Spacing="5"> <StackPanel Spacing="5">
<TextBlock Text="Code Font Family" /> <TextBlock Text="Code Font Family" />
<Grid RowDefinitions="*,Auto"> <Grid RowDefinitions="*,Auto">
@ -27,8 +25,12 @@
Name="btnRem" Name="btnRem"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Content="Add" /> Content="Add" />
<TextBox Width="100" VerticalAlignment="Center" Text="Rrrrr" Watermark="Hello" <TextBox
UseFloatingWatermark="True" /> Width="100"
VerticalAlignment="Center"
Text="Rrrrr"
UseFloatingWatermark="True"
Watermark="Hello" />
<CheckBox>Test Check</CheckBox> <CheckBox>Test Check</CheckBox>
</StackPanel> </StackPanel>
</Grid> </Grid>

View file

@ -1,9 +1,7 @@
<Styles <Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StyleInclude Source="avares://Ryujinx.Ava/Assets/Styles/Styles.xaml" /> <StyleInclude Source="avares://Ryujinx.Ava/Assets/Styles/Styles.xaml" />
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20" Height="2000"> <Border Height="2000" Padding="20">
<StackPanel Spacing="5"> <StackPanel Spacing="5">
<TextBlock Text="Code Font Family" /> <TextBlock Text="Code Font Family" />
<Grid RowDefinitions="*,Auto"> <Grid RowDefinitions="*,Auto">
@ -27,8 +25,12 @@
Name="btnRem" Name="btnRem"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Content="Add" /> Content="Add" />
<TextBox Width="100" VerticalAlignment="Center" Text="Rrrrr" Watermark="Hello" <TextBox
UseFloatingWatermark="True" /> Width="100"
VerticalAlignment="Center"
Text="Rrrrr"
UseFloatingWatermark="True"
Watermark="Hello" />
<CheckBox>Test Check</CheckBox> <CheckBox>Test Check</CheckBox>
</StackPanel> </StackPanel>
</Grid> </Grid>

View file

@ -1,10 +1,10 @@
<Styles <Styles
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" xmlns:sys="clr-namespace:System;assembly=netstandard"
xmlns:sys="clr-namespace:System;assembly=netstandard"> xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia">
<Design.PreviewWith> <Design.PreviewWith>
<Border Padding="20" Height="2000"> <Border Height="2000" Padding="20">
<StackPanel Spacing="5"> <StackPanel Spacing="5">
<TextBlock Text="Code Font Family" /> <TextBlock Text="Code Font Family" />
<Grid RowDefinitions="*,Auto"> <Grid RowDefinitions="*,Auto">
@ -22,15 +22,19 @@
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<ToggleButton <ToggleButton
Name="btnAdd" Name="btnAdd"
HorizontalAlignment="Right"
Height="28" Height="28"
HorizontalAlignment="Right"
Content="Addy" /> Content="Addy" />
<Button <Button
Name="btnRem" Name="btnRem"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Content="Add" /> Content="Add" />
<TextBox Width="100" VerticalAlignment="Center" Text="Rrrrr" Watermark="Hello" <TextBox
UseFloatingWatermark="True" /> Width="100"
VerticalAlignment="Center"
Text="Rrrrr"
UseFloatingWatermark="True"
Watermark="Hello" />
<CheckBox>Test Check</CheckBox> <CheckBox>Test Check</CheckBox>
</StackPanel> </StackPanel>
</Grid> </Grid>
@ -62,13 +66,10 @@
<Style Selector="Image.huge"> <Style Selector="Image.huge">
<Setter Property="Width" Value="120" /> <Setter Property="Width" Value="120" />
</Style> </Style>
<Style Selector="RadioButton"> <Style Selector="#TitleBarHost &gt; Image">
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style Selector="#TitleBarHost > Image">
<Setter Property="Margin" Value="10" /> <Setter Property="Margin" Value="10" />
</Style> </Style>
<Style Selector="#TitleBarHost > Label"> <Style Selector="#TitleBarHost &gt; Label">
<Setter Property="Margin" Value="5" /> <Setter Property="Margin" Value="5" />
<Setter Property="FontSize" Value="14" /> <Setter Property="FontSize" Value="14" />
</Style> </Style>
@ -225,12 +226,12 @@
<StaticResource x:Key="ListViewItemBackgroundPointerOver" ResourceKey="SystemAccentColorDark2" /> <StaticResource x:Key="ListViewItemBackgroundPointerOver" ResourceKey="SystemAccentColorDark2" />
<StaticResource x:Key="ListViewItemBackgroundSelectedPressed" ResourceKey="ThemeAccentColorBrush" /> <StaticResource x:Key="ListViewItemBackgroundSelectedPressed" ResourceKey="ThemeAccentColorBrush" />
<StaticResource x:Key="ListViewItemBackgroundSelectedPointerOver" ResourceKey="SystemAccentColorDark2" /> <StaticResource x:Key="ListViewItemBackgroundSelectedPointerOver" ResourceKey="SystemAccentColorDark2" />
<SolidColorBrush x:Key="DataGridGridLinesBrush" <SolidColorBrush
Color="{DynamicResource SystemBaseMediumLowColor}" x:Key="DataGridGridLinesBrush"
Opacity="0.4" /> Opacity="0.4"
Color="{DynamicResource SystemBaseMediumLowColor}" />
<SolidColorBrush x:Key="DataGridSelectionBackgroundBrush" Color="{DynamicResource DataGridSelectionColor}" /> <SolidColorBrush x:Key="DataGridSelectionBackgroundBrush" Color="{DynamicResource DataGridSelectionColor}" />
<SolidColorBrush x:Key="MenuFlyoutPresenterBorderBrush" <SolidColorBrush x:Key="MenuFlyoutPresenterBorderBrush" Color="{DynamicResource MenuFlyoutPresenterBorderColor}" />
Color="{DynamicResource MenuFlyoutPresenterBorderColor}" />
<SolidColorBrush x:Key="ThemeAccentColorBrush" Color="{DynamicResource SystemAccentColor}" /> <SolidColorBrush x:Key="ThemeAccentColorBrush" Color="{DynamicResource SystemAccentColor}" />
<SolidColorBrush x:Key="ListBoxBackground" Color="{DynamicResource ThemeContentBackgroundColor}" /> <SolidColorBrush x:Key="ListBoxBackground" Color="{DynamicResource ThemeContentBackgroundColor}" />
<SolidColorBrush x:Key="ThemeForegroundBrush" Color="{DynamicResource ThemeForegroundColor}" /> <SolidColorBrush x:Key="ThemeForegroundBrush" Color="{DynamicResource ThemeForegroundColor}" />
@ -241,7 +242,6 @@
<SolidColorBrush x:Key="SplitButtonBackgroundCheckedDisabled" Color="#00E81123" /> <SolidColorBrush x:Key="SplitButtonBackgroundCheckedDisabled" Color="#00E81123" />
<Thickness x:Key="PageMargin">40 0 40 0</Thickness> <Thickness x:Key="PageMargin">40 0 40 0</Thickness>
<Thickness x:Key="Margin">0 5 0 5</Thickness> <Thickness x:Key="Margin">0 5 0 5</Thickness>
<Thickness x:Key="TextMargin">0 4 0 0</Thickness>
<Thickness x:Key="MenuItemPadding">5 0 5 0</Thickness> <Thickness x:Key="MenuItemPadding">5 0 5 0</Thickness>
<Color x:Key="MenuFlyoutPresenterBorderColor">#00000000</Color> <Color x:Key="MenuFlyoutPresenterBorderColor">#00000000</Color>
<Color x:Key="SystemAccentColor">#FF00C3E3</Color> <Color x:Key="SystemAccentColor">#FF00C3E3</Color>

View file

@ -1,17 +1,21 @@
<Window xmlns="https://github.com/avaloniaui" <Window
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Ryujinx.Ava.Ui.Applet.ErrorAppletWindow"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns="https://github.com/avaloniaui"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
x:Class="Ryujinx.Ava.Ui.Applet.ErrorAppletWindow" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale" xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows"
CanResize="False" Title="{locale:Locale ErrorWindowTitle}"
SizeToContent="Height" Width="450"
Width="450" Height="340"
Height="340" CanResize="False"
Title="{locale:Locale ErrorWindowTitle}"> SizeToContent="Height"
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="20"> mc:Ignorable="d">
<Grid
Margin="20"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
@ -21,11 +25,28 @@
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition /> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Row="1" Grid.RowSpan="2" Margin="5, 10, 20 , 10" Grid.Column="0" <Image
Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" Height="80" MinWidth="50" /> Grid.Row="1"
<TextBlock Grid.Row="1" Margin="10" Grid.Column="1" VerticalAlignment="Stretch" TextWrapping="Wrap" Grid.RowSpan="2"
Text="{Binding Message}" /> Grid.Column="0"
<StackPanel Name="ButtonStack" Margin="10" Spacing="10" Grid.Row="2" Grid.Column="1" Height="80"
HorizontalAlignment="Right" Orientation="Horizontal" /> MinWidth="50"
Margin="5,10,20,10"
Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" />
<TextBlock
Grid.Row="1"
Grid.Column="1"
Margin="10"
VerticalAlignment="Stretch"
Text="{Binding Message}"
TextWrapping="Wrap" />
<StackPanel
Name="ButtonStack"
Grid.Row="2"
Grid.Column="1"
Margin="10"
HorizontalAlignment="Right"
Orientation="Horizontal"
Spacing="10" />
</Grid> </Grid>
</Window> </Window>

View file

@ -1,12 +1,16 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Ryujinx.Ava.Ui.Controls.SwkbdAppletDialog"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns="https://github.com/avaloniaui"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Class="Ryujinx.Ava.Ui.Controls.SwkbdAppletDialog" xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows"
Width="400"> Width="400"
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="20"> mc:Ignorable="d">
<Grid
Margin="20"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -18,15 +22,43 @@
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition /> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Row="1" VerticalAlignment="Center" Grid.RowSpan="5" Margin="5, 10, 20 , 10" <Image
Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" Height="80" Grid.Row="1"
MinWidth="50" /> Grid.RowSpan="5"
<TextBlock Grid.Row="1" Margin="5" Grid.Column="1" Text="{Binding MainText}" TextWrapping="Wrap" /> Height="80"
<TextBlock Grid.Row="2" Margin="5" Grid.Column="1" Text="{Binding SecondaryText}" TextWrapping="Wrap" /> MinWidth="50"
<TextBox Name="Input" KeyUp="Message_KeyUp" UseFloatingWatermark="True" TextInput="Message_TextInput" Margin="5,10,20,10"
Text="{Binding Message}" Grid.Row="2" VerticalAlignment="Center"
Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Stretch" TextWrapping="Wrap" /> Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" />
<TextBlock Name="Error" Margin="5" Grid.Row="4" Grid.Column="1" HorizontalAlignment="Stretch" <TextBlock
TextWrapping="Wrap" /> Grid.Row="1"
Grid.Column="1"
Margin="5"
Text="{Binding MainText}"
TextWrapping="Wrap" />
<TextBlock
Grid.Row="2"
Grid.Column="1"
Margin="5"
Text="{Binding SecondaryText}"
TextWrapping="Wrap" />
<TextBox
Name="Input"
Grid.Row="2"
Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
KeyUp="Message_KeyUp"
Text="{Binding Message}"
TextInput="Message_TextInput"
TextWrapping="Wrap"
UseFloatingWatermark="True" />
<TextBlock
Name="Error"
Grid.Row="4"
Grid.Column="1"
Margin="5"
HorizontalAlignment="Stretch"
TextWrapping="Wrap" />
</Grid> </Grid>
</UserControl> </UserControl>

View file

@ -1,188 +1,219 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Ryujinx.Ava.Ui.Controls.GameGridView"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns="https://github.com/avaloniaui"
xmlns:flex="clr-namespace:Avalonia.Flexbox;assembly=Avalonia.Flexbox" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls" xmlns:flex="clr-namespace:Avalonia.Flexbox;assembly=Avalonia.Flexbox"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Class="Ryujinx.Ava.Ui.Controls.GameGridView"> xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
<UserControl.Resources> d:DesignHeight="450"
<controls:BitmapArrayValueConverter x:Key="ByteImage" /> d:DesignWidth="800"
<MenuFlyout x:Key="GameContextMenu" Opened="MenuBase_OnMenuOpened"> mc:Ignorable="d">
<MenuItem <UserControl.Resources>
<controls:BitmapArrayValueConverter x:Key="ByteImage" />
<MenuFlyout x:Key="GameContextMenu" Opened="MenuBase_OnMenuOpened">
<MenuItem
Command="{Binding ToggleFavorite}" Command="{Binding ToggleFavorite}"
Header="{locale:Locale GameListContextMenuToggleFavorite}" Header="{locale:Locale GameListContextMenuToggleFavorite}"
ToolTip.Tip="{locale:Locale GameListContextMenuToggleFavoriteToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuToggleFavoriteToolTip}" />
<Separator /> <Separator />
<MenuItem <MenuItem
Command="{Binding OpenUserSaveDirectory}" Command="{Binding OpenUserSaveDirectory}"
Header="{locale:Locale GameListContextMenuOpenUserSaveDirectory}" Header="{locale:Locale GameListContextMenuOpenUserSaveDirectory}"
ToolTip.Tip="{locale:Locale GameListContextMenuOpenUserSaveDirectoryToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuOpenUserSaveDirectoryToolTip}" />
<MenuItem <MenuItem
Command="{Binding OpenDeviceSaveDirectory}" Command="{Binding OpenDeviceSaveDirectory}"
Header="{locale:Locale GameListContextMenuOpenUserDeviceDirectory}" Header="{locale:Locale GameListContextMenuOpenUserDeviceDirectory}"
ToolTip.Tip="{locale:Locale GameListContextMenuOpenUserDeviceDirectoryToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuOpenUserDeviceDirectoryToolTip}" />
<MenuItem <MenuItem
Command="{Binding OpenBcatSaveDirectory}" Command="{Binding OpenBcatSaveDirectory}"
Header="{locale:Locale GameListContextMenuOpenUserBcatDirectory}" Header="{locale:Locale GameListContextMenuOpenUserBcatDirectory}"
ToolTip.Tip="{locale:Locale GameListContextMenuOpenUserBcatDirectoryToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuOpenUserBcatDirectoryToolTip}" />
<Separator /> <Separator />
<MenuItem <MenuItem
Command="{Binding OpenTitleUpdateManager}" Command="{Binding OpenTitleUpdateManager}"
Header="{locale:Locale GameListContextMenuManageTitleUpdates}" Header="{locale:Locale GameListContextMenuManageTitleUpdates}"
ToolTip.Tip="{locale:Locale GameListContextMenuManageTitleUpdatesToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuManageTitleUpdatesToolTip}" />
<MenuItem <MenuItem
Command="{Binding OpenDlcManager}" Command="{Binding OpenDlcManager}"
Header="{locale:Locale GameListContextMenuManageDlc}" Header="{locale:Locale GameListContextMenuManageDlc}"
ToolTip.Tip="{locale:Locale GameListContextMenuManageDlcToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuManageDlcToolTip}" />
<MenuItem <MenuItem
Command="{Binding OpenCheatManager}" Command="{Binding OpenCheatManager}"
Header="{locale:Locale GameListContextMenuManageCheat}" Header="{locale:Locale GameListContextMenuManageCheat}"
ToolTip.Tip="{locale:Locale GameListContextMenuManageCheatToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuManageCheatToolTip}" />
<MenuItem <MenuItem
Command="{Binding OpenModsDirectory}" Command="{Binding OpenModsDirectory}"
Header="{locale:Locale GameListContextMenuOpenModsDirectory}" Header="{locale:Locale GameListContextMenuOpenModsDirectory}"
ToolTip.Tip="{locale:Locale GameListContextMenuOpenModsDirectoryToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuOpenModsDirectoryToolTip}" />
<MenuItem <MenuItem
Command="{Binding OpenSdModsDirectory}" Command="{Binding OpenSdModsDirectory}"
Header="{locale:Locale GameListContextMenuOpenSdModsDirectory}" Header="{locale:Locale GameListContextMenuOpenSdModsDirectory}"
ToolTip.Tip="{locale:Locale GameListContextMenuOpenSdModsDirectoryToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuOpenSdModsDirectoryToolTip}" />
<Separator /> <Separator />
<MenuItem Header="{locale:Locale GameListContextMenuCacheManagement}"> <MenuItem Header="{locale:Locale GameListContextMenuCacheManagement}">
<MenuItem <MenuItem
Command="{Binding PurgePtcCache}" Command="{Binding PurgePtcCache}"
Header="{locale:Locale GameListContextMenuCacheManagementPurgePptc}" Header="{locale:Locale GameListContextMenuCacheManagementPurgePptc}"
ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementPurgePptcToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementPurgePptcToolTip}" />
<MenuItem <MenuItem
Command="{Binding PurgeShaderCache}" Command="{Binding PurgeShaderCache}"
Header="{locale:Locale GameListContextMenuCacheManagementPurgeShaderCache}" Header="{locale:Locale GameListContextMenuCacheManagementPurgeShaderCache}"
ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementPurgeShaderCacheToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementPurgeShaderCacheToolTip}" />
<MenuItem <MenuItem
Command="{Binding OpenPtcDirectory}" Command="{Binding OpenPtcDirectory}"
Header="{locale:Locale GameListContextMenuCacheManagementOpenPptcDirectory}" Header="{locale:Locale GameListContextMenuCacheManagementOpenPptcDirectory}"
ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementOpenPptcDirectoryToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementOpenPptcDirectoryToolTip}" />
<MenuItem <MenuItem
Command="{Binding OpenShaderCacheDirectory}" Command="{Binding OpenShaderCacheDirectory}"
Header="{locale:Locale GameListContextMenuCacheManagementOpenShaderCacheDirectory}" Header="{locale:Locale GameListContextMenuCacheManagementOpenShaderCacheDirectory}"
ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementOpenShaderCacheDirectoryToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuCacheManagementOpenShaderCacheDirectoryToolTip}" />
</MenuItem> </MenuItem>
<MenuItem Header="{locale:Locale GameListContextMenuExtractData}"> <MenuItem Header="{locale:Locale GameListContextMenuExtractData}">
<MenuItem <MenuItem
Command="{Binding ExtractExeFs}" Command="{Binding ExtractExeFs}"
Header="{locale:Locale GameListContextMenuExtractDataExeFS}" Header="{locale:Locale GameListContextMenuExtractDataExeFS}"
ToolTip.Tip="{locale:Locale GameListContextMenuExtractDataExeFSToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuExtractDataExeFSToolTip}" />
<MenuItem <MenuItem
Command="{Binding ExtractRomFs}" Command="{Binding ExtractRomFs}"
Header="{locale:Locale GameListContextMenuExtractDataRomFS}" Header="{locale:Locale GameListContextMenuExtractDataRomFS}"
ToolTip.Tip="{locale:Locale GameListContextMenuExtractDataRomFSToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuExtractDataRomFSToolTip}" />
<MenuItem <MenuItem
Command="{Binding ExtractLogo}" Command="{Binding ExtractLogo}"
Header="{locale:Locale GameListContextMenuExtractDataLogo}" Header="{locale:Locale GameListContextMenuExtractDataLogo}"
ToolTip.Tip="{locale:Locale GameListContextMenuExtractDataLogoToolTip}" /> ToolTip.Tip="{locale:Locale GameListContextMenuExtractDataLogoToolTip}" />
</MenuItem> </MenuItem>
</MenuFlyout> </MenuFlyout>
</UserControl.Resources> </UserControl.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ListBox Grid.Row="0" <ListBox
Padding="8" Grid.Row="0"
HorizontalAlignment="Stretch" Padding="8"
DoubleTapped="GameList_DoubleTapped" HorizontalAlignment="Stretch"
SelectionChanged="GameList_SelectionChanged" VerticalAlignment="Stretch"
ContextFlyout="{StaticResource GameContextMenu}" ContextFlyout="{StaticResource GameContextMenu}"
VerticalAlignment="Stretch" DoubleTapped="GameList_DoubleTapped"
Items="{Binding AppsObservableList}"> Items="{Binding AppsObservableList}"
<ListBox.ItemsPanel> SelectionChanged="GameList_SelectionChanged">
<ItemsPanelTemplate> <ListBox.ItemsPanel>
<flex:FlexPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" JustifyContent="Center" <ItemsPanelTemplate>
AlignContent="FlexStart" /> <flex:FlexPanel
</ItemsPanelTemplate> HorizontalAlignment="Stretch"
</ListBox.ItemsPanel> VerticalAlignment="Stretch"
<ListBox.Styles> AlignContent="FlexStart"
<Style Selector="ListBoxItem"> JustifyContent="Center" />
<Setter Property="Padding" Value="0" /> </ItemsPanelTemplate>
<Setter Property="Margin" Value="5" /> </ListBox.ItemsPanel>
<Setter Property="CornerRadius" Value="5" /> <ListBox.Styles>
<Setter Property="Background" Value="{DynamicResource SystemAccentColorDark3}" /> <Style Selector="ListBoxItem">
<Style.Animations> <Setter Property="Padding" Value="0" />
<Animation Duration="0:0:0.7"> <Setter Property="Margin" Value="5" />
<KeyFrame Cue="0%"> <Setter Property="CornerRadius" Value="5" />
<Setter Property="MaxWidth" Value="0"/> <Setter Property="Background" Value="{DynamicResource SystemAccentColorDark3}" />
<Setter Property="Opacity" Value="0.0"/> <Style.Animations>
</KeyFrame> <Animation Duration="0:0:0.7">
<KeyFrame Cue="50%"> <KeyFrame Cue="0%">
<Setter Property="MaxWidth" Value="1000"/> <Setter Property="MaxWidth" Value="0" />
<Setter Property="Opacity" Value="0.3"/> <Setter Property="Opacity" Value="0.0" />
</KeyFrame> </KeyFrame>
<KeyFrame Cue="100%"> <KeyFrame Cue="50%">
<Setter Property="MaxWidth" Value="1000"/> <Setter Property="MaxWidth" Value="1000" />
<Setter Property="Opacity" Value="1.0"/> <Setter Property="Opacity" Value="0.3" />
</KeyFrame> </KeyFrame>
</Animation> <KeyFrame Cue="100%">
</Style.Animations> <Setter Property="MaxWidth" Value="1000" />
</Style> <Setter Property="Opacity" Value="1.0" />
</ListBox.Styles> </KeyFrame>
<ListBox.ItemTemplate> </Animation>
<DataTemplate> </Style.Animations>
<Grid> </Style>
<Grid.Styles> </ListBox.Styles>
<Style Selector="ui|SymbolIcon.small.icon"> <ListBox.ItemTemplate>
<Setter Property="FontSize" Value="15" /> <DataTemplate>
</Style> <Grid>
<Style Selector="ui|SymbolIcon.normal.icon"> <Grid.Styles>
<Setter Property="FontSize" Value="19" /> <Style Selector="ui|SymbolIcon.small.icon">
</Style> <Setter Property="FontSize" Value="15" />
<Style Selector="ui|SymbolIcon.large.icon"> </Style>
<Setter Property="FontSize" Value="23" /> <Style Selector="ui|SymbolIcon.normal.icon">
</Style> <Setter Property="FontSize" Value="19" />
<Style Selector="ui|SymbolIcon.huge.icon"> </Style>
<Setter Property="FontSize" Value="26" /> <Style Selector="ui|SymbolIcon.large.icon">
</Style> <Setter Property="FontSize" Value="23" />
</Grid.Styles> </Style>
<Border <Style Selector="ui|SymbolIcon.huge.icon">
Classes.small="{Binding $parent[UserControl].DataContext.IsGridSmall}" <Setter Property="FontSize" Value="26" />
Classes.normal="{Binding $parent[UserControl].DataContext.IsGridMedium}" </Style>
Classes.large="{Binding $parent[UserControl].DataContext.IsGridLarge}" </Grid.Styles>
Classes.huge="{Binding $parent[UserControl].DataContext.IsGridHuge}" <Border
Margin="0"
Padding="{Binding $parent[UserControl].DataContext.GridItemPadding}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Padding="{Binding $parent[UserControl].DataContext.GridItemPadding}" CornerRadius="5" VerticalAlignment="Stretch"
VerticalAlignment="Stretch" Margin="0" ClipToBounds="True"> Classes.huge="{Binding $parent[UserControl].DataContext.IsGridHuge}"
<Grid Margin="0"> Classes.large="{Binding $parent[UserControl].DataContext.IsGridLarge}"
<Grid.RowDefinitions> Classes.normal="{Binding $parent[UserControl].DataContext.IsGridMedium}"
<RowDefinition Height="Auto" /> Classes.small="{Binding $parent[UserControl].DataContext.IsGridSmall}"
<RowDefinition Height="Auto" /> ClipToBounds="True"
</Grid.RowDefinitions> CornerRadius="5">
<Image HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0" Grid.Row="0" <Grid Margin="0">
Source="{Binding Icon, Converter={StaticResource ByteImage}}" /> <Grid.RowDefinitions>
<StackPanel IsVisible="{Binding $parent[UserControl].DataContext.ShowNames}" <RowDefinition Height="Auto" />
Height="50" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" <RowDefinition Height="Auto" />
Margin="5" Grid.Row="1"> </Grid.RowDefinitions>
<TextBlock Text="{Binding TitleName}" TextAlignment="Center" TextWrapping="Wrap" <Image
HorizontalAlignment="Stretch" /> Grid.Row="0"
</StackPanel> Margin="0"
</Grid> HorizontalAlignment="Stretch"
</Border> VerticalAlignment="Top"
<ui:SymbolIcon Classes.icon="true" Classes.small="{Binding $parent[UserControl].DataContext.IsGridSmall}" Source="{Binding Icon, Converter={StaticResource ByteImage}}" />
Classes.normal="{Binding $parent[UserControl].DataContext.IsGridMedium}" <StackPanel
Classes.large="{Binding $parent[UserControl].DataContext.IsGridLarge}" Grid.Row="1"
Classes.huge="{Binding $parent[UserControl].DataContext.IsGridHuge}" Height="50"
Foreground="Yellow" Symbol="StarFilled" Margin="5"
IsVisible="{Binding Favorite}" Margin="5" VerticalAlignment="Top" HorizontalAlignment="Stretch"
HorizontalAlignment="Left" /> VerticalAlignment="Stretch"
<ui:SymbolIcon Classes.icon="true" Classes.small="{Binding $parent[UserControl].DataContext.IsGridSmall}" IsVisible="{Binding $parent[UserControl].DataContext.ShowNames}">
Classes.normal="{Binding $parent[UserControl].DataContext.IsGridMedium}" <TextBlock
Classes.large="{Binding $parent[UserControl].DataContext.IsGridLarge}" HorizontalAlignment="Stretch"
Classes.huge="{Binding $parent[UserControl].DataContext.IsGridHuge}" Text="{Binding TitleName}"
Foreground="Black" Symbol="Star" TextAlignment="Center"
IsVisible="{Binding Favorite}" Margin="5" VerticalAlignment="Top" TextWrapping="Wrap" />
HorizontalAlignment="Left" /> </StackPanel>
</Grid> </Grid>
</DataTemplate> </Border>
</ListBox.ItemTemplate> <ui:SymbolIcon
</ListBox> Margin="5"
</Grid> HorizontalAlignment="Left"
VerticalAlignment="Top"
Classes.huge="{Binding $parent[UserControl].DataContext.IsGridHuge}"
Classes.icon="true"
Classes.large="{Binding $parent[UserControl].DataContext.IsGridLarge}"
Classes.normal="{Binding $parent[UserControl].DataContext.IsGridMedium}"
Classes.small="{Binding $parent[UserControl].DataContext.IsGridSmall}"
Foreground="Yellow"
IsVisible="{Binding Favorite}"
Symbol="StarFilled" />
<ui:SymbolIcon
Margin="5"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Classes.huge="{Binding $parent[UserControl].DataContext.IsGridHuge}"
Classes.icon="true"
Classes.large="{Binding $parent[UserControl].DataContext.IsGridLarge}"
Classes.normal="{Binding $parent[UserControl].DataContext.IsGridMedium}"
Classes.small="{Binding $parent[UserControl].DataContext.IsGridSmall}"
Foreground="Black"
IsVisible="{Binding Favorite}"
Symbol="Star" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl> </UserControl>

View file

@ -1,13 +1,16 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Ryujinx.Ava.Ui.Controls.GameListView"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns="https://github.com/avaloniaui"
xmlns:flex="clr-namespace:Avalonia.Flexbox;assembly=Avalonia.Flexbox" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls" xmlns:flex="clr-namespace:Avalonia.Flexbox;assembly=Avalonia.Flexbox"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Class="Ryujinx.Ava.Ui.Controls.GameListView"> xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.Resources> <UserControl.Resources>
<controls:BitmapArrayValueConverter x:Key="ByteImage" /> <controls:BitmapArrayValueConverter x:Key="ByteImage" />
<MenuFlyout x:Key="GameContextMenu" Opened="MenuBase_OnMenuOpened"> <MenuFlyout x:Key="GameContextMenu" Opened="MenuBase_OnMenuOpened">
@ -88,18 +91,23 @@
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ListBox Grid.Row="0" <ListBox
Padding="8" Name="GameListBox"
HorizontalAlignment="Stretch" Grid.Row="0"
DoubleTapped="GameList_DoubleTapped" Padding="8"
SelectionChanged="GameList_SelectionChanged" HorizontalAlignment="Stretch"
ContextFlyout="{StaticResource GameContextMenu}" VerticalAlignment="Stretch"
VerticalAlignment="Stretch" ContextFlyout="{StaticResource GameContextMenu}"
Name="GameListBox" DoubleTapped="GameList_DoubleTapped"
Items="{Binding AppsObservableList}"> Items="{Binding AppsObservableList}"
SelectionChanged="GameList_SelectionChanged">
<ListBox.ItemsPanel> <ListBox.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Orientation="Vertical" Spacing="2" /> <StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Orientation="Vertical"
Spacing="2" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ListBox.ItemsPanel> </ListBox.ItemsPanel>
<ListBox.Styles> <ListBox.Styles>
@ -112,16 +120,16 @@
<Style.Animations> <Style.Animations>
<Animation Duration="0:0:0.7"> <Animation Duration="0:0:0.7">
<KeyFrame Cue="0%"> <KeyFrame Cue="0%">
<Setter Property="MaxHeight" Value="0"/> <Setter Property="MaxHeight" Value="0" />
<Setter Property="Opacity" Value="0.0"/> <Setter Property="Opacity" Value="0.0" />
</KeyFrame> </KeyFrame>
<KeyFrame Cue="50%"> <KeyFrame Cue="50%">
<Setter Property="MaxHeight" Value="1000"/> <Setter Property="MaxHeight" Value="1000" />
<Setter Property="Opacity" Value="0.3"/> <Setter Property="Opacity" Value="0.3" />
</KeyFrame> </KeyFrame>
<KeyFrame Cue="100%"> <KeyFrame Cue="100%">
<Setter Property="MaxHeight" Value="1000"/> <Setter Property="MaxHeight" Value="1000" />
<Setter Property="Opacity" Value="1.0"/> <Setter Property="Opacity" Value="1.0" />
</KeyFrame> </KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
@ -130,54 +138,96 @@
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid> <Grid>
<Border HorizontalAlignment="Stretch" <Border
Padding="10" CornerRadius="5" Margin="0"
VerticalAlignment="Stretch" Margin="0" ClipToBounds="True"> Padding="10"
<Grid > HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
ClipToBounds="True"
CornerRadius="5">
<Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="10"/> <ColumnDefinition Width="10" />
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition/> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image <Image
Classes.small="{Binding $parent[UserControl].DataContext.IsGridSmall}" Grid.RowSpan="3"
Classes.normal="{Binding $parent[UserControl].DataContext.IsGridMedium}" Grid.Column="0"
Classes.large="{Binding $parent[UserControl].DataContext.IsGridLarge}" Margin="0"
Classes.huge="{Binding $parent[UserControl].DataContext.IsGridHuge}" Classes.huge="{Binding $parent[UserControl].DataContext.IsGridHuge}"
Grid.RowSpan="3" Grid.Column="0" Margin="0" Classes.large="{Binding $parent[UserControl].DataContext.IsGridLarge}"
Source="{Binding Icon, Converter={StaticResource ByteImage}}" /> Classes.normal="{Binding $parent[UserControl].DataContext.IsGridMedium}"
<StackPanel Orientation="Vertical" Spacing="5" VerticalAlignment="Top" HorizontalAlignment="Left" Classes.small="{Binding $parent[UserControl].DataContext.IsGridSmall}"
Grid.Column="2"> Source="{Binding Icon, Converter={StaticResource ByteImage}}" />
<TextBlock Text="{Binding TitleName}" TextAlignment="Left" TextWrapping="Wrap" <StackPanel
HorizontalAlignment="Stretch" /> Grid.Column="2"
<TextBlock Text="{Binding Developer}" TextAlignment="Left" TextWrapping="Wrap" HorizontalAlignment="Left"
HorizontalAlignment="Stretch" /> VerticalAlignment="Top"
<TextBlock Text="{Binding Version}" TextAlignment="Left" TextWrapping="Wrap" Orientation="Vertical"
HorizontalAlignment="Stretch" /> Spacing="5">
</StackPanel> <TextBlock
<StackPanel Orientation="Vertical" Spacing="5" VerticalAlignment="Top" HorizontalAlignment="Right" HorizontalAlignment="Stretch"
Grid.Column="3"> Text="{Binding TitleName}"
<TextBlock Text="{Binding TimePlayed}" TextAlignment="Right" TextWrapping="Wrap" TextAlignment="Left"
HorizontalAlignment="Stretch" /> TextWrapping="Wrap" />
<TextBlock Text="{Binding LastPlayed}" TextAlignment="Right" TextWrapping="Wrap" <TextBlock
HorizontalAlignment="Stretch" /> HorizontalAlignment="Stretch"
<TextBlock Text="{Binding FileSize}" TextAlignment="Right" TextWrapping="Wrap" Text="{Binding Developer}"
HorizontalAlignment="Stretch" /> TextAlignment="Left"
</StackPanel> TextWrapping="Wrap" />
<ui:SymbolIcon Grid.Row="0" Grid.Column="0" FontSize="20" <TextBlock
Foreground="Yellow" HorizontalAlignment="Stretch"
Symbol="StarFilled" Text="{Binding Version}"
IsVisible="{Binding Favorite}" Margin="-5, -5, 0, 0" VerticalAlignment="Top" TextAlignment="Left"
HorizontalAlignment="Left" /> TextWrapping="Wrap" />
<ui:SymbolIcon Grid.Row="0" Grid.Column="0" FontSize="20" </StackPanel>
Foreground="Black" <StackPanel
Symbol="Star" Grid.Column="3"
IsVisible="{Binding Favorite}" Margin="-5, -5, 0, 0" VerticalAlignment="Top" HorizontalAlignment="Right"
HorizontalAlignment="Left" /> VerticalAlignment="Top"
Orientation="Vertical"
Spacing="5">
<TextBlock
HorizontalAlignment="Stretch"
Text="{Binding TimePlayed}"
TextAlignment="Right"
TextWrapping="Wrap" />
<TextBlock
HorizontalAlignment="Stretch"
Text="{Binding LastPlayed}"
TextAlignment="Right"
TextWrapping="Wrap" />
<TextBlock
HorizontalAlignment="Stretch"
Text="{Binding FileSize}"
TextAlignment="Right"
TextWrapping="Wrap" />
</StackPanel>
<ui:SymbolIcon
Grid.Row="0"
Grid.Column="0"
Margin="-5,-5,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
FontSize="20"
Foreground="Yellow"
IsVisible="{Binding Favorite}"
Symbol="StarFilled" />
<ui:SymbolIcon
Grid.Row="0"
Grid.Column="0"
Margin="-5,-5,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
FontSize="20"
Foreground="Black"
IsVisible="{Binding Favorite}"
Symbol="Star" />
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>

View file

@ -1,18 +1,31 @@
<UserControl xmlns="https://github.com/avaloniaui" <UserControl
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Ryujinx.Ava.Ui.Controls.InputDialog"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns="https://github.com/avaloniaui"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
x:Class="Ryujinx.Ava.Ui.Controls.InputDialog"> xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="5,10,5, 5"> mc:Ignorable="d">
<Grid
Margin="5,10,5,5"
HorizontalAlignment="Stretch"
VerticalAlignment="Center">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock HorizontalAlignment="Center" Text="{Binding Message}" /> <TextBlock HorizontalAlignment="Center" Text="{Binding Message}" />
<TextBox MaxLength="{Binding MaxLength}" Grid.Row="1" Margin="10" Width="300" HorizontalAlignment="Center" <TextBox
Text="{Binding Input, Mode=TwoWay}" /> Grid.Row="1"
<TextBlock Grid.Row="2" Margin="5, 5, 5, 10" HorizontalAlignment="Center" Text="{Binding SubMessage}" /> Width="300"
Margin="10"
HorizontalAlignment="Center"
MaxLength="{Binding MaxLength}"
Text="{Binding Input, Mode=TwoWay}" />
<TextBlock
Grid.Row="2"
Margin="5,5,5,10"
HorizontalAlignment="Center"
Text="{Binding SubMessage}" />
</Grid> </Grid>
</UserControl> </UserControl>

View file

@ -1,14 +1,18 @@
<Window xmlns="https://github.com/avaloniaui" <Window
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Ryujinx.Ava.Ui.Controls.UpdateWaitWindow"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns="https://github.com/avaloniaui"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Class="Ryujinx.Ava.Ui.Controls.UpdateWaitWindow" xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows"
WindowStartupLocation="CenterOwner" Title="Ryujinx - Waiting"
SizeToContent="WidthAndHeight" SizeToContent="WidthAndHeight"
Title="Ryujinx - Waiting"> WindowStartupLocation="CenterOwner"
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="20"> mc:Ignorable="d">
<Grid
Margin="20"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -17,12 +21,22 @@
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition /> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Row="1" Margin="5, 10, 20 , 10" Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" <Image
Height="70" Grid.Row="1"
MinWidth="50" /> Height="70"
<StackPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Orientation="Vertical"> MinWidth="50"
<TextBlock Margin="5" Name="PrimaryText" /> Margin="5,10,20,10"
<TextBlock VerticalAlignment="Center" Name="SecondaryText" Margin="5" /> Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" />
<StackPanel
Grid.Row="1"
Grid.Column="1"
VerticalAlignment="Center"
Orientation="Vertical">
<TextBlock Name="PrimaryText" Margin="5" />
<TextBlock
Name="SecondaryText"
Margin="5"
VerticalAlignment="Center" />
</StackPanel> </StackPanel>
</Grid> </Grid>
</Window> </Window>

View file

@ -1,28 +1,41 @@
<window:StyleableWindow xmlns="https://github.com/avaloniaui" <window:StyleableWindow
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Ryujinx.Ava.Ui.Windows.AboutWindow"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns="https://github.com/avaloniaui"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="350" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
x:Class="Ryujinx.Ava.Ui.Windows.AboutWindow" xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale" xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows"
CanResize="False" Title="Ryujinx - About"
WindowStartupLocation="CenterOwner" Width="850"
Width="850" MinHeight="550" Height="550" Height="550"
SizeToContent="Width" MinWidth="500"
MinWidth="500" MinHeight="550"
Title="Ryujinx - About"> d:DesignHeight="350"
<Grid Margin="15" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> d:DesignWidth="400"
CanResize="False"
SizeToContent="Width"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d">
<Grid
Margin="15"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto" />
<RowDefinition Height="*"/> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Grid.Row="1" Margin="20" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="0"> <Grid
Grid.Row="1"
Grid.Column="0"
Margin="20"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*" /> <RowDefinition Height="*" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
@ -40,93 +53,168 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="3" Margin="5, 10, 20 , 10" <Image
Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" Height="110" MinWidth="50" /> Grid.Row="0"
<TextBlock FontSize="35" TextAlignment="Center" Grid.Row="0" Grid.Column="1" Text="Ryujinx" Grid.RowSpan="3"
Margin="0,20,0,0" /> Grid.Column="0"
<TextBlock FontSize="16" TextAlignment="Center" Grid.Row="1" Grid.Column="1" Text="(REE-YOU-JINX)" Height="110"
Margin="0,0,0,0" /> MinWidth="50"
<Button Grid.Column="1" Background="Transparent" HorizontalAlignment="Center" Margin="0" Grid.Row="2" Margin="5,10,20,10"
Tag="https://www.ryujinx.org/" Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" />
Click="Button_OnClick"> <TextBlock
<TextBlock ToolTip.Tip="{locale:Locale AboutUrlTooltipMessage}" Grid.Row="0"
TextAlignment="Center" TextDecorations="Underline" Text="www.ryujinx.org" /> Grid.Column="1"
Margin="0,20,0,0"
FontSize="35"
Text="Ryujinx"
TextAlignment="Center" />
<TextBlock
Grid.Row="1"
Grid.Column="1"
Margin="0,0,0,0"
FontSize="16"
Text="(REE-YOU-JINX)"
TextAlignment="Center" />
<Button
Grid.Row="2"
Grid.Column="1"
Margin="0"
HorizontalAlignment="Center"
Background="Transparent"
Click="Button_OnClick"
Tag="https://www.ryujinx.org/">
<TextBlock
Text="www.ryujinx.org"
TextAlignment="Center"
TextDecorations="Underline"
ToolTip.Tip="{locale:Locale AboutUrlTooltipMessage}" />
</Button> </Button>
</Grid> </Grid>
<TextBlock TextAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" <TextBlock
Text="{Binding Version}" Grid.Row="1" /> Grid.Row="1"
<TextBlock Grid.Row="2" TextAlignment="Center" HorizontalAlignment="Center" Margin="20" HorizontalAlignment="Center"
Text="{locale:Locale AboutDisclaimerMessage}" VerticalAlignment="Center"
MaxLines="2" /> Text="{Binding Version}"
<TextBlock Grid.Row="3" TextAlignment="Center" HorizontalAlignment="Center" Margin="20" TextAlignment="Center" />
Text="{locale:Locale AboutAmiiboDisclaimerMessage}" <TextBlock
Name="AmiiboLabel" Grid.Row="2"
PointerPressed="AmiiboLabel_OnPointerPressed" Margin="20"
MaxLines="2" /> HorizontalAlignment="Center"
<StackPanel Spacing="10" Orientation="Horizontal" Grid.Row="4" HorizontalAlignment="Center"> MaxLines="2"
<StackPanel Orientation="Vertical" Text="{locale:Locale AboutDisclaimerMessage}"
ToolTip.Tip="{locale:Locale AboutPatreonUrlTooltipMessage}"> TextAlignment="Center" />
<Button Height="65" Background="Transparent" Tag="https://www.patreon.com/ryujinx" <TextBlock
Click="Button_OnClick"> Name="AmiiboLabel"
Grid.Row="3"
Margin="20"
HorizontalAlignment="Center"
MaxLines="2"
PointerPressed="AmiiboLabel_OnPointerPressed"
Text="{locale:Locale AboutAmiiboDisclaimerMessage}"
TextAlignment="Center" />
<StackPanel
Grid.Row="4"
HorizontalAlignment="Center"
Orientation="Horizontal"
Spacing="10">
<StackPanel Orientation="Vertical" ToolTip.Tip="{locale:Locale AboutPatreonUrlTooltipMessage}">
<Button
Height="65"
Background="Transparent"
Click="Button_OnClick"
Tag="https://www.patreon.com/ryujinx">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image Source="resm:Ryujinx.Ui.Common.Resources.Logo_Patreon.png?assembly=Ryujinx.Ui.Common" /> <Image Source="resm:Ryujinx.Ui.Common.Resources.Logo_Patreon.png?assembly=Ryujinx.Ui.Common" />
<TextBlock Grid.Row="1" Margin="0,5,0,0" Text="Patreon" HorizontalAlignment="Center" /> <TextBlock
Grid.Row="1"
Margin="0,5,0,0"
HorizontalAlignment="Center"
Text="Patreon" />
</Grid> </Grid>
</Button> </Button>
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" <StackPanel Orientation="Vertical" ToolTip.Tip="{locale:Locale AboutGithubUrlTooltipMessage}">
ToolTip.Tip="{locale:Locale AboutGithubUrlTooltipMessage}"> <Button
<Button Height="65" Background="Transparent" Tag="https://github.com/Ryujinx/Ryujinx" Height="65"
Click="Button_OnClick"> Background="Transparent"
Click="Button_OnClick"
Tag="https://github.com/Ryujinx/Ryujinx">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image Source="resm:Ryujinx.Ui.Common.Resources.Logo_GitHub.png?assembly=Ryujinx.Ui.Common" /> <Image Source="resm:Ryujinx.Ui.Common.Resources.Logo_GitHub.png?assembly=Ryujinx.Ui.Common" />
<TextBlock Grid.Row="1" Margin="0,5,0,0" Text="GitHub" HorizontalAlignment="Center" /> <TextBlock
Grid.Row="1"
Margin="0,5,0,0"
HorizontalAlignment="Center"
Text="GitHub" />
</Grid> </Grid>
</Button> </Button>
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" <StackPanel Orientation="Vertical" ToolTip.Tip="{locale:Locale AboutDiscordUrlTooltipMessage}">
ToolTip.Tip="{locale:Locale AboutDiscordUrlTooltipMessage}"> <Button
<Button Height="65" Background="Transparent" Tag="https://discordapp.com/invite/N2FmfVc" Height="65"
Click="Button_OnClick"> Background="Transparent"
Click="Button_OnClick"
Tag="https://discordapp.com/invite/N2FmfVc">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image Source="resm:Ryujinx.Ui.Common.Resources.Logo_Discord.png?assembly=Ryujinx.Ui.Common" /> <Image Source="resm:Ryujinx.Ui.Common.Resources.Logo_Discord.png?assembly=Ryujinx.Ui.Common" />
<TextBlock Grid.Row="1" Margin="0,5,0,0" Text="Discord" HorizontalAlignment="Center" /> <TextBlock
Grid.Row="1"
Margin="0,5,0,0"
HorizontalAlignment="Center"
Text="Discord" />
</Grid> </Grid>
</Button> </Button>
</StackPanel> </StackPanel>
<StackPanel Orientation="Vertical" <StackPanel Orientation="Vertical" ToolTip.Tip="{locale:Locale AboutTwitterUrlTooltipMessage}">
ToolTip.Tip="{locale:Locale AboutTwitterUrlTooltipMessage}"> <Button
<Button Height="65" Background="Transparent" Tag="https://twitter.com/RyujinxEmu" Height="65"
Click="Button_OnClick"> Background="Transparent"
Click="Button_OnClick"
Tag="https://twitter.com/RyujinxEmu">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Image Source="resm:Ryujinx.Ui.Common.Resources.Logo_Twitter.png?assembly=Ryujinx.Ui.Common" /> <Image Source="resm:Ryujinx.Ui.Common.Resources.Logo_Twitter.png?assembly=Ryujinx.Ui.Common" />
<TextBlock Grid.Row="1" Margin="0,5,0,0" Text="Twitter" HorizontalAlignment="Center" /> <TextBlock
Grid.Row="1"
Margin="0,5,0,0"
HorizontalAlignment="Center"
Text="Twitter" />
</Grid> </Grid>
</Button> </Button>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Grid> </Grid>
<Border Grid.Row="1" Grid.Column="1" VerticalAlignment="Stretch" Margin="5" Width="2" BorderBrush="White" <Border
BorderThickness="1,0,0,0"> Grid.Row="1"
Grid.Column="1"
Width="2"
Margin="5"
VerticalAlignment="Stretch"
BorderBrush="White"
BorderThickness="1,0,0,0">
<Separator Width="0" /> <Separator Width="0" />
</Border> </Border>
<Grid Grid.Row="1" Margin="20" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="2"> <Grid
Grid.Row="1"
Grid.Column="2"
Margin="20"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -136,27 +224,58 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="{locale:Locale AboutRyujinxAboutTitle}" FontWeight="Bold" TextDecorations="Underline" /> <TextBlock
<TextBlock LineHeight="20" Grid.Row="1" Margin="20,5,5,5" FontWeight="Bold"
Text="{locale:Locale AboutRyujinxAboutContent}" /> Text="{locale:Locale AboutRyujinxAboutTitle}"
<TextBlock Grid.Row="2" Margin="0,10,0,0" Text="{locale:Locale AboutRyujinxMaintainersTitle}" TextDecorations="Underline" />
FontWeight="Bold" <TextBlock
TextDecorations="Underline" /> Grid.Row="1"
<TextBlock LineHeight="20" Grid.Row="3" Margin="20,5,5,5" Margin="20,5,5,5"
Text="{Binding Developers}" /> LineHeight="20"
<Button Background="Transparent" HorizontalAlignment="Right" Grid.Row="4" Text="{locale:Locale AboutRyujinxAboutContent}" />
Tag="https://github.com/Ryujinx/Ryujinx/graphs/contributors?type=a" Click="Button_OnClick"> <TextBlock
<TextBlock ToolTip.Tip="{locale:Locale AboutRyujinxMaintainersContentTooltipMessage}" Grid.Row="2"
TextAlignment="Right" TextDecorations="Underline" Margin="0,10,0,0"
Text="{locale:Locale AboutRyujinxContributorsButtonHeader}" /> FontWeight="Bold"
Text="{locale:Locale AboutRyujinxMaintainersTitle}"
TextDecorations="Underline" />
<TextBlock
Grid.Row="3"
Margin="20,5,5,5"
LineHeight="20"
Text="{Binding Developers}" />
<Button
Grid.Row="4"
HorizontalAlignment="Right"
Background="Transparent"
Click="Button_OnClick"
Tag="https://github.com/Ryujinx/Ryujinx/graphs/contributors?type=a">
<TextBlock
Text="{locale:Locale AboutRyujinxContributorsButtonHeader}"
TextAlignment="Right"
TextDecorations="Underline"
ToolTip.Tip="{locale:Locale AboutRyujinxMaintainersContentTooltipMessage}" />
</Button> </Button>
<TextBlock Grid.Row="5" Margin="0,0,0,0" Text="{locale:Locale AboutRyujinxSupprtersTitle}" <TextBlock
FontWeight="Bold" Grid.Row="5"
TextDecorations="Underline" /> Margin="0,0,0,0"
<Border Width="460" Grid.Row="6" VerticalAlignment="Stretch" Height="200" BorderThickness="1" Margin="20,5" FontWeight="Bold"
BorderBrush="White" Padding="5"> Text="{locale:Locale AboutRyujinxSupprtersTitle}"
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top" Name="SupportersTextBlock" TextDecorations="Underline" />
Text="{Binding Supporters}" /> <Border
Grid.Row="6"
Width="460"
Height="200"
Margin="20,5"
Padding="5"
VerticalAlignment="Stretch"
BorderBrush="White"
BorderThickness="1">
<TextBlock
Name="SupportersTextBlock"
VerticalAlignment="Top"
Text="{Binding Supporters}"
TextWrapping="Wrap" />
</Border> </Border>
</Grid> </Grid>
</Grid> </Grid>

View file

@ -1,25 +1,25 @@
<window:StyleableWindow <window:StyleableWindow
x:Class="Ryujinx.Ava.Ui.Windows.MainWindow" x:Class="Ryujinx.Ava.Ui.Windows.MainWindow"
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 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:controls="clr-namespace:Ryujinx.Ava.Ui.Controls"
xmlns:models="clr-namespace:Ryujinx.Ava.Ui.Models"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 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" xmlns:viewModels="clr-namespace:Ryujinx.Ava.Ui.ViewModels"
xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows" xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows"
Title="Ryujinx" Title="Ryujinx"
Height="785"
Width="1280" Width="1280"
d:DesignHeight="720" Height="785"
d:DesignWidth="1280"
MinWidth="1024" MinWidth="1024"
MinHeight="680" MinHeight="680"
WindowStartupLocation="CenterScreen" d:DesignHeight="720"
d:DesignWidth="1280"
x:CompileBindings="True" x:CompileBindings="True"
x:DataType="viewModels:MainWindowViewModel" x:DataType="viewModels:MainWindowViewModel"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d"> mc:Ignorable="d">
<Window.Styles> <Window.Styles>
<Style Selector="TitleBar:fullscreen"> <Style Selector="TitleBar:fullscreen">
@ -38,23 +38,28 @@
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<controls:OffscreenTextBox Name="HiddenTextBox" Grid.Row="0" /> <controls:OffscreenTextBox Name="HiddenTextBox" Grid.Row="0" />
<ContentControl Grid.Row="1" <ContentControl
Focusable="False" Grid.Row="1"
IsVisible="False" Focusable="False"
KeyboardNavigation.IsTabStop="False"> IsVisible="False"
<ui:ContentDialog Name="ContentDialog" KeyboardNavigation.IsTabStop="False">
KeyboardNavigation.IsTabStop="False" <ui:ContentDialog
IsPrimaryButtonEnabled="True" Name="ContentDialog"
IsSecondaryButtonEnabled="True" IsPrimaryButtonEnabled="True"
IsVisible="True" /> IsSecondaryButtonEnabled="True"
IsVisible="True"
KeyboardNavigation.IsTabStop="False" />
</ContentControl> </ContentControl>
<StackPanel IsVisible="False" Grid.Row="0"> <StackPanel Grid.Row="0" IsVisible="False">
<controls:HotKeyControl Name="FullscreenHotKey" Command="{ReflectionBinding ToggleFullscreen}" /> <controls:HotKeyControl Name="FullscreenHotKey" Command="{ReflectionBinding ToggleFullscreen}" />
<controls:HotKeyControl Name="FullscreenHotKey2" Command="{ReflectionBinding ToggleFullscreen}" /> <controls:HotKeyControl Name="FullscreenHotKey2" Command="{ReflectionBinding ToggleFullscreen}" />
<controls:HotKeyControl Name="DockToggleHotKey" Command="{ReflectionBinding ToggleDockMode}" /> <controls:HotKeyControl Name="DockToggleHotKey" Command="{ReflectionBinding ToggleDockMode}" />
<controls:HotKeyControl Name="ExitHotKey" Command="{ReflectionBinding ExitCurrentState}" /> <controls:HotKeyControl Name="ExitHotKey" Command="{ReflectionBinding ExitCurrentState}" />
</StackPanel> </StackPanel>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1"> <Grid
Grid.Row="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
@ -73,47 +78,51 @@
<DockPanel HorizontalAlignment="Stretch"> <DockPanel HorizontalAlignment="Stretch">
<Menu <Menu
Name="Menu" Name="Menu"
Margin="0"
Height="35" Height="35"
Margin="0"
HorizontalAlignment="Left"> HorizontalAlignment="Left">
<Menu.ItemsPanel> <Menu.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<DockPanel HorizontalAlignment="Stretch" Margin="0" /> <DockPanel Margin="0" HorizontalAlignment="Stretch" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</Menu.ItemsPanel> </Menu.ItemsPanel>
<MenuItem <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarFile}">
VerticalAlignment="Center" <MenuItem
Header="{locale:Locale MenuBarFile}"> Command="{ReflectionBinding OpenFile}"
<MenuItem IsEnabled="{Binding EnableNonGameRunningControls}" Header="{locale:Locale MenuBarFileOpenFromFile}"
Command="{ReflectionBinding OpenFile}" IsEnabled="{Binding EnableNonGameRunningControls}"
Header="{locale:Locale MenuBarFileOpenFromFile}" ToolTip.Tip="{locale:Locale LoadApplicationFileTooltip}" />
ToolTip.Tip="{locale:Locale LoadApplicationFileTooltip}" /> <MenuItem
<MenuItem IsEnabled="{Binding EnableNonGameRunningControls}" Command="{ReflectionBinding OpenFolder}"
Command="{ReflectionBinding OpenFolder}" Header="{locale:Locale MenuBarFileOpenUnpacked}"
Header="{locale:Locale MenuBarFileOpenUnpacked}" IsEnabled="{Binding EnableNonGameRunningControls}"
ToolTip.Tip="{locale:Locale LoadApplicationFolderTooltip}" /> ToolTip.Tip="{locale:Locale LoadApplicationFolderTooltip}" />
<MenuItem Header="{locale:Locale MenuBarFileOpenApplet}" <MenuItem Header="{locale:Locale MenuBarFileOpenApplet}" IsEnabled="{Binding IsAppletMenuActive}">
IsEnabled="{Binding IsAppletMenuActive}"> <MenuItem
<MenuItem Command="{ReflectionBinding OpenMiiApplet}" Header="Mii Edit Applet" Command="{ReflectionBinding OpenMiiApplet}"
ToolTip.Tip="{locale:Locale MenuBarFileOpenAppletOpenMiiAppletToolTip}" /> Header="Mii Edit Applet"
ToolTip.Tip="{locale:Locale MenuBarFileOpenAppletOpenMiiAppletToolTip}" />
</MenuItem> </MenuItem>
<Separator /> <Separator />
<MenuItem Command="{ReflectionBinding OpenRyujinxFolder}" <MenuItem
Header="{locale:Locale MenuBarFileOpenEmuFolder}" Command="{ReflectionBinding OpenRyujinxFolder}"
ToolTip.Tip="{locale:Locale OpenRyujinxFolderTooltip}" /> Header="{locale:Locale MenuBarFileOpenEmuFolder}"
<MenuItem Command="{ReflectionBinding OpenLogsFolder}" ToolTip.Tip="{locale:Locale OpenRyujinxFolderTooltip}" />
Header="{locale:Locale MenuBarFileOpenLogsFolder}" <MenuItem
ToolTip.Tip="{locale:Locale OpenRyujinxLogsTooltip}" /> Command="{ReflectionBinding OpenLogsFolder}"
Header="{locale:Locale MenuBarFileOpenLogsFolder}"
ToolTip.Tip="{locale:Locale OpenRyujinxLogsTooltip}" />
<Separator /> <Separator />
<MenuItem Command="{ReflectionBinding CloseWindow}" <MenuItem
Header="{locale:Locale MenuBarFileExit}" Command="{ReflectionBinding CloseWindow}"
ToolTip.Tip="{locale:Locale ExitTooltip}" /> Header="{locale:Locale MenuBarFileExit}"
ToolTip.Tip="{locale:Locale ExitTooltip}" />
</MenuItem> </MenuItem>
<MenuItem <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarOptions}">
VerticalAlignment="Center" <MenuItem
Header="{locale:Locale MenuBarOptions}"> Command="{ReflectionBinding ToggleFullscreen}"
<MenuItem Command="{ReflectionBinding ToggleFullscreen}" Header="{locale:Locale MenuBarOptionsToggleFullscreen}"
Header="{locale:Locale MenuBarOptionsToggleFullscreen}" InputGesture="F11" /> InputGesture="F11" />
<MenuItem Header="{locale:Locale MenuBarOptionsStartGamesInFullscreen}"> <MenuItem Header="{locale:Locale MenuBarOptionsStartGamesInFullscreen}">
<MenuItem.Icon> <MenuItem.Icon>
<CheckBox IsChecked="{Binding StartGamesInFullscreen, Mode=TwoWay}" /> <CheckBox IsChecked="{Binding StartGamesInFullscreen, Mode=TwoWay}" />
@ -126,60 +135,82 @@
</MenuItem> </MenuItem>
<Separator /> <Separator />
<MenuItem Header="{locale:Locale MenuBarOptionsChangeLanguage}"> <MenuItem Header="{locale:Locale MenuBarOptionsChangeLanguage}">
<MenuItem Command="{ReflectionBinding ChangeLanguage}" CommandParameter="en_US" <MenuItem
Header="American English" /> Command="{ReflectionBinding ChangeLanguage}"
<MenuItem Command="{ReflectionBinding ChangeLanguage}" CommandParameter="pt_BR" CommandParameter="en_US"
Header="Brazilian Portuguese" /> Header="American English" />
<MenuItem Command="{ReflectionBinding ChangeLanguage}" CommandParameter="es_ES" <MenuItem
Header="Castilian Spanish" /> Command="{ReflectionBinding ChangeLanguage}"
<MenuItem Command="{ReflectionBinding ChangeLanguage}" CommandParameter="fr_FR" CommandParameter="pt_BR"
Header="French" /> Header="Brazilian Portuguese" />
<MenuItem Command="{ReflectionBinding ChangeLanguage}" CommandParameter="de_DE" <MenuItem
Header="German" /> Command="{ReflectionBinding ChangeLanguage}"
<MenuItem Command="{ReflectionBinding ChangeLanguage}" CommandParameter="el_GR" CommandParameter="es_ES"
Header="Greek" /> Header="Castilian Spanish" />
<MenuItem Command="{ReflectionBinding ChangeLanguage}" CommandParameter="it_IT" <MenuItem
Header="Italian" /> Command="{ReflectionBinding ChangeLanguage}"
<MenuItem Command="{ReflectionBinding ChangeLanguage}" CommandParameter="ko_KR" CommandParameter="fr_FR"
Header="Korean" /> Header="French" />
<MenuItem Command="{ReflectionBinding ChangeLanguage}" CommandParameter="ru_RU" <MenuItem
Header="Russian" /> Command="{ReflectionBinding ChangeLanguage}"
<MenuItem Command="{ReflectionBinding ChangeLanguage}" CommandParameter="tr_TR" CommandParameter="de_DE"
Header="Turkish" /> Header="German" />
<MenuItem
Command="{ReflectionBinding ChangeLanguage}"
CommandParameter="el_GR"
Header="Greek" />
<MenuItem
Command="{ReflectionBinding ChangeLanguage}"
CommandParameter="it_IT"
Header="Italian" />
<MenuItem
Command="{ReflectionBinding ChangeLanguage}"
CommandParameter="ko_KR"
Header="Korean" />
<MenuItem
Command="{ReflectionBinding ChangeLanguage}"
CommandParameter="ru_RU"
Header="Russian" />
<MenuItem
Command="{ReflectionBinding ChangeLanguage}"
CommandParameter="tr_TR"
Header="Turkish" />
</MenuItem> </MenuItem>
<Separator /> <Separator />
<MenuItem Command="{ReflectionBinding OpenSettings}" <MenuItem
Header="{locale:Locale MenuBarOptionsSettings}" Command="{ReflectionBinding OpenSettings}"
ToolTip.Tip="{locale:Locale OpenSettingsTooltip}" /> Header="{locale:Locale MenuBarOptionsSettings}"
<MenuItem Command="{ReflectionBinding ManageProfiles}" ToolTip.Tip="{locale:Locale OpenSettingsTooltip}" />
IsEnabled="{Binding EnableNonGameRunningControls}" <MenuItem
Header="{locale:Locale MenuBarOptionsManageUserProfiles}" Command="{ReflectionBinding ManageProfiles}"
ToolTip.Tip="{locale:Locale OpenProfileManagerTooltip}" /> Header="{locale:Locale MenuBarOptionsManageUserProfiles}"
IsEnabled="{Binding EnableNonGameRunningControls}"
ToolTip.Tip="{locale:Locale OpenProfileManagerTooltip}" />
</MenuItem> </MenuItem>
<MenuItem <MenuItem
Name="ActionsMenuItem"
VerticalAlignment="Center" VerticalAlignment="Center"
Header="{locale:Locale MenuBarActions}" Header="{locale:Locale MenuBarActions}"
Name="ActionsMenuItem"
IsEnabled="{Binding IsGameRunning}"> IsEnabled="{Binding IsGameRunning}">
<MenuItem <MenuItem
Click="PauseEmulation_Click" Click="PauseEmulation_Click"
Header="{locale:Locale MenuBarOptionsPauseEmulation}" Header="{locale:Locale MenuBarOptionsPauseEmulation}"
InputGesture="{Binding PauseKey}"
IsEnabled="{Binding !IsPaused}" IsEnabled="{Binding !IsPaused}"
IsVisible="{Binding !IsPaused}" IsVisible="{Binding !IsPaused}" />
InputGesture="{Binding PauseKey}" />
<MenuItem <MenuItem
Click="ResumeEmulation_Click" Click="ResumeEmulation_Click"
Header="{locale:Locale MenuBarOptionsResumeEmulation}" Header="{locale:Locale MenuBarOptionsResumeEmulation}"
InputGesture="{Binding PauseKey}"
IsEnabled="{Binding IsPaused}" IsEnabled="{Binding IsPaused}"
IsVisible="{Binding IsPaused}" IsVisible="{Binding IsPaused}" />
InputGesture="{Binding PauseKey}" />
<MenuItem <MenuItem
Click="StopEmulation_Click" Click="StopEmulation_Click"
Header="{locale:Locale MenuBarOptionsStopEmulation}" Header="{locale:Locale MenuBarOptionsStopEmulation}"
ToolTip.Tip="{locale:Locale StopEmulationTooltip}" InputGesture="Escape"
IsEnabled="{Binding IsGameRunning}" InputGesture="Escape" /> IsEnabled="{Binding IsGameRunning}"
<MenuItem Command="{ReflectionBinding SimulateWakeUpMessage}" ToolTip.Tip="{locale:Locale StopEmulationTooltip}" />
Header="{locale:Locale MenuBarOptionsSimulateWakeUpMessage}" /> <MenuItem Command="{ReflectionBinding SimulateWakeUpMessage}" Header="{locale:Locale MenuBarOptionsSimulateWakeUpMessage}" />
<Separator /> <Separator />
<MenuItem <MenuItem
Name="ScanAmiiboMenuItem" Name="ScanAmiiboMenuItem"
@ -187,41 +218,38 @@
Command="{ReflectionBinding OpenAmiiboWindow}" Command="{ReflectionBinding OpenAmiiboWindow}"
Header="{locale:Locale MenuBarActionsScanAmiibo}" Header="{locale:Locale MenuBarActionsScanAmiibo}"
IsEnabled="{Binding IsAmiiboRequested}" /> IsEnabled="{Binding IsAmiiboRequested}" />
<MenuItem Command="{ReflectionBinding TakeScreenshot}" <MenuItem
IsEnabled="{Binding IsGameRunning}" Command="{ReflectionBinding TakeScreenshot}"
Header="{locale:Locale MenuBarFileToolsTakeScreenshot}" Header="{locale:Locale MenuBarFileToolsTakeScreenshot}"
InputGesture="{Binding ScreenshotKey}" /> InputGesture="{Binding ScreenshotKey}"
<MenuItem Command="{ReflectionBinding HideUi}" IsEnabled="{Binding IsGameRunning}" />
IsEnabled="{Binding IsGameRunning}" <MenuItem
Header="{locale:Locale MenuBarFileToolsHideUi}" Command="{ReflectionBinding HideUi}"
InputGesture="{Binding ShowUiKey}" /> Header="{locale:Locale MenuBarFileToolsHideUi}"
<MenuItem Command="{ReflectionBinding OpenCheatManagerForCurrentApp}" InputGesture="{Binding ShowUiKey}"
IsEnabled="{Binding IsGameRunning}" IsEnabled="{Binding IsGameRunning}" />
Header="{locale:Locale GameListContextMenuManageCheat}" /> <MenuItem
Command="{ReflectionBinding OpenCheatManagerForCurrentApp}"
Header="{locale:Locale GameListContextMenuManageCheat}"
IsEnabled="{Binding IsGameRunning}" />
</MenuItem> </MenuItem>
<MenuItem <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarTools}">
VerticalAlignment="Center" <MenuItem Header="{locale:Locale MenuBarToolsInstallFirmware}" IsEnabled="{Binding EnableNonGameRunningControls}">
Header="{locale:Locale MenuBarTools}"> <MenuItem Command="{ReflectionBinding InstallFirmwareFromFile}" Header="{locale:Locale MenuBarFileToolsInstallFirmwareFromFile}" />
<MenuItem Header="{locale:Locale MenuBarToolsInstallFirmware}" <MenuItem Command="{ReflectionBinding InstallFirmwareFromFolder}" Header="{locale:Locale MenuBarFileToolsInstallFirmwareFromDirectory}" />
IsEnabled="{Binding EnableNonGameRunningControls}">
<MenuItem Command="{ReflectionBinding InstallFirmwareFromFile}"
Header="{locale:Locale MenuBarFileToolsInstallFirmwareFromFile}" />
<MenuItem Command="{ReflectionBinding InstallFirmwareFromFolder}"
Header="{locale:Locale MenuBarFileToolsInstallFirmwareFromDirectory}" />
</MenuItem> </MenuItem>
</MenuItem> </MenuItem>
<MenuItem <MenuItem VerticalAlignment="Center" Header="{locale:Locale MenuBarHelp}">
VerticalAlignment="Center"
Header="{locale:Locale MenuBarHelp}">
<MenuItem <MenuItem
Name="UpdateMenuItem" Name="UpdateMenuItem"
Command="{ReflectionBinding CheckForUpdates}" Command="{ReflectionBinding CheckForUpdates}"
Header="{locale:Locale MenuBarHelpCheckForUpdates}" Header="{locale:Locale MenuBarHelpCheckForUpdates}"
ToolTip.Tip="{locale:Locale CheckUpdatesTooltip}" /> ToolTip.Tip="{locale:Locale CheckUpdatesTooltip}" />
<Separator /> <Separator />
<MenuItem Command="{ReflectionBinding OpenAboutWindow}" <MenuItem
Header="{locale:Locale MenuBarHelpAbout}" Command="{ReflectionBinding OpenAboutWindow}"
ToolTip.Tip="{locale:Locale OpenAboutTooltip}" /> Header="{locale:Locale MenuBarHelpAbout}"
ToolTip.Tip="{locale:Locale OpenAboutTooltip}" />
</MenuItem> </MenuItem>
</Menu> </Menu>
</DockPanel> </DockPanel>
@ -230,152 +258,213 @@
Name="Content" Name="Content"
Grid.Row="1" Grid.Row="1"
Padding="0" Padding="0"
IsVisible="{Binding ShowContent}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
BorderBrush="{DynamicResource ThemeControlBorderColor}" BorderBrush="{DynamicResource ThemeControlBorderColor}"
BorderThickness="0,0,0,0" BorderThickness="0,0,0,0"
DockPanel.Dock="Top"> DockPanel.Dock="Top"
IsVisible="{Binding ShowContent}">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<DockPanel Grid.Row="0" HorizontalAlignment="Stretch" Margin="0,0,0,5"> <DockPanel
Grid.Row="0"
Margin="0,0,0,5"
HorizontalAlignment="Stretch">
<Button <Button
IsEnabled="{Binding IsGrid}" VerticalAlignment="Stretch" MinWidth="40" Width="40" Width="40"
Margin="5,2,0,2" Command="{ReflectionBinding SetListMode}"> MinWidth="40"
<ui:FontIcon FontFamily="avares://FluentAvalonia/Fonts#Symbols" Margin="5,2,0,2"
VerticalAlignment="Center" VerticalAlignment="Stretch"
Margin="0" Command="{ReflectionBinding SetListMode}"
Glyph="{controls:GlyphValueConverter List}" IsEnabled="{Binding IsGrid}">
HorizontalAlignment="Stretch" /> <ui:FontIcon
Margin="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
FontFamily="avares://FluentAvalonia/Fonts#Symbols"
Glyph="{controls:GlyphValueConverter List}" />
</Button> </Button>
<Button <Button
IsEnabled="{Binding IsList}" VerticalAlignment="Stretch" MinWidth="40" Width="40" Width="40"
Margin="5,2,5,2" Command="{ReflectionBinding SetGridMode}"> MinWidth="40"
<ui:FontIcon FontFamily="avares://FluentAvalonia/Fonts#Symbols" Margin="5,2,5,2"
VerticalAlignment="Center" VerticalAlignment="Stretch"
Margin="0" Command="{ReflectionBinding SetGridMode}"
Glyph="{controls:GlyphValueConverter Grid}" IsEnabled="{Binding IsList}">
HorizontalAlignment="Stretch" /> <ui:FontIcon
Margin="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
FontFamily="avares://FluentAvalonia/Fonts#Symbols"
Glyph="{controls:GlyphValueConverter Grid}" />
</Button> </Button>
<TextBlock Text="{locale:Locale IconSize}" <TextBlock
VerticalAlignment="Center" Margin="10,0" Margin="10,0"
ToolTip.Tip="{locale:Locale IconSizeTooltip}" /> VerticalAlignment="Center"
<Slider Width="150" Margin="5,-10,5 ,0" Height="35" Text="{locale:Locale IconSize}"
ToolTip.Tip="{locale:Locale IconSizeTooltip}" ToolTip.Tip="{locale:Locale IconSizeTooltip}" />
VerticalAlignment="Center" Minimum="1" Maximum="4" IsSnapToTickEnabled="True" <Slider
TickFrequency="1" Value="{Binding GridSizeScale}" /> Width="150"
<CheckBox Margin="0" IsChecked="{Binding ShowNames, Mode=TwoWay}" VerticalAlignment="Center" Height="35"
IsVisible="{Binding IsGrid}"> Margin="5,-10,5,0"
<TextBlock Text="{locale:Locale CommonShowNames}" Margin="5,3,0,0" /> VerticalAlignment="Center"
IsSnapToTickEnabled="True"
Maximum="4"
Minimum="1"
TickFrequency="1"
ToolTip.Tip="{locale:Locale IconSizeTooltip}"
Value="{Binding GridSizeScale}" />
<CheckBox
Margin="0"
VerticalAlignment="Center"
IsChecked="{Binding ShowNames, Mode=TwoWay}"
IsVisible="{Binding IsGrid}">
<TextBlock Margin="5,3,0,0" Text="{locale:Locale CommonShowNames}" />
</CheckBox> </CheckBox>
<TextBox <TextBox
Name="SearchBox" Name="SearchBox"
DockPanel.Dock="Right"
VerticalAlignment="Center"
MinWidth="200" MinWidth="200"
Margin="5,0,5,0" Margin="5,0,5,0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center"
DockPanel.Dock="Right"
KeyUp="SearchBox_OnKeyUp" KeyUp="SearchBox_OnKeyUp"
Text="{Binding SearchText}" Text="{Binding SearchText}"
Watermark="{locale:Locale MenuSearch}" /> Watermark="{locale:Locale MenuSearch}" />
<ui:DropDownButton DockPanel.Dock="Right" <ui:DropDownButton
HorizontalAlignment="Right" Width="150" VerticalAlignment="Center" Width="150"
Content="{Binding SortName}"> HorizontalAlignment="Right"
VerticalAlignment="Center"
Content="{Binding SortName}"
DockPanel.Dock="Right">
<ui:DropDownButton.Flyout> <ui:DropDownButton.Flyout>
<Flyout Placement="Bottom"> <Flyout Placement="Bottom">
<StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" Margin="0"> <StackPanel
Margin="0"
HorizontalAlignment="Stretch"
Orientation="Vertical">
<StackPanel> <StackPanel>
<RadioButton Tag="Favorite" <RadioButton
IsChecked="{Binding IsSortedByFavorite, Mode=OneTime}" Checked="Sort_Checked"
GroupName="Sort" Content="{locale:Locale CommonFavorite}"
Content="{locale:Locale CommonFavorite}" GroupName="Sort"
Checked="Sort_Checked" /> IsChecked="{Binding IsSortedByFavorite, Mode=OneTime}"
<RadioButton Tag="Title" GroupName="Sort" Tag="Favorite" />
IsChecked="{Binding IsSortedByTitle, Mode=OneTime}" <RadioButton
Content="{locale:Locale GameListHeaderApplication}" Checked="Sort_Checked"
Checked="Sort_Checked" /> Content="{locale:Locale GameListHeaderApplication}"
<RadioButton Tag="Developer" GroupName="Sort" GroupName="Sort"
IsChecked="{Binding IsSortedByDeveloper, Mode=OneTime}" IsChecked="{Binding IsSortedByTitle, Mode=OneTime}"
Content="{locale:Locale GameListHeaderDeveloper}" Tag="Title" />
Checked="Sort_Checked" /> <RadioButton
<RadioButton Tag="TotalTimePlayed" GroupName="Sort" Checked="Sort_Checked"
IsChecked="{Binding IsSortedByTimePlayed, Mode=OneTime}" Content="{locale:Locale GameListHeaderDeveloper}"
Content="{locale:Locale GameListHeaderTimePlayed}" GroupName="Sort"
Checked="Sort_Checked" /> IsChecked="{Binding IsSortedByDeveloper, Mode=OneTime}"
<RadioButton Tag="LastPlayed" GroupName="Sort" Tag="Developer" />
IsChecked="{Binding IsSortedByLastPlayed, Mode=OneTime}" <RadioButton
Content="{locale:Locale GameListHeaderLastPlayed}" Checked="Sort_Checked"
Checked="Sort_Checked" /> Content="{locale:Locale GameListHeaderTimePlayed}"
<RadioButton Tag="FileType" GroupName="Sort" GroupName="Sort"
IsChecked="{Binding IsSortedByType, Mode=OneTime}" IsChecked="{Binding IsSortedByTimePlayed, Mode=OneTime}"
Content="{locale:Locale GameListHeaderFileExtension}" Tag="TotalTimePlayed" />
Checked="Sort_Checked" /> <RadioButton
<RadioButton Tag="FileSize" GroupName="Sort" Checked="Sort_Checked"
IsChecked="{Binding IsSortedBySize, Mode=OneTime}" Content="{locale:Locale GameListHeaderLastPlayed}"
Content="{locale:Locale GameListHeaderFileSize}" GroupName="Sort"
Checked="Sort_Checked" /> IsChecked="{Binding IsSortedByLastPlayed, Mode=OneTime}"
<RadioButton Tag="Path" GroupName="Sort" Tag="LastPlayed" />
IsChecked="{Binding IsSortedByPath, Mode=OneTime}" <RadioButton
Content="{locale:Locale GameListHeaderPath}" Checked="Sort_Checked"
Checked="Sort_Checked" /> Content="{locale:Locale GameListHeaderFileExtension}"
GroupName="Sort"
IsChecked="{Binding IsSortedByType, Mode=OneTime}"
Tag="FileType" />
<RadioButton
Checked="Sort_Checked"
Content="{locale:Locale GameListHeaderFileSize}"
GroupName="Sort"
IsChecked="{Binding IsSortedBySize, Mode=OneTime}"
Tag="FileSize" />
<RadioButton
Checked="Sort_Checked"
Content="{locale:Locale GameListHeaderPath}"
GroupName="Sort"
IsChecked="{Binding IsSortedByPath, Mode=OneTime}"
Tag="Path" />
</StackPanel> </StackPanel>
<Border HorizontalAlignment="Stretch" Margin="5" Height="2" BorderBrush="White" <Border
Width="60" BorderThickness="0,1,0,0"> Width="60"
<Separator HorizontalAlignment="Stretch" Height="0" /> Height="2"
Margin="5"
HorizontalAlignment="Stretch"
BorderBrush="White"
BorderThickness="0,1,0,0">
<Separator Height="0" HorizontalAlignment="Stretch" />
</Border> </Border>
<RadioButton Tag="Ascending" IsChecked="{Binding IsAscending, Mode=OneTime}" <RadioButton
GroupName="Order" Checked="Order_Checked"
Content="{locale:Locale OrderAscending}" Checked="Order_Checked" /> Content="{locale:Locale OrderAscending}"
<RadioButton Tag="Descending" GroupName="Order" GroupName="Order"
IsChecked="{Binding !IsAscending, Mode=OneTime}" IsChecked="{Binding IsAscending, Mode=OneTime}"
Content="{locale:Locale OrderDescending}" Checked="Order_Checked" /> Tag="Ascending" />
<RadioButton
Checked="Order_Checked"
Content="{locale:Locale OrderDescending}"
GroupName="Order"
IsChecked="{Binding !IsAscending, Mode=OneTime}"
Tag="Descending" />
</StackPanel> </StackPanel>
</Flyout> </Flyout>
</ui:DropDownButton.Flyout> </ui:DropDownButton.Flyout>
</ui:DropDownButton> </ui:DropDownButton>
<TextBlock DockPanel.Dock="Right" HorizontalAlignment="Right" <TextBlock
Text="{locale:Locale CommonSort}" VerticalAlignment="Center" Margin="10,0" /> Margin="10,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
DockPanel.Dock="Right"
Text="{locale:Locale CommonSort}" />
</DockPanel> </DockPanel>
<controls:GameListView <controls:GameListView
x:Name="GameList" x:Name="GameList"
Grid.Row="1" Grid.Row="1"
HorizontalContentAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalContentAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
IsVisible="{Binding IsList}" /> IsVisible="{Binding IsList}" />
<controls:GameGridView <controls:GameGridView
x:Name="GameGrid" x:Name="GameGrid"
Grid.Row="1" Grid.Row="1"
HorizontalContentAlignment="Stretch"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalContentAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
IsVisible="{Binding IsGrid}" /> IsVisible="{Binding IsGrid}" />
</Grid> </Grid>
</ContentControl> </ContentControl>
<Grid Grid.Row="1" <Grid
VerticalAlignment="Stretch" Grid.Row="1"
Background="{DynamicResource ThemeContentBackgroundColor}" HorizontalAlignment="Stretch"
IsVisible="{Binding ShowLoadProgress}" VerticalAlignment="Stretch"
ZIndex="1000" Background="{DynamicResource ThemeContentBackgroundColor}"
HorizontalAlignment="Stretch"> IsVisible="{Binding ShowLoadProgress}"
ZIndex="1000">
<Grid <Grid
HorizontalAlignment="Center"
IsVisible="{Binding ShowLoadProgress}"
Margin="40" Margin="40"
VerticalAlignment="Center"> HorizontalAlignment="Center"
VerticalAlignment="Center"
IsVisible="{Binding ShowLoadProgress}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Border <Border
Grid.Column="0"
Grid.RowSpan="2" Grid.RowSpan="2"
IsVisible="{Binding ShowLoadProgress}" Grid.Column="0"
Width="256" Width="256"
Height="256" Height="256"
Margin="10" Margin="10"
@ -383,62 +472,64 @@
BorderBrush="Black" BorderBrush="Black"
BorderThickness="2" BorderThickness="2"
BoxShadow="4 4 32 8 #40000000" BoxShadow="4 4 32 8 #40000000"
CornerRadius="3"> CornerRadius="3"
IsVisible="{Binding ShowLoadProgress}">
<Image <Image
IsVisible="{Binding ShowLoadProgress}"
Width="256" Width="256"
Height="256" Height="256"
IsVisible="{Binding ShowLoadProgress}"
Source="{Binding SelectedIcon, Converter={StaticResource ByteImage}}" /> Source="{Binding SelectedIcon, Converter={StaticResource ByteImage}}" />
</Border> </Border>
<Grid Grid.Column="1" <Grid
IsVisible="{Binding ShowLoadProgress}" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center"> VerticalAlignment="Center"
IsVisible="{Binding ShowLoadProgress}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock <TextBlock
IsVisible="{Binding ShowLoadProgress}"
Grid.Row="0" Grid.Row="0"
Margin="10" Margin="10"
FontSize="30" FontSize="30"
FontWeight="Bold" FontWeight="Bold"
TextWrapping="Wrap"
Text="{Binding LoadHeading}"
TextAlignment="Left" />
<Border
IsVisible="{Binding ShowLoadProgress}" IsVisible="{Binding ShowLoadProgress}"
Text="{Binding LoadHeading}"
TextAlignment="Left"
TextWrapping="Wrap" />
<Border
Grid.Row="1" Grid.Row="1"
CornerRadius="5" Margin="10"
ClipToBounds="True"
BorderBrush="{Binding ProgressBarBackgroundColor}"
Padding="0" Padding="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Margin="10" BorderBrush="{Binding ProgressBarBackgroundColor}"
BorderThickness="1"> BorderThickness="1"
ClipToBounds="True"
CornerRadius="5"
IsVisible="{Binding ShowLoadProgress}">
<ProgressBar <ProgressBar
IsVisible="{Binding ShowLoadProgress}"
Height="10" Height="10"
MinWidth="500"
Margin="0" Margin="0"
Padding="0" Padding="0"
CornerRadius="5"
ClipToBounds="True"
MinWidth="500"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Background="{Binding ProgressBarBackgroundColor}" Background="{Binding ProgressBarBackgroundColor}"
ClipToBounds="True"
CornerRadius="5"
Foreground="{Binding ProgressBarForegroundColor}" Foreground="{Binding ProgressBarForegroundColor}"
IsIndeterminate="{Binding IsLoadingIndeterminate}"
IsVisible="{Binding ShowLoadProgress}"
Maximum="{Binding ProgressMaximum}" Maximum="{Binding ProgressMaximum}"
Minimum="0" Minimum="0"
IsIndeterminate="{Binding IsLoadingIndeterminate}"
Value="{Binding ProgressValue}" /> Value="{Binding ProgressValue}" />
</Border> </Border>
<TextBlock <TextBlock
IsVisible="{Binding ShowLoadProgress}"
Grid.Row="2" Grid.Row="2"
Margin="10" Margin="10"
FontSize="18" FontSize="18"
IsVisible="{Binding ShowLoadProgress}"
Text="{Binding CacheLoadStatus}" Text="{Binding CacheLoadStatus}"
TextAlignment="Left" /> TextAlignment="Left" />
</Grid> </Grid>
@ -450,8 +541,8 @@
Height="30" Height="30"
Margin="0,0" Margin="0,0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
Background="{DynamicResource ThemeContentBackgroundColor}"
VerticalAlignment="Bottom" VerticalAlignment="Bottom"
Background="{DynamicResource ThemeContentBackgroundColor}"
DockPanel.Dock="Bottom" DockPanel.Dock="Bottom"
IsVisible="{Binding ShowMenuAndStatusBar}"> IsVisible="{Binding ShowMenuAndStatusBar}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -460,8 +551,11 @@
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" IsVisible="{Binding EnableNonGameRunningControls}" <StackPanel
VerticalAlignment="Center" Margin="10,0"> Grid.Column="0"
Margin="10,0"
VerticalAlignment="Center"
IsVisible="{Binding EnableNonGameRunningControls}">
<Grid Margin="0"> <Grid Margin="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
@ -476,7 +570,10 @@
VerticalAlignment="Center" VerticalAlignment="Center"
Background="Transparent" Background="Transparent"
Command="{ReflectionBinding LoadApplications}"> Command="{ReflectionBinding LoadApplications}">
<ui:SymbolIcon Symbol="Refresh" Height="100" Width="50" /> <ui:SymbolIcon
Width="50"
Height="100"
Symbol="Refresh" />
</Button> </Button>
<TextBlock <TextBlock
Name="LoadStatus" Name="LoadStatus"
@ -489,11 +586,11 @@
Name="LoadProgressBar" Name="LoadProgressBar"
Grid.Column="2" Grid.Column="2"
Height="6" Height="6"
Maximum="{Binding StatusBarProgressMaximum}"
Value="{Binding StatusBarProgressValue}"
VerticalAlignment="Center" VerticalAlignment="Center"
Foreground="{DynamicResource HighlightColor}" Foreground="{DynamicResource HighlightColor}"
IsVisible="{Binding EnableNonGameRunningControls}" /> IsVisible="{Binding EnableNonGameRunningControls}"
Maximum="{Binding StatusBarProgressMaximum}"
Value="{Binding StatusBarProgressValue}" />
</Grid> </Grid>
</StackPanel> </StackPanel>
<StackPanel <StackPanel
@ -505,132 +602,137 @@
Orientation="Horizontal"> Orientation="Horizontal">
<TextBlock <TextBlock
Name="VsyncStatus" Name="VsyncStatus"
Margin="0,0,5,0"
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Center" VerticalAlignment="Center"
Foreground="{Binding VsyncColor}" Foreground="{Binding VsyncColor}"
PointerReleased="VsyncStatus_PointerReleased"
IsVisible="{Binding !ShowLoadProgress}" IsVisible="{Binding !ShowLoadProgress}"
Margin="0,0,5,0" PointerReleased="VsyncStatus_PointerReleased"
Text="VSync" Text="VSync"
TextAlignment="Left" /> TextAlignment="Left" />
<Border <Border
Width="2" Width="2"
Margin="2,0"
IsVisible="{Binding !ShowLoadProgress}"
BorderThickness="1"
Height="12" Height="12"
BorderBrush="Gray" /> Margin="2,0"
BorderBrush="Gray"
BorderThickness="1"
IsVisible="{Binding !ShowLoadProgress}" />
<TextBlock <TextBlock
Margin="5,0,5,0"
Name="DockedStatus" Name="DockedStatus"
IsVisible="{Binding !ShowLoadProgress}" Margin="5,0,5,0"
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !ShowLoadProgress}"
PointerReleased="DockedStatus_PointerReleased" PointerReleased="DockedStatus_PointerReleased"
Text="{Binding DockedStatusText}" Text="{Binding DockedStatusText}"
TextAlignment="Left" /> TextAlignment="Left" />
<Border <Border
Width="2" Width="2"
Margin="2,0"
IsVisible="{Binding !ShowLoadProgress}"
BorderThickness="1"
Height="12" Height="12"
BorderBrush="Gray" /> Margin="2,0"
BorderBrush="Gray"
BorderThickness="1"
IsVisible="{Binding !ShowLoadProgress}" />
<TextBlock <TextBlock
Margin="5,0,5,0"
Name="AspectRatioStatus" Name="AspectRatioStatus"
IsVisible="{Binding !ShowLoadProgress}" Margin="5,0,5,0"
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !ShowLoadProgress}"
PointerReleased="AspectRatioStatus_PointerReleased" PointerReleased="AspectRatioStatus_PointerReleased"
Text="{Binding AspectRatioStatusText}" Text="{Binding AspectRatioStatusText}"
TextAlignment="Left" /> TextAlignment="Left" />
<Border <Border
Width="2" Width="2"
Margin="2,0"
IsVisible="{Binding !ShowLoadProgress}"
BorderThickness="1"
Height="12" Height="12"
BorderBrush="Gray" /> Margin="2,0"
BorderBrush="Gray"
BorderThickness="1"
IsVisible="{Binding !ShowLoadProgress}" />
<ui:ToggleSplitButton <ui:ToggleSplitButton
Name="VolumeStatus"
Margin="-2,0,-3,0" Margin="-2,0,-3,0"
Padding="5,0,0,5" Padding="5,0,0,5"
Name="VolumeStatus"
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !ShowLoadProgress}"
BorderBrush="{DynamicResource ThemeContentBackgroundColor}"
Background="{DynamicResource ThemeContentBackgroundColor}" Background="{DynamicResource ThemeContentBackgroundColor}"
BorderBrush="{DynamicResource ThemeContentBackgroundColor}"
Content="{Binding VolumeStatusText}"
IsChecked="{Binding VolumeMuted}" IsChecked="{Binding VolumeMuted}"
Content="{Binding VolumeStatusText}"> IsVisible="{Binding !ShowLoadProgress}">
<ui:ToggleSplitButton.Flyout> <ui:ToggleSplitButton.Flyout>
<Flyout Placement="Bottom" ShowMode="TransientWithDismissOnPointerMoveAway"> <Flyout Placement="Bottom" ShowMode="TransientWithDismissOnPointerMoveAway">
<Grid Margin="0"> <Grid Margin="0">
<Slider Value="{Binding Volume}" <Slider
ToolTip.Tip="{locale:Locale AudioVolumeTooltip}" Width="150"
Minimum="0" Margin="0"
Maximum="1" Padding="0"
TickFrequency="0.05" IsSnapToTickEnabled="True"
IsSnapToTickEnabled="True" LargeChange="0.05"
Padding="0" Maximum="1"
Margin="0" Minimum="0"
SmallChange="0.01" SmallChange="0.01"
LargeChange="0.05" TickFrequency="0.05"
Width="150" /> ToolTip.Tip="{locale:Locale AudioVolumeTooltip}"
Value="{Binding Volume}" />
</Grid> </Grid>
</Flyout> </Flyout>
</ui:ToggleSplitButton.Flyout> </ui:ToggleSplitButton.Flyout>
</ui:ToggleSplitButton> </ui:ToggleSplitButton>
<Border <Border
Width="2" Width="2"
Margin="2,0"
IsVisible="{Binding !ShowLoadProgress}"
BorderThickness="1"
Height="12" Height="12"
BorderBrush="Gray" /> Margin="2,0"
BorderBrush="Gray"
BorderThickness="1"
IsVisible="{Binding !ShowLoadProgress}" />
<TextBlock <TextBlock
Margin="5,0,5,0" Margin="5,0,5,0"
IsVisible="{Binding !ShowLoadProgress}"
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !ShowLoadProgress}"
Text="{Binding GameStatusText}" Text="{Binding GameStatusText}"
TextAlignment="Left" /> TextAlignment="Left" />
<Border <Border
Width="2" Width="2"
IsVisible="{Binding !ShowLoadProgress}"
Margin="2,0"
BorderThickness="1"
Height="12" Height="12"
BorderBrush="Gray" /> Margin="2,0"
BorderBrush="Gray"
BorderThickness="1"
IsVisible="{Binding !ShowLoadProgress}" />
<TextBlock <TextBlock
Margin="5,0,5,0" Margin="5,0,5,0"
IsVisible="{Binding !ShowLoadProgress}"
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !ShowLoadProgress}"
Text="{Binding FifoStatusText}" Text="{Binding FifoStatusText}"
TextAlignment="Left" /> TextAlignment="Left" />
<Border <Border
Width="2" Width="2"
Margin="2,0"
IsVisible="{Binding !ShowLoadProgress}"
BorderThickness="1"
Height="12" Height="12"
BorderBrush="Gray" /> Margin="2,0"
BorderBrush="Gray"
BorderThickness="1"
IsVisible="{Binding !ShowLoadProgress}" />
<TextBlock <TextBlock
Margin="5,0,5,0" Margin="5,0,5,0"
IsVisible="{Binding !ShowLoadProgress}"
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !ShowLoadProgress}"
Text="{Binding GpuStatusText}" Text="{Binding GpuStatusText}"
TextAlignment="Left" /> TextAlignment="Left" />
</StackPanel> </StackPanel>
<StackPanel VerticalAlignment="Center" IsVisible="{Binding ShowFirmwareStatus}" Grid.Column="3" <StackPanel
Orientation="Horizontal" Margin="10, 0"> Grid.Column="3"
Margin="10,0"
VerticalAlignment="Center"
IsVisible="{Binding ShowFirmwareStatus}"
Orientation="Horizontal">
<TextBlock <TextBlock
Name="FirmwareStatus" Name="FirmwareStatus"
Margin="0"
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Center" VerticalAlignment="Center"
Margin="0"
Text="{locale:Locale StatusBarSystemVersion}" /> Text="{locale:Locale StatusBarSystemVersion}" />
</StackPanel> </StackPanel>
</Grid> </Grid>

View file

@ -1,18 +1,26 @@
<window:StyleableWindow xmlns="https://github.com/avaloniaui" <window:StyleableWindow
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="Ryujinx.Ava.Ui.Windows.UpdaterWindow"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns="https://github.com/avaloniaui"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="350" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale" xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
x:Class="Ryujinx.Ava.Ui.Windows.UpdaterWindow" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows" xmlns:window="clr-namespace:Ryujinx.Ava.Ui.Windows"
CanResize="False" Title="Ryujinx Updater"
SizeToContent="Height" Width="500"
Width="500" MinHeight="500" Height="500" Height="500"
WindowStartupLocation="CenterOwner" MinWidth="500"
MinWidth="500" MinHeight="500"
Title="Ryujinx Updater"> d:DesignHeight="350"
<Grid Margin="20" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> d:DesignWidth="400"
CanResize="False"
SizeToContent="Height"
WindowStartupLocation="CenterOwner"
mc:Ignorable="d">
<Grid
Margin="20"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition /> <RowDefinition />
@ -20,17 +28,38 @@
<RowDefinition /> <RowDefinition />
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Grid.Row="1" HorizontalAlignment="Stretch" TextAlignment="Center" Height="20" Name="MainText" /> <TextBlock
<TextBlock Height="20" HorizontalAlignment="Stretch" TextAlignment="Center" Name="SecondaryText" Grid.Row="2" /> Name="MainText"
<ProgressBar IsVisible="False" HorizontalAlignment="Stretch" Name="ProgressBar" Maximum="100" Minimum="0" Grid.Row="1"
Margin="20" Grid.Row="3" /> Height="20"
<StackPanel IsVisible="False" Name="ButtonBox" Orientation="Horizontal" Spacing="20" Grid.Row="4" HorizontalAlignment="Stretch"
HorizontalAlignment="Right"> TextAlignment="Center" />
<Button Command="{Binding YesPressed}" MinWidth="50"> <TextBlock
<TextBlock TextAlignment="Center" Text="{locale:Locale InputDialogYes}" /> Name="SecondaryText"
Grid.Row="2"
Height="20"
HorizontalAlignment="Stretch"
TextAlignment="Center" />
<ProgressBar
Name="ProgressBar"
Grid.Row="3"
Margin="20"
HorizontalAlignment="Stretch"
IsVisible="False"
Maximum="100"
Minimum="0" />
<StackPanel
Name="ButtonBox"
Grid.Row="4"
HorizontalAlignment="Right"
IsVisible="False"
Orientation="Horizontal"
Spacing="20">
<Button MinWidth="50" Command="{Binding YesPressed}">
<TextBlock Text="{locale:Locale InputDialogYes}" TextAlignment="Center" />
</Button> </Button>
<Button Command="{Binding NoPressed}" MinWidth="50"> <Button MinWidth="50" Command="{Binding NoPressed}">
<TextBlock TextAlignment="Center" Text="{locale:Locale InputDialogNo}" /> <TextBlock Text="{locale:Locale InputDialogNo}" TextAlignment="Center" />
</Button> </Button>
</StackPanel> </StackPanel>
</Grid> </Grid>