mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-04 15:18:54 +02:00
UI: Update Avalonia to v12.1
- Avalonia to 12.1.1 - FluentAvalonia to 3.0.2 - Move DevTools Ctrl+F12 keybind to app initialization
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
VerticalAlignment="Center"
|
||||
ToolTip.Tip="{locale:Locale ControllerSettingsLoadProfileToolTip}"
|
||||
Command="{Binding LoadProfile}">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="View"
|
||||
FontSize="15"
|
||||
Height="20" />
|
||||
@@ -105,7 +105,7 @@
|
||||
VerticalAlignment="Center"
|
||||
ToolTip.Tip="{locale:Locale ControllerSettingsSaveProfileToolTip}"
|
||||
Command="{Binding SaveProfile}">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="Save"
|
||||
FontSize="15"
|
||||
Height="20" />
|
||||
@@ -117,7 +117,7 @@
|
||||
VerticalAlignment="Center"
|
||||
ToolTip.Tip="{locale:Locale ControllerSettingsRemoveProfileToolTip}"
|
||||
Command="{Binding RemoveProfile}">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="Delete"
|
||||
FontSize="15"
|
||||
Height="20" />
|
||||
@@ -152,7 +152,7 @@
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Command="{Binding LoadDevices}">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="Refresh"
|
||||
FontSize="15"
|
||||
Height="20"/>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
Margin="0,10,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{locale:Locale ControllerSettingsMotionControllerSlot}" />
|
||||
<ui:NumberBox
|
||||
<ui:FANumberBox
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Name="CemuHookSlotUpDown"
|
||||
@@ -136,7 +136,7 @@
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{locale:Locale ControllerSettingsMotionRightJoyConSlot}" />
|
||||
<ui:NumberBox
|
||||
<ui:FANumberBox
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Name="CemuHookRightJoyConSlotUpDown"
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
{
|
||||
MotionInputView content = new(viewModel);
|
||||
|
||||
ContentDialog contentDialog = new()
|
||||
FAContentDialog contentDialog = new()
|
||||
{
|
||||
Title = LocaleManager.Instance[LocaleKeys.ControllerMotionTitle],
|
||||
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.ControllerSettingsSave],
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Ryujinx.Ava.UI.Views.Input
|
||||
{
|
||||
RumbleInputView content = new(viewModel);
|
||||
|
||||
ContentDialog contentDialog = new()
|
||||
FAContentDialog contentDialog = new()
|
||||
{
|
||||
Title = LocaleManager.Instance[LocaleKeys.ControllerRumbleTitle],
|
||||
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.ControllerSettingsSave],
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
||||
{
|
||||
base.OnAttachedToVisualTree(e);
|
||||
|
||||
if (VisualRoot is MainWindow window)
|
||||
if (TopLevel.GetTopLevel(this) is MainWindow window)
|
||||
{
|
||||
Window = window;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Background="Transparent"
|
||||
Click="Refresh_OnClick">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Width="50"
|
||||
Height="100"
|
||||
Symbol="Refresh" />
|
||||
@@ -96,7 +96,7 @@
|
||||
Margin="-5,0,5,0"
|
||||
Background="Transparent"
|
||||
BorderThickness="0">
|
||||
<ui:SymbolIcon Symbol="Settings"
|
||||
<ui:FASymbolIcon Symbol="Settings"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
Width="14"
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
||||
{
|
||||
base.OnAttachedToVisualTree(e);
|
||||
|
||||
if (VisualRoot is MainWindow window)
|
||||
if (TopLevel.GetTopLevel(this) is MainWindow window)
|
||||
{
|
||||
Window = window;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
Command="{Binding SetListMode}"
|
||||
IsEnabled="{Binding IsGrid}">
|
||||
<ui:FontIcon
|
||||
<ui:FAFontIcon
|
||||
Margin="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
@@ -39,7 +39,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
Command="{Binding SetGridMode}"
|
||||
IsEnabled="{Binding IsList}">
|
||||
<ui:FontIcon
|
||||
<ui:FAFontIcon
|
||||
Margin="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
@@ -79,7 +79,7 @@
|
||||
DockPanel.Dock="Right"
|
||||
KeyUp="SearchBox_OnKeyUp"
|
||||
Text="{Binding SearchText}"
|
||||
Watermark="{locale:Locale MenuSearch}" />
|
||||
PlaceholderText="{locale:Locale MenuSearch}" />
|
||||
<DropDownButton
|
||||
Width="150"
|
||||
HorizontalAlignment="Right"
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Ryujinx.Ava.UI.Views.Main
|
||||
{
|
||||
base.OnAttachedToVisualTree(e);
|
||||
|
||||
if (VisualRoot is MainWindow window)
|
||||
if (TopLevel.GetTopLevel(this) is MainWindow window)
|
||||
{
|
||||
ViewModel = window.ViewModel;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
Text="{locale:Locale SettingsTabSystemAudioVolume}"
|
||||
ToolTip.Tip="{locale:Locale AudioVolumeTooltip}"
|
||||
Width="250" />
|
||||
<ui:NumberBox Value="{Binding Volume}"
|
||||
<ui:FANumberBox Value="{Binding Volume}"
|
||||
ToolTip.Tip="{locale:Locale AudioVolumeTooltip}"
|
||||
Width="350"
|
||||
SmallChange="1"
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
Text="{locale:Locale SettingsTabSystemTurboMultiplier}"
|
||||
ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierToolTip}"
|
||||
Width="250" />
|
||||
<ui:NumberBox ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierValueToolTip}"
|
||||
<ui:FANumberBox ToolTip.Tip="{locale:Locale SettingsTabSystemTurboMultiplierValueToolTip}"
|
||||
Value="{Binding TurboMultiplier}"
|
||||
Width="165"
|
||||
SmallChange="1.0"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
Text="{locale:Locale SettingsTabDebugGDBStubPort}"
|
||||
Width="250" />
|
||||
<ui:NumberBox Value="{Binding GDBStubPort}"
|
||||
<ui:FANumberBox Value="{Binding GDBStubPort}"
|
||||
Width="350"
|
||||
SmallChange="1"
|
||||
LargeChange="10"
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<ComboBoxItem
|
||||
Content="{locale:Locale SettingsTabGraphicsResolutionScaleCustom}" />
|
||||
</ComboBox>
|
||||
<ui:NumberBox
|
||||
<ui:FANumberBox
|
||||
Margin="10,0,0,0"
|
||||
ToolTip.Tip="{locale:Locale ResolutionScaleEntryTooltip}"
|
||||
MinWidth="150"
|
||||
@@ -311,4 +311,4 @@
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
ToolTip.Tip="{locale:Locale FSAccessLogModeTooltip}"
|
||||
Text="{locale:Locale SettingsTabLoggingFsGlobalAccessLogMode}"
|
||||
Width="285" />
|
||||
<ui:NumberBox
|
||||
<ui:FANumberBox
|
||||
Maximum="3"
|
||||
Minimum="0"
|
||||
Width="150"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
Width="250"
|
||||
MaxLength="16"
|
||||
ToolTip.Tip="{locale:Locale LdnPassphraseInputTooltip}"
|
||||
Watermark="{locale:Locale LdnPassphraseInputPublic}" />
|
||||
PlaceholderText="{locale:Locale LdnPassphraseInputPublic}" />
|
||||
<Button
|
||||
Name="GenLdnPassButton"
|
||||
MinWidth="90"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Platform.Storage;
|
||||
using Avalonia.VisualTree;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.Common.Utilities;
|
||||
using System.Collections.Generic;
|
||||
@@ -32,7 +32,7 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.GetVisualRoot() is Window window)
|
||||
if (TopLevel.GetTopLevel(this) is Window window)
|
||||
{
|
||||
IReadOnlyList<IStorageFolder> result = await window.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||
{
|
||||
@@ -82,7 +82,7 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.GetVisualRoot() is Window window)
|
||||
if (TopLevel.GetTopLevel(this) is Window window)
|
||||
{
|
||||
IReadOnlyList<IStorageFolder> result = await window.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
Width="300"
|
||||
HorizontalAlignment="Stretch"
|
||||
MaxLength="{Binding MaxProfileNameLength}"
|
||||
Watermark="{locale:Locale ProfileNameSelectionWatermark}"
|
||||
PlaceholderText="{locale:Locale ProfileNameSelectionWatermark}"
|
||||
Text="{Binding Name}" />
|
||||
<TextBlock Name="IdText" Text="{locale:Locale UserProfilesUserId}" />
|
||||
<TextBox
|
||||
@@ -53,7 +53,7 @@
|
||||
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
|
||||
BorderThickness="1">
|
||||
<Panel>
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
FontSize="60"
|
||||
Width="96"
|
||||
Height="96"
|
||||
@@ -85,7 +85,7 @@
|
||||
Width="50"
|
||||
MinWidth="50"
|
||||
Click="BackButton_Click">
|
||||
<ui:SymbolIcon Symbol="Back" />
|
||||
<ui:FASymbolIcon Symbol="Back" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
|
||||
@@ -9,6 +9,7 @@ using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.Models;
|
||||
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||
using System;
|
||||
using NavigationEventArgs = FluentAvalonia.UI.Navigation.FANavigationEventArgs;
|
||||
using UserProfile = Ryujinx.Ava.UI.Models.UserProfile;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.User
|
||||
@@ -26,7 +27,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
public UserEditorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
AddHandler(FAFrame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
@@ -38,7 +39,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
switch (arg.NavigationMode)
|
||||
{
|
||||
case NavigationMode.New:
|
||||
case FANavigationMode.New:
|
||||
(NavigationDialogHost parent, UserProfile profile, bool isNewUser) = ((NavigationDialogHost parent, UserProfile profile, bool isNewUser))arg.Parameter;
|
||||
_isNewUser = isNewUser;
|
||||
_profile = profile;
|
||||
@@ -48,7 +49,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
break;
|
||||
}
|
||||
|
||||
((ContentDialog)_parent.Parent)?.Title = $"{LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle]} - " +
|
||||
((FAContentDialog)_parent.Parent)?.Title = $"{LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle]} - " +
|
||||
$"{(_isNewUser ? LocaleManager.Instance[LocaleKeys.UserEditorTitleCreate] : LocaleManager.Instance[LocaleKeys.UserEditorTitle])}";
|
||||
|
||||
DataContext = TempProfile;
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
MinWidth="50"
|
||||
Height="35"
|
||||
Click="GoBack">
|
||||
<ui:SymbolIcon Symbol="Back" />
|
||||
<ui:FASymbolIcon Symbol="Back" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
|
||||
@@ -8,6 +8,7 @@ using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using SkiaSharp;
|
||||
using System.IO;
|
||||
using NavigationEventArgs = FluentAvalonia.UI.Navigation.FANavigationEventArgs;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
@@ -29,7 +30,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
AddHandler(FAFrame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
@@ -39,7 +40,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
if (Program.PreviewerDetached)
|
||||
{
|
||||
if (arg.NavigationMode == NavigationMode.New)
|
||||
if (arg.NavigationMode == FANavigationMode.New)
|
||||
{
|
||||
(_parent, _profile) = ((NavigationDialogHost, TempProfile))arg.Parameter;
|
||||
ContentManager = _parent.ContentManager;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
Width="50"
|
||||
MinWidth="50"
|
||||
Click="GoBack">
|
||||
<ui:SymbolIcon Symbol="Back" />
|
||||
<ui:FASymbolIcon Symbol="Back" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Platform.Storage;
|
||||
using Avalonia.VisualTree;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using FluentAvalonia.UI.Navigation;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
@@ -13,6 +13,7 @@ using Ryujinx.HLE.FileSystem;
|
||||
using SkiaSharp;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using NavigationEventArgs = FluentAvalonia.UI.Navigation.FANavigationEventArgs;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
@@ -27,7 +28,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
public UserProfileImageSelectorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
AddHandler(FAFrame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
@@ -39,11 +40,11 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
switch (arg.NavigationMode)
|
||||
{
|
||||
case NavigationMode.New:
|
||||
case FANavigationMode.New:
|
||||
(_parent, _profile) = ((NavigationDialogHost, TempProfile))arg.Parameter;
|
||||
_contentManager = _parent.ContentManager;
|
||||
|
||||
((ContentDialog)_parent.Parent)?.Title = $"{LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle]} - {LocaleManager.Instance[LocaleKeys.ProfileImageSelectionHeader]}";
|
||||
((FAContentDialog)_parent.Parent)?.Title = $"{LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle]} - {LocaleManager.Instance[LocaleKeys.ProfileImageSelectionHeader]}";
|
||||
|
||||
if (Program.PreviewerDetached)
|
||||
{
|
||||
@@ -52,7 +53,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
}
|
||||
|
||||
break;
|
||||
case NavigationMode.Back:
|
||||
case FANavigationMode.Back:
|
||||
if (_profile.Image != null)
|
||||
{
|
||||
_parent.GoBack();
|
||||
@@ -65,8 +66,8 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
private async void Import_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OsUtils.SetCoreDumpable(true);
|
||||
|
||||
if (this.GetVisualRoot() is Window window)
|
||||
|
||||
if (TopLevel.GetTopLevel(this) is Window window)
|
||||
{
|
||||
IReadOnlyList<IStorageFile> result = await window.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
Width="50"
|
||||
MinWidth="50"
|
||||
Click="GoBack">
|
||||
<ui:SymbolIcon Symbol="Back"/>
|
||||
<ui:FASymbolIcon Symbol="Back"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
@@ -4,6 +4,7 @@ using FluentAvalonia.UI.Controls;
|
||||
using FluentAvalonia.UI.Navigation;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.Controls;
|
||||
using NavigationEventArgs = FluentAvalonia.UI.Navigation.FANavigationEventArgs;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
@@ -14,7 +15,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
public UserRecovererView()
|
||||
{
|
||||
InitializeComponent();
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
AddHandler(FAFrame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
@@ -26,12 +27,12 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
switch (arg.NavigationMode)
|
||||
{
|
||||
case NavigationMode.New:
|
||||
case FANavigationMode.New:
|
||||
NavigationDialogHost parent = (NavigationDialogHost)arg.Parameter;
|
||||
|
||||
_parent = parent;
|
||||
|
||||
((ContentDialog)_parent.Parent)?.Title = $"{LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle]} - {LocaleManager.Instance[LocaleKeys.UserProfilesRecoverHeading]}";
|
||||
((FAContentDialog)_parent.Parent)?.Title = $"{LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle]} - {LocaleManager.Instance[LocaleKeys.UserProfilesRecoverHeading]}";
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
|
||||
BorderThickness="1"
|
||||
IsVisible="{Binding !InGameList}">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="Help"
|
||||
FontSize="30"
|
||||
HorizontalAlignment="Center"
|
||||
@@ -151,7 +151,7 @@
|
||||
MinHeight="0"
|
||||
Name="OpenLocation"
|
||||
Click="OpenLocation">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="OpenFolder"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
@@ -164,7 +164,7 @@
|
||||
MinHeight="0"
|
||||
Name="Delete"
|
||||
Click="Delete">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="Delete"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
@@ -183,7 +183,7 @@
|
||||
Width="50"
|
||||
MinWidth="50"
|
||||
Click="GoBack">
|
||||
<ui:SymbolIcon Symbol="Back" />
|
||||
<ui:FASymbolIcon Symbol="Back" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
@@ -19,6 +19,7 @@ using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading.Tasks;
|
||||
using Button = Avalonia.Controls.Button;
|
||||
using NavigationEventArgs = FluentAvalonia.UI.Navigation.FANavigationEventArgs;
|
||||
using UserId = LibHac.Fs.UserId;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.User
|
||||
@@ -35,7 +36,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
public UserSaveManagerView()
|
||||
{
|
||||
InitializeComponent();
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
AddHandler(FAFrame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
@@ -47,7 +48,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
switch (arg.NavigationMode)
|
||||
{
|
||||
case NavigationMode.New:
|
||||
case FANavigationMode.New:
|
||||
(NavigationDialogHost parent, AccountManager accountManager, HorizonClient client, VirtualFileSystem virtualFileSystem) = ((NavigationDialogHost parent, AccountManager accountManager, HorizonClient client, VirtualFileSystem virtualFileSystem))arg.Parameter;
|
||||
_accountManager = accountManager;
|
||||
_horizonClient = client;
|
||||
@@ -58,7 +59,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
}
|
||||
|
||||
DataContext = ViewModel = new UserSaveManagerViewModel(_accountManager);
|
||||
((ContentDialog)_parent.Parent)?.Title = $"{LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle]} - {ViewModel.SaveManagerHeading}";
|
||||
((FAContentDialog)_parent.Parent)?.Title = $"{LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle]} - {ViewModel.SaveManagerHeading}";
|
||||
|
||||
Task.Run(LoadSaves);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
CornerRadius="12"
|
||||
Padding="0"
|
||||
Click="EditUser">
|
||||
<ui:SymbolIcon Symbol="Edit" />
|
||||
<ui:FASymbolIcon Symbol="Edit" />
|
||||
</Button>
|
||||
</Border>
|
||||
</Grid>
|
||||
@@ -123,7 +123,7 @@
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Click="AddUser">
|
||||
<ui:SymbolIcon Symbol="Add" />
|
||||
<ui:FASymbolIcon Symbol="Add" />
|
||||
</Button>
|
||||
<Panel.Styles>
|
||||
<Style Selector="Panel">
|
||||
|
||||
@@ -8,6 +8,7 @@ using Ryujinx.Ava.UI.Controls;
|
||||
using Ryujinx.Ava.UI.Models;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Button = Avalonia.Controls.Button;
|
||||
using NavigationEventArgs = FluentAvalonia.UI.Navigation.FANavigationEventArgs;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
@@ -23,7 +24,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
|
||||
if (Program.PreviewerDetached)
|
||||
{
|
||||
AddHandler(Frame.NavigatedToEvent, (_, e) =>
|
||||
AddHandler(FAFrame.NavigatedToEvent, (_, e) =>
|
||||
{
|
||||
NavigatedTo(e);
|
||||
}, RoutingStrategies.Direct);
|
||||
@@ -34,15 +35,15 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
{
|
||||
if (Program.PreviewerDetached)
|
||||
{
|
||||
if (arg.NavigationMode == NavigationMode.New)
|
||||
if (arg.NavigationMode == FANavigationMode.New)
|
||||
{
|
||||
_parent = (NavigationDialogHost)arg.Parameter;
|
||||
ViewModel = _parent.ViewModel;
|
||||
}
|
||||
|
||||
if (arg.NavigationMode == NavigationMode.Back)
|
||||
if (arg.NavigationMode == FANavigationMode.Back)
|
||||
{
|
||||
((ContentDialog)_parent.Parent)?.Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle];
|
||||
((FAContentDialog)_parent.Parent)?.Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle];
|
||||
}
|
||||
|
||||
DataContext = ViewModel;
|
||||
@@ -123,7 +124,7 @@ namespace Ryujinx.Ava.UI.Views.User
|
||||
|
||||
private void Close(object sender, RoutedEventArgs e)
|
||||
{
|
||||
((ContentDialog)_parent.Parent)?.Hide();
|
||||
((FAContentDialog)_parent.Parent)?.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user