mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-20 17:51:13 +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:
@@ -3,19 +3,19 @@
|
||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia" Version="11.3.18" />
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.13" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.18" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.18" />
|
||||
<PackageVersion Include="Avalonia.Markup.Xaml.Loader" Version="11.3.18" />
|
||||
<PackageVersion Include="Svg.Controls.Avalonia" Version="11.3.9.5" />
|
||||
<PackageVersion Include="Svg.Controls.Skia.Avalonia" Version="11.3.9.5" />
|
||||
<PackageVersion Include="Avalonia" Version="12.1.1" />
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="12.1.2" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="12.1.1" />
|
||||
<PackageVersion Include="AvaloniaUI.DiagnosticsSupport" Version="2.2.3" />
|
||||
<PackageVersion Include="Avalonia.Markup.Xaml.Loader" Version="12.1.1" />
|
||||
<PackageVersion Include="Svg.Controls.Avalonia" Version="12.0.0.13" />
|
||||
<PackageVersion Include="Svg.Controls.Skia.Avalonia" Version="12.0.0.13" />
|
||||
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
|
||||
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.2" />
|
||||
<PackageVersion Include="Concentus" Version="2.2.2" />
|
||||
<PackageVersion Include="DiscordRichPresence" Version="1.6.1.70" />
|
||||
<PackageVersion Include="DynamicData" Version="9.4.33" />
|
||||
<PackageVersion Include="FluentAvaloniaUI" Version="2.5.1" />
|
||||
<PackageVersion Include="FluentAvaloniaUI" Version="3.0.2" />
|
||||
<PackageVersion Include="Gommon" Version="2.8.1.2" />
|
||||
<PackageVersion Include="Humanizer" Version="3.0.10" />
|
||||
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Platform;
|
||||
@@ -39,6 +40,10 @@ namespace Ryujinx.Ava
|
||||
FAUISettings.SetAnimationsEnabledAtAppLevel(false);
|
||||
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
|
||||
#if DEBUG
|
||||
this.AttachDeveloperTools(options => options.Gesture = new KeyGesture(Key.F12, KeyModifiers.Control));
|
||||
#endif
|
||||
|
||||
if (OperatingSystem.IsMacOS())
|
||||
{
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
Text="Rrrrr"
|
||||
UseFloatingWatermark="True"
|
||||
Watermark="Hello" />
|
||||
UseFloatingPlaceholder="True"
|
||||
PlaceholderText="Hello" />
|
||||
<CheckBox>Test Check</CheckBox>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<ui:NumberBox Value="1" />
|
||||
<ui:FANumberBox Value="1" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
@@ -233,7 +233,7 @@
|
||||
</Style>
|
||||
<Style Selector="Button">
|
||||
<Setter Property="MinWidth"
|
||||
Value="80" />
|
||||
Value="0" />
|
||||
</Style>
|
||||
<Style Selector="ProgressBar:horizontal">
|
||||
<Setter Property="MinWidth" Value="0"/>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Avalonia.Data;
|
||||
using Avalonia.Data.Core;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Markup.Xaml.MarkupExtensions;
|
||||
|
||||
@@ -248,11 +248,11 @@ namespace Ryujinx.Modules
|
||||
|
||||
string updateFile = Path.Combine(_updateDir, "update.bin");
|
||||
|
||||
TaskDialog taskDialog = new()
|
||||
FATaskDialog taskDialog = new()
|
||||
{
|
||||
Header = LocaleManager.Instance[LocaleKeys.RyujinxUpdater],
|
||||
SubHeader = LocaleManager.Instance[LocaleKeys.UpdaterDownloading],
|
||||
IconSource = new SymbolIconSource { Symbol = Symbol.Download },
|
||||
IconSource = new FASymbolIconSource { Symbol = FASymbol.Download },
|
||||
ShowProgressBar = true,
|
||||
XamlRoot = parent,
|
||||
};
|
||||
@@ -341,7 +341,7 @@ namespace Ryujinx.Modules
|
||||
}
|
||||
}
|
||||
|
||||
private static void DoUpdateWithMultipleThreads(TaskDialog taskDialog, string downloadUrl, string updateFile)
|
||||
private static void DoUpdateWithMultipleThreads(FATaskDialog taskDialog, string downloadUrl, string updateFile)
|
||||
{
|
||||
// Multi-Threaded Updater
|
||||
long chunkSize = _buildSize / ConnectionCount;
|
||||
@@ -389,7 +389,7 @@ namespace Ryujinx.Modules
|
||||
|
||||
Interlocked.Add(ref totalProgressPercentage, args.ProgressPercentage);
|
||||
|
||||
taskDialog.SetProgressBarState(totalProgressPercentage / ConnectionCount, TaskDialogProgressState.Normal);
|
||||
taskDialog.SetProgressBarState(totalProgressPercentage / ConnectionCount, FATaskDialogProgressState.Normal);
|
||||
};
|
||||
|
||||
client.DownloadDataCompleted += (_, args) =>
|
||||
@@ -466,7 +466,7 @@ namespace Ryujinx.Modules
|
||||
}
|
||||
}
|
||||
|
||||
private static void DoUpdateWithSingleThreadWorker(TaskDialog taskDialog, string downloadUrl, string updateFile)
|
||||
private static void DoUpdateWithSingleThreadWorker(FATaskDialog taskDialog, string downloadUrl, string updateFile)
|
||||
{
|
||||
using HttpClient client = new();
|
||||
// We do not want to timeout while downloading
|
||||
@@ -494,7 +494,7 @@ namespace Ryujinx.Modules
|
||||
|
||||
byteWritten += readSize;
|
||||
|
||||
taskDialog.SetProgressBarState(GetPercentage(byteWritten, totalBytes), TaskDialogProgressState.Normal);
|
||||
taskDialog.SetProgressBarState(GetPercentage(byteWritten, totalBytes), FATaskDialogProgressState.Normal);
|
||||
|
||||
updateFileStream.Write(buffer, 0, readSize);
|
||||
}
|
||||
@@ -509,7 +509,7 @@ namespace Ryujinx.Modules
|
||||
return max == 0 ? 0 : value / max * 100;
|
||||
}
|
||||
|
||||
private static void DoUpdateWithSingleThread(TaskDialog taskDialog, string downloadUrl, string updateFile)
|
||||
private static void DoUpdateWithSingleThread(FATaskDialog taskDialog, string downloadUrl, string updateFile)
|
||||
{
|
||||
Thread worker = new(() => DoUpdateWithSingleThreadWorker(taskDialog, downloadUrl, updateFile))
|
||||
{
|
||||
@@ -521,7 +521,7 @@ namespace Ryujinx.Modules
|
||||
|
||||
[SupportedOSPlatform("linux")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
private static void ExtractTarGzipFile(TaskDialog taskDialog, string archivePath, string outputDirectoryPath)
|
||||
private static void ExtractTarGzipFile(FATaskDialog taskDialog, string archivePath, string outputDirectoryPath)
|
||||
{
|
||||
using Stream inStream = File.OpenRead(archivePath);
|
||||
using GZipInputStream gzipStream = new(inStream);
|
||||
@@ -553,12 +553,12 @@ namespace Ryujinx.Modules
|
||||
return;
|
||||
}
|
||||
|
||||
taskDialog.SetProgressBarState(GetPercentage(tarEntry.Size, inStream.Length), TaskDialogProgressState.Normal);
|
||||
taskDialog.SetProgressBarState(GetPercentage(tarEntry.Size, inStream.Length), FATaskDialogProgressState.Normal);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static void ExtractZipFile(TaskDialog taskDialog, string archivePath, string outputDirectoryPath)
|
||||
private static void ExtractZipFile(FATaskDialog taskDialog, string archivePath, string outputDirectoryPath)
|
||||
{
|
||||
using Stream inStream = File.OpenRead(archivePath);
|
||||
using ZipFile zipFile = new(inStream);
|
||||
@@ -585,16 +585,16 @@ namespace Ryujinx.Modules
|
||||
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
taskDialog.SetProgressBarState(GetPercentage(count, zipFile.Count), TaskDialogProgressState.Normal);
|
||||
taskDialog.SetProgressBarState(GetPercentage(count, zipFile.Count), FATaskDialogProgressState.Normal);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static void InstallUpdate(TaskDialog taskDialog, string updateFile)
|
||||
private static void InstallUpdate(FATaskDialog taskDialog, string updateFile)
|
||||
{
|
||||
// Extract Update
|
||||
taskDialog.SubHeader = LocaleManager.Instance[LocaleKeys.UpdaterExtracting];
|
||||
taskDialog.SetProgressBarState(0, TaskDialogProgressState.Normal);
|
||||
taskDialog.SetProgressBarState(0, FATaskDialogProgressState.Normal);
|
||||
|
||||
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
|
||||
{
|
||||
@@ -615,7 +615,7 @@ namespace Ryujinx.Modules
|
||||
List<string> allFiles = EnumerateFilesToDelete().ToList();
|
||||
|
||||
taskDialog.SubHeader = LocaleManager.Instance[LocaleKeys.UpdaterRenaming];
|
||||
taskDialog.SetProgressBarState(0, TaskDialogProgressState.Normal);
|
||||
taskDialog.SetProgressBarState(0, FATaskDialogProgressState.Normal);
|
||||
|
||||
// NOTE: On macOS, replacement is delayed to the restart phase.
|
||||
if (!OperatingSystem.IsMacOS())
|
||||
@@ -631,7 +631,7 @@ namespace Ryujinx.Modules
|
||||
|
||||
Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
taskDialog.SetProgressBarState(GetPercentage(count, allFiles.Count), TaskDialogProgressState.Normal);
|
||||
taskDialog.SetProgressBarState(GetPercentage(count, allFiles.Count), FATaskDialogProgressState.Normal);
|
||||
});
|
||||
}
|
||||
catch
|
||||
@@ -643,7 +643,7 @@ namespace Ryujinx.Modules
|
||||
Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
taskDialog.SubHeader = LocaleManager.Instance[LocaleKeys.UpdaterAddingFiles];
|
||||
taskDialog.SetProgressBarState(0, TaskDialogProgressState.Normal);
|
||||
taskDialog.SetProgressBarState(0, FATaskDialogProgressState.Normal);
|
||||
});
|
||||
|
||||
MoveAllFilesOver(_updatePublishDir, _homeDir, taskDialog);
|
||||
@@ -745,7 +745,7 @@ namespace Ryujinx.Modules
|
||||
return files.Where(f => !new FileInfo(f).Attributes.HasFlag(FileAttributes.Hidden | FileAttributes.System));
|
||||
}
|
||||
|
||||
private static void MoveAllFilesOver(string root, string dest, TaskDialog taskDialog)
|
||||
private static void MoveAllFilesOver(string root, string dest, FATaskDialog taskDialog)
|
||||
{
|
||||
int total = Directory.GetFiles(root, "*", SearchOption.AllDirectories).Length;
|
||||
foreach (string directory in Directory.GetDirectories(root))
|
||||
@@ -769,7 +769,7 @@ namespace Ryujinx.Modules
|
||||
|
||||
Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
taskDialog.SetProgressBarState(GetPercentage(count, total), TaskDialogProgressState.Normal);
|
||||
taskDialog.SetProgressBarState(GetPercentage(count, total), FATaskDialogProgressState.Normal);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" />
|
||||
<PackageReference Include="Avalonia.Desktop" />
|
||||
<PackageReference Include="Avalonia.Diagnostics" Condition="'$(Configuration)'=='Debug'" />
|
||||
<PackageReference Include="AvaloniaUI.DiagnosticsSupport" Condition="'$(Configuration)'=='Debug'" />
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid" />
|
||||
<PackageReference Include="Avalonia.Markup.Xaml.Loader" />
|
||||
<PackageReference Include="Svg.Controls.Avalonia" />
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
LocaleManager.Instance[LocaleKeys.DialogOpenSettingsWindowLabel],
|
||||
"",
|
||||
LocaleManager.Instance[LocaleKeys.SettingsButtonClose],
|
||||
(int)Symbol.Important,
|
||||
(int)FASymbol.Important,
|
||||
deferEvent,
|
||||
async window =>
|
||||
{
|
||||
|
||||
@@ -70,16 +70,16 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
|
||||
public static async Task<UserResult> ShowControllerAppletDialog(MainWindow window, ControllerAppletUIArgs args)
|
||||
{
|
||||
ContentDialog contentDialog = new();
|
||||
FAContentDialog contentDialog = new();
|
||||
UserResult result = UserResult.Cancel;
|
||||
ControllerAppletDialog content = new(window, args);
|
||||
|
||||
contentDialog.Title = LocaleManager.Instance[LocaleKeys.DialogControllerAppletTitle];
|
||||
contentDialog.Content = content;
|
||||
|
||||
void Handler(ContentDialog sender, ContentDialogClosedEventArgs eventArgs)
|
||||
void Handler(FAContentDialog sender, FAContentDialogClosedEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.Result == ContentDialogResult.Primary)
|
||||
if (eventArgs.Result == FAContentDialogResult.Primary)
|
||||
{
|
||||
result = UserResult.Ok;
|
||||
}
|
||||
@@ -130,7 +130,7 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
|
||||
public void Close()
|
||||
{
|
||||
((ContentDialog)Parent)?.Hide();
|
||||
((FAContentDialog)Parent)?.Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
Text="{Binding Message}"
|
||||
TextInput="Message_TextInput"
|
||||
TextWrapping="Wrap"
|
||||
UseFloatingWatermark="True" />
|
||||
UseFloatingPlaceholder="True" />
|
||||
<TextBlock
|
||||
Name="Error"
|
||||
Grid.Row="4"
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
private int _inputMin;
|
||||
private readonly string _placeholder;
|
||||
|
||||
private ContentDialog _host;
|
||||
private FAContentDialog _host;
|
||||
|
||||
public SwkbdAppletDialog(string mainText, string secondaryText, string placeholder, string message)
|
||||
{
|
||||
@@ -32,11 +32,11 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
_placeholder = placeholder;
|
||||
InitializeComponent();
|
||||
|
||||
Input.Watermark = _placeholder;
|
||||
Input.PlaceholderText = _placeholder;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(Input.Watermark))
|
||||
if (string.IsNullOrWhiteSpace(Input.PlaceholderText))
|
||||
{
|
||||
Input.UseFloatingWatermark = false;
|
||||
Input.UseFloatingPlaceholder = false;
|
||||
}
|
||||
|
||||
Input.AddHandler(TextInputEvent, Message_TextInput, RoutingStrategies.Tunnel, true);
|
||||
@@ -48,7 +48,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnGotFocus(GotFocusEventArgs e)
|
||||
protected override void OnGotFocus(FocusChangedEventArgs e)
|
||||
{
|
||||
// FIXME: This does not work. Might be a bug in Avalonia with DialogHost
|
||||
// Currently focus will be redirected to the overlay window instead.
|
||||
@@ -61,7 +61,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
|
||||
public static async Task<(UserResult Result, string Input)> ShowInputDialog(string title, SoftwareKeyboardUIArgs args)
|
||||
{
|
||||
ContentDialog contentDialog = new();
|
||||
FAContentDialog contentDialog = new();
|
||||
|
||||
UserResult result = UserResult.Cancel;
|
||||
|
||||
@@ -80,9 +80,9 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
contentDialog.CloseButtonText = LocaleManager.Instance[LocaleKeys.InputDialogCancel];
|
||||
contentDialog.Content = content;
|
||||
|
||||
void Handler(ContentDialog sender, ContentDialogClosedEventArgs eventArgs)
|
||||
void Handler(FAContentDialog sender, FAContentDialogClosedEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.Result == ContentDialogResult.Primary)
|
||||
if (eventArgs.Result == FAContentDialogResult.Primary)
|
||||
{
|
||||
result = UserResult.Ok;
|
||||
input = content.Input.Text;
|
||||
@@ -174,7 +174,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
{
|
||||
if (e.Key == Key.Enter && _host.IsPrimaryButtonEnabled)
|
||||
{
|
||||
_host.Hide(ContentDialogResult.Primary);
|
||||
_host.Hide(FAContentDialogResult.Primary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
</Panel>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Margin="5,5,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
TextAlignment="End"
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Margin="-5,-5,0,0"
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
{
|
||||
DlcSelectViewModel viewModel = new(selectedTitleId, appLibrary);
|
||||
|
||||
ContentDialog contentDialog = new()
|
||||
FAContentDialog contentDialog = new()
|
||||
{
|
||||
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.Continue],
|
||||
SecondaryButtonText = string.Empty,
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
d:DesignHeight="450"
|
||||
x:Class="Ryujinx.Ava.UI.Controls.NavigationDialogHost"
|
||||
Focusable="True">
|
||||
<ui:Frame
|
||||
<ui:FAFrame
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
x:Name="ContentFrame">
|
||||
</ui:Frame>
|
||||
</UserControl>
|
||||
</ui:FAFrame>
|
||||
</UserControl>
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
VirtualFileSystem ownerVirtualFileSystem, HorizonClient ownerHorizonClient)
|
||||
{
|
||||
NavigationDialogHost content = new(ownerAccountManager, ownerContentManager, ownerVirtualFileSystem, ownerHorizonClient);
|
||||
ContentDialog contentDialog = new()
|
||||
FAContentDialog contentDialog = new()
|
||||
{
|
||||
Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle],
|
||||
PrimaryButtonText = "",
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
{
|
||||
public UpdateWaitWindow(string primaryText, string secondaryText, CancellationTokenSource cancellationToken) : this(primaryText, secondaryText)
|
||||
{
|
||||
SystemDecorations = SystemDecorations.Full;
|
||||
WindowDecorations = WindowDecorations.Full;
|
||||
ShowInTaskbar = true;
|
||||
|
||||
Closing += (_, _) => cancellationToken.Cancel();
|
||||
@@ -19,7 +19,7 @@ namespace Ryujinx.Ava.UI.Controls
|
||||
PrimaryText.Text = primaryText;
|
||||
SecondaryText.Text = secondaryText;
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
SystemDecorations = SystemDecorations.BorderOnly;
|
||||
WindowDecorations = WindowDecorations.BorderOnly;
|
||||
ShowInTaskbar = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
using System;
|
||||
|
||||
#nullable enable
|
||||
namespace Ryujinx.Ava.UI.Helpers;
|
||||
|
||||
public ref struct CharacterReader(ReadOnlySpan<char> s)
|
||||
{
|
||||
private ReadOnlySpan<char> _s = s;
|
||||
|
||||
public bool End => this._s.IsEmpty;
|
||||
|
||||
public char Peek => this._s[0];
|
||||
|
||||
public int Position { get; private set; }
|
||||
|
||||
public char Take()
|
||||
{
|
||||
++this.Position;
|
||||
int num = (int) this._s[0];
|
||||
this._s = this._s.Slice(1);
|
||||
return (char) num;
|
||||
}
|
||||
|
||||
public void SkipWhitespace()
|
||||
{
|
||||
ReadOnlySpan<char> readOnlySpan = this._s.TrimStart();
|
||||
this.Position += this._s.Length - readOnlySpan.Length;
|
||||
this._s = readOnlySpan;
|
||||
}
|
||||
|
||||
public bool TakeIf(char c)
|
||||
{
|
||||
if ((int) this.Peek != (int) c)
|
||||
return false;
|
||||
int num = (int) this.Take();
|
||||
return true;
|
||||
}
|
||||
|
||||
internal bool TakeIf(string s)
|
||||
{
|
||||
if (!this.TryPeek(s.Length).SequenceEqual<char>(s.AsSpan()))
|
||||
return false;
|
||||
this._s = this._s.Slice(s.Length);
|
||||
this.Position += s.Length;
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool TakeIf(Func<char, bool> condition)
|
||||
{
|
||||
if (!condition(this.Peek))
|
||||
return false;
|
||||
int num = (int) this.Take();
|
||||
return true;
|
||||
}
|
||||
|
||||
public ReadOnlySpan<char> TakeUntil(char c)
|
||||
{
|
||||
int num = 0;
|
||||
while (num < this._s.Length && (int) this._s[num] != (int) c)
|
||||
++num;
|
||||
ReadOnlySpan<char> until = this._s.Slice(0, num);
|
||||
this._s = this._s.Slice(num);
|
||||
this.Position += num;
|
||||
return until;
|
||||
}
|
||||
|
||||
public ReadOnlySpan<char> TakeWhile(Func<char, bool> condition)
|
||||
{
|
||||
int num = 0;
|
||||
while (num < this._s.Length && condition(this._s[num]))
|
||||
++num;
|
||||
ReadOnlySpan<char> readOnlySpan = this._s.Slice(0, num);
|
||||
this._s = this._s.Slice(num);
|
||||
this.Position += num;
|
||||
return readOnlySpan;
|
||||
}
|
||||
|
||||
public ReadOnlySpan<char> TryPeek(int count)
|
||||
{
|
||||
return this._s.Length < count ? ReadOnlySpan<char>.Empty : this._s.Slice(0, count);
|
||||
}
|
||||
|
||||
public ReadOnlySpan<char> PeekWhitespace()
|
||||
{
|
||||
return this._s.Slice(0, this._s.Length - this._s.TrimStart().Length);
|
||||
}
|
||||
|
||||
public void Skip(int count)
|
||||
{
|
||||
if (this._s.Length < count)
|
||||
throw new IndexOutOfRangeException();
|
||||
this._s = this._s.Slice(count);
|
||||
}
|
||||
}
|
||||
@@ -28,11 +28,11 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
string closeButton,
|
||||
UserResult primaryButtonResult = UserResult.Ok,
|
||||
ManualResetEvent deferResetEvent = null,
|
||||
TypedEventHandler<ContentDialog, ContentDialogButtonClickEventArgs> deferCloseAction = null)
|
||||
TypedEventHandler<FAContentDialog, FAContentDialogButtonClickEventArgs> deferCloseAction = null)
|
||||
{
|
||||
UserResult result = UserResult.None;
|
||||
|
||||
ContentDialog contentDialog = new()
|
||||
FAContentDialog contentDialog = new()
|
||||
{
|
||||
Title = title,
|
||||
PrimaryButtonText = primaryButton,
|
||||
@@ -77,7 +77,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
int iconSymbol,
|
||||
UserResult primaryButtonResult = UserResult.Ok,
|
||||
ManualResetEvent deferResetEvent = null,
|
||||
TypedEventHandler<ContentDialog, ContentDialogButtonClickEventArgs> deferCloseAction = null)
|
||||
TypedEventHandler<FAContentDialog, FAContentDialogButtonClickEventArgs> deferCloseAction = null)
|
||||
{
|
||||
Grid content = CreateTextDialogContent(primaryText, secondaryText, iconSymbol);
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
deferResetEvent,
|
||||
DeferClose);
|
||||
|
||||
async void DeferClose(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
||||
async void DeferClose(FAContentDialog sender, FAContentDialogButtonClickEventArgs args)
|
||||
{
|
||||
if (startedDeferring)
|
||||
{
|
||||
@@ -121,7 +121,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
|
||||
startedDeferring = true;
|
||||
|
||||
Deferral deferral = args.GetDeferral();
|
||||
FADeferral deferral = args.GetDeferral();
|
||||
|
||||
sender.PrimaryButtonClick -= DeferClose;
|
||||
|
||||
@@ -154,9 +154,9 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
MinHeight = 80,
|
||||
};
|
||||
|
||||
SymbolIcon icon = new()
|
||||
FASymbolIcon icon = new()
|
||||
{
|
||||
Symbol = (Symbol)symbol,
|
||||
Symbol = (FASymbol)symbol,
|
||||
Margin = new Thickness(10),
|
||||
FontSize = 40,
|
||||
FlowDirection = FlowDirection.LeftToRight,
|
||||
@@ -209,7 +209,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
acceptButton,
|
||||
"",
|
||||
closeButton,
|
||||
(int)Symbol.Important);
|
||||
(int)FASymbol.Important);
|
||||
}
|
||||
|
||||
internal static async Task<UserResult> CreateConfirmationDialog(
|
||||
@@ -227,7 +227,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
acceptButtonText,
|
||||
"",
|
||||
cancelButtonText,
|
||||
(int)Symbol.Help,
|
||||
(int)FASymbol.Help,
|
||||
primaryButtonResult);
|
||||
}
|
||||
internal static async Task<UserResult> CreateConfirmationDialogExtended(
|
||||
@@ -245,7 +245,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
acceptButtonText,
|
||||
noacceptButtonText,
|
||||
cancelButtonText,
|
||||
(int)Symbol.Help,
|
||||
(int)FASymbol.Help,
|
||||
primaryButtonResult);
|
||||
|
||||
internal static async Task<UserResult> CreateLocalizedConfirmationDialog(string primaryText, string secondaryText)
|
||||
@@ -265,7 +265,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
"",
|
||||
"",
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogOk],
|
||||
(int)Symbol.Important);
|
||||
(int)FASymbol.Important);
|
||||
}
|
||||
|
||||
internal static async Task CreateWarningDialog(string primary, string secondaryText)
|
||||
@@ -277,7 +277,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
"",
|
||||
"",
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogOk],
|
||||
(int)Symbol.Important);
|
||||
(int)FASymbol.Important);
|
||||
}
|
||||
|
||||
internal static async Task CreateErrorDialog(string errorMessage, string secondaryErrorMessage = "")
|
||||
@@ -291,7 +291,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
secondaryErrorMessage,
|
||||
"",
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogOk],
|
||||
(int)Symbol.Dismiss);
|
||||
(int)FASymbol.Dismiss);
|
||||
}
|
||||
|
||||
internal static async Task<bool> CreateChoiceDialog(string title, string primary, string secondaryText)
|
||||
@@ -310,7 +310,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogYes],
|
||||
"",
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogNo],
|
||||
(int)Symbol.Help,
|
||||
(int)FASymbol.Help,
|
||||
UserResult.Yes);
|
||||
|
||||
_isChoiceDialogOpen = false;
|
||||
@@ -334,9 +334,9 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
LocaleManager.Instance[LocaleKeys.DialogExitSubMessage]);
|
||||
}
|
||||
|
||||
public static async Task<ContentDialogResult> ShowAsync(ContentDialog contentDialog)
|
||||
public static async Task<FAContentDialogResult> ShowAsync(FAContentDialog contentDialog)
|
||||
{
|
||||
ContentDialogResult result;
|
||||
FAContentDialogResult result;
|
||||
bool isTopDialog = true;
|
||||
|
||||
Window parent = GetMainWindow();
|
||||
@@ -390,14 +390,14 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
result = await ShowDialog();
|
||||
}
|
||||
|
||||
result = await _contentDialogOverlayWindow.ShowDialog<ContentDialogResult>(parent);
|
||||
result = await _contentDialogOverlayWindow.ShowDialog<FAContentDialogResult>(parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await ShowDialog();
|
||||
}
|
||||
|
||||
async Task<ContentDialogResult> ShowDialog()
|
||||
async Task<FAContentDialogResult> ShowDialog()
|
||||
{
|
||||
if (_contentDialogOverlayWindow is not null)
|
||||
{
|
||||
@@ -407,7 +407,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
}
|
||||
else
|
||||
{
|
||||
result = ContentDialogResult.None;
|
||||
result = FAContentDialogResult.None;
|
||||
|
||||
Logger.Warning?.Print(LogClass.UI, "Content dialog overlay failed to populate. Default value has been returned.");
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||
|
||||
private static readonly Dictionary<Glyph, string> _glyphs = new()
|
||||
{
|
||||
{ Glyph.List, char.ConvertFromUtf32((int)Symbol.List) },
|
||||
{ Glyph.Grid, char.ConvertFromUtf32((int)Symbol.ViewAll) },
|
||||
{ Glyph.List, char.ConvertFromUtf32((int)FASymbol.List) },
|
||||
{ Glyph.Grid, char.ConvertFromUtf32((int)FASymbol.ViewAll) },
|
||||
{ Glyph.Chip, char.ConvertFromUtf32(59748) },
|
||||
{ Glyph.Important, char.ConvertFromUtf32((int)Symbol.Important) },
|
||||
{ Glyph.Important, char.ConvertFromUtf32((int)FASymbol.Important) },
|
||||
};
|
||||
|
||||
public GlyphValueConverter(string key)
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
string msg = string.Format(LocaleManager.Instance[LocaleKeys.DlcWindowDlcAddedMessage], numAdded);
|
||||
return Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
await ContentDialogHelper.ShowTextDialog(LocaleManager.Instance[LocaleKeys.DialogConfirmationTitle], msg, "", "", "", LocaleManager.Instance[LocaleKeys.InputDialogOk], (int)Symbol.Checkmark);
|
||||
await ContentDialogHelper.ShowTextDialog(LocaleManager.Instance[LocaleKeys.DialogConfirmationTitle], msg, "", "", "", LocaleManager.Instance[LocaleKeys.InputDialogOk], (int)FASymbol.Checkmark);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1196,7 +1196,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
await ContentDialogHelper.ShowTextDialog(
|
||||
LocaleManager.Instance[numAdded > 0 || numRemoved > 0 ? LocaleKeys.RyujinxConfirm : LocaleKeys.RyujinxInfo],
|
||||
msg, "", "", "", LocaleManager.Instance[LocaleKeys.InputDialogOk], (int)Symbol.Checkmark);
|
||||
msg, "", "", "", LocaleManager.Instance[LocaleKeys.InputDialogOk], (int)FASymbol.Checkmark);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1275,9 +1275,12 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
Glyph = Glyph.Grid;
|
||||
}
|
||||
|
||||
public void SetAspectRatio(AspectRatio aspectRatio)
|
||||
public void SetAspectRatio(object aspectRatio)
|
||||
{
|
||||
ConfigurationState.Instance.Graphics.AspectRatio.Value = aspectRatio;
|
||||
if (aspectRatio is AspectRatio ratio)
|
||||
{
|
||||
ConfigurationState.Instance.Graphics.AspectRatio.Value = ratio;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task InstallFirmwareFromFile()
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
string msg = string.Format(LocaleManager.Instance[LocaleKeys.UpdateWindowUpdateAddedMessage], numAdded);
|
||||
return Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
await ContentDialogHelper.ShowTextDialog(LocaleManager.Instance[LocaleKeys.DialogConfirmationTitle], msg, "", "", "", LocaleManager.Instance[LocaleKeys.InputDialogOk], (int)Symbol.Checkmark);
|
||||
await ContentDialogHelper.ShowTextDialog(LocaleManager.Instance[LocaleKeys.DialogConfirmationTitle], msg, "", "", "", LocaleManager.Instance[LocaleKeys.InputDialogOk], (int)FASymbol.Checkmark);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
public static async Task Show()
|
||||
{
|
||||
ContentDialog contentDialog = new()
|
||||
FAContentDialog contentDialog = new()
|
||||
{
|
||||
PrimaryButtonText = "",
|
||||
SecondaryButtonText = "",
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
Title="ContentDialogOverlayWindow"
|
||||
Focusable="False">
|
||||
<window:StyleableWindow.Styles>
|
||||
<Style Selector="ui|ContentDialog /template/ Panel#LayoutRoot">
|
||||
<Style Selector="ui|FAContentDialog /template/ Panel#LayoutRoot">
|
||||
<Setter Property="Background"
|
||||
Value="Transparent" />
|
||||
</Style>
|
||||
</window:StyleableWindow.Styles>
|
||||
<ui:ContentDialog Name="ContentDialog"
|
||||
<ui:FAContentDialog Name="ContentDialog"
|
||||
IsPrimaryButtonEnabled="True"
|
||||
IsSecondaryButtonEnabled="True"
|
||||
IsVisible="False"
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
TransparencyLevelHint = [WindowTransparencyLevel.Transparent];
|
||||
WindowStartupLocation = WindowStartupLocation.Manual;
|
||||
SystemDecorations = SystemDecorations.None;
|
||||
WindowDecorations = WindowDecorations.None;
|
||||
ExtendClientAreaTitleBarHeightHint = 0;
|
||||
Background = Brushes.Transparent;
|
||||
CanResize = false;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
Spacing="5"
|
||||
Orientation="Horizontal"
|
||||
IsVisible="{Binding ShowBundledContentNotice}">
|
||||
<ui:FontIcon
|
||||
<ui:FAFontIcon
|
||||
Margin="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
FontFamily="avares://FluentAvalonia/Fonts#Symbols"
|
||||
@@ -63,7 +63,7 @@
|
||||
MinHeight="29"
|
||||
MaxHeight="29"
|
||||
HorizontalAlignment="Stretch"
|
||||
Watermark="{locale:Locale Search}"
|
||||
PlaceholderText="{locale:Locale Search}"
|
||||
Text="{Binding Search}" />
|
||||
</Grid>
|
||||
</Panel>
|
||||
@@ -124,7 +124,7 @@
|
||||
MinWidth="0"
|
||||
MinHeight="0"
|
||||
Click="OpenLocation">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="OpenFolder"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
@@ -136,7 +136,7 @@
|
||||
MinWidth="0"
|
||||
MinHeight="0"
|
||||
Click="RemoveDLC">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="Cancel"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
public static async Task Show(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
|
||||
{
|
||||
ContentDialog contentDialog = new()
|
||||
FAContentDialog contentDialog = new()
|
||||
{
|
||||
PrimaryButtonText = "",
|
||||
SecondaryButtonText = "",
|
||||
@@ -51,12 +51,12 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
private void SaveAndClose(object sender, RoutedEventArgs routedEventArgs)
|
||||
{
|
||||
ViewModel.Save();
|
||||
((ContentDialog)Parent)?.Hide();
|
||||
((FAContentDialog)Parent)?.Hide();
|
||||
}
|
||||
|
||||
private void Close(object sender, RoutedEventArgs e)
|
||||
{
|
||||
((ContentDialog)Parent)?.Hide();
|
||||
((FAContentDialog)Parent)?.Hide();
|
||||
}
|
||||
|
||||
private void RemoveDLC(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
WindowStartupLocation="Manual"
|
||||
Focusable="True">
|
||||
<Window.Styles>
|
||||
<Style Selector="TitleBar:fullscreen">
|
||||
<Style Selector="WindowDrawnDecorations:fullscreen /template/ Border">
|
||||
<Setter Property="Background" Value="#000000" />
|
||||
</Style>
|
||||
</Window.Styles>
|
||||
|
||||
@@ -125,17 +125,15 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnClosed(EventArgs e)
|
||||
/* protected override void OnClosed(EventArgs e)
|
||||
{
|
||||
base.OnClosed(e);
|
||||
if (PlatformSettings != null)
|
||||
{
|
||||
/// <summary>
|
||||
/// Unsubscribe to the ColorValuesChanged event
|
||||
/// </summary>
|
||||
// Unsubscribe to the ColorValuesChanged event
|
||||
PlatformSettings.ColorValuesChanged -= OnPlatformColorValuesChanged;
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
||||
{
|
||||
@@ -309,7 +307,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
LocaleManager.Instance[LocaleKeys.LinuxVmMaxMapCountDialogButtonUntilRestart],
|
||||
LocaleManager.Instance[LocaleKeys.LinuxVmMaxMapCountDialogButtonPersistent],
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogNo],
|
||||
(int)Symbol.Help
|
||||
(int)FASymbol.Help
|
||||
);
|
||||
|
||||
int rc;
|
||||
@@ -494,7 +492,11 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
_windowStartupWidthDelta = Math.Max(0, Width - ViewModel.WindowWidth);
|
||||
_windowStartupHeightDelta = Math.Max(0, Height - ViewModel.WindowHeight);
|
||||
|
||||
PlatformSettings?.ColorValuesChanged += OnPlatformColorValuesChanged;
|
||||
// Subscribe to the ColorValuesChanged event
|
||||
/* if (PlatformSettings != null)
|
||||
{
|
||||
PlatformSettings.ColorValuesChanged += OnPlatformColorValuesChanged;
|
||||
} */
|
||||
|
||||
ViewModel.Initialize(
|
||||
ContentManager,
|
||||
@@ -744,7 +746,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
await ContentDialogHelper.ShowTextDialog(LocaleManager.Instance[LocaleKeys.DialogConfirmationTitle],
|
||||
msg, "", "", "", LocaleManager.Instance[LocaleKeys.InputDialogOk], (int)Symbol.Checkmark);
|
||||
msg, "", "", "", LocaleManager.Instance[LocaleKeys.InputDialogOk], (int)FASymbol.Checkmark);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
MinHeight="27"
|
||||
MaxHeight="27"
|
||||
HorizontalAlignment="Stretch"
|
||||
Watermark="{locale:Locale Search}"
|
||||
PlaceholderText="{locale:Locale Search}"
|
||||
Text="{Binding Search}" />
|
||||
</Grid>
|
||||
</Panel>
|
||||
@@ -91,7 +91,7 @@
|
||||
MinHeight="0"
|
||||
ToolTip.Tip="{Binding Path}"
|
||||
Click="OpenLocation">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="OpenFolder"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
@@ -103,7 +103,7 @@
|
||||
MinWidth="0"
|
||||
MinHeight="0"
|
||||
Click="DeleteMod">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="Cancel"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
public static async Task Show(ulong titleId, ulong titleIdBase, ApplicationLibrary appLibrary, string titleName)
|
||||
{
|
||||
ContentDialog contentDialog = new()
|
||||
FAContentDialog contentDialog = new()
|
||||
{
|
||||
PrimaryButtonText = "",
|
||||
SecondaryButtonText = "",
|
||||
@@ -53,12 +53,12 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
private void SaveAndClose(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ViewModel.Save();
|
||||
((ContentDialog)Parent)?.Hide();
|
||||
((FAContentDialog)Parent)?.Hide();
|
||||
}
|
||||
|
||||
private void Close(object sender, RoutedEventArgs e)
|
||||
{
|
||||
((ContentDialog)Parent)?.Hide();
|
||||
((FAContentDialog)Parent)?.Hide();
|
||||
}
|
||||
|
||||
private async void DeleteMod(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<settings:SettingsLoggingView Name="LoggingPage" />
|
||||
<settings:SettingsDebugView Name="DebugPage" />
|
||||
</Grid>
|
||||
<ui:NavigationView
|
||||
<ui:FANavigationView
|
||||
Grid.Row="1"
|
||||
IsSettingsVisible="False"
|
||||
Name="NavPanel"
|
||||
@@ -50,63 +50,63 @@
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch"
|
||||
OpenPaneLength="200">
|
||||
<ui:NavigationView.MenuItems>
|
||||
<ui:NavigationViewItem
|
||||
<ui:FANavigationView.MenuItems>
|
||||
<ui:FANavigationViewItem
|
||||
IsSelected="True"
|
||||
Content="{locale:Locale SettingsTabGeneral}"
|
||||
Tag="UiPage"
|
||||
IconSource="New" />
|
||||
<ui:NavigationViewItem
|
||||
<ui:FANavigationViewItem
|
||||
Content="{locale:Locale SettingsTabInput}"
|
||||
Tag="InputPage"
|
||||
IconSource="Games" />
|
||||
<ui:NavigationViewItem
|
||||
<ui:FANavigationViewItem
|
||||
Content="{locale:Locale SettingsTabHotkeys}"
|
||||
Tag="HotkeysPage"
|
||||
IconSource="Keyboard" />
|
||||
<ui:NavigationViewItem
|
||||
<ui:FANavigationViewItem
|
||||
Content="{locale:Locale SettingsTabSystem}"
|
||||
Tag="SystemPage"
|
||||
IconSource="Settings" />
|
||||
<ui:NavigationViewItem
|
||||
<ui:FANavigationViewItem
|
||||
Content="{locale:Locale SettingsTabCpu}"
|
||||
Tag="CpuPage">
|
||||
<ui:NavigationViewItem.IconSource>
|
||||
<ui:FontIconSource
|
||||
<ui:FANavigationViewItem.IconSource>
|
||||
<ui:FAFontIconSource
|
||||
FontFamily="avares://Ryujinx/Assets/Fonts#Segoe Fluent Icons"
|
||||
Glyph="{helpers:GlyphValueConverter Chip}" />
|
||||
</ui:NavigationViewItem.IconSource>
|
||||
</ui:NavigationViewItem>
|
||||
<ui:NavigationViewItem
|
||||
</ui:FANavigationViewItem.IconSource>
|
||||
</ui:FANavigationViewItem>
|
||||
<ui:FANavigationViewItem
|
||||
Content="{locale:Locale SettingsTabGraphics}"
|
||||
Tag="GraphicsPage"
|
||||
IconSource="Image" />
|
||||
<ui:NavigationViewItem
|
||||
<ui:FANavigationViewItem
|
||||
Content="{locale:Locale SettingsTabAudio}"
|
||||
IconSource="Audio"
|
||||
Tag="AudioPage" />
|
||||
<ui:NavigationViewItem
|
||||
<ui:FANavigationViewItem
|
||||
Content="{locale:Locale SettingsTabNetwork}"
|
||||
Tag="NetworkPage"
|
||||
IconSource="Globe" />
|
||||
<ui:NavigationViewItem
|
||||
<ui:FANavigationViewItem
|
||||
Content="{locale:Locale SettingsTabLogging}"
|
||||
Tag="LoggingPage"
|
||||
IconSource="Document" />
|
||||
<ui:NavigationViewItem
|
||||
<ui:FANavigationViewItem
|
||||
Content="{locale:Locale SettingsTabDebug}"
|
||||
Tag="DebugPage"
|
||||
IconSource="Star" />
|
||||
</ui:NavigationView.MenuItems>
|
||||
<ui:NavigationView.Styles>
|
||||
</ui:FANavigationView.MenuItems>
|
||||
<ui:FANavigationView.Styles>
|
||||
<Style Selector="Grid#PlaceholderGrid">
|
||||
<Setter Property="Height" Value="40" />
|
||||
</Style>
|
||||
<Style Selector="ui|NavigationViewItem ui|SymbolIcon">
|
||||
<Style Selector="ui|FANavigationViewItem ui|FASymbolIcon">
|
||||
<Setter Property="FlowDirection" Value="LeftToRight" />
|
||||
</Style>
|
||||
</ui:NavigationView.Styles>
|
||||
</ui:NavigationView>
|
||||
</ui:FANavigationView.Styles>
|
||||
</ui:FANavigationView>
|
||||
<ReversibleStackPanel
|
||||
Grid.Row="2"
|
||||
Margin="10"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using Avalonia.Controls;
|
||||
using FluentAvalonia.Core;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
{
|
||||
@@ -50,9 +50,9 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
NavPanel.SelectedItem = NavPanel.MenuItems.ElementAt(0);
|
||||
}
|
||||
|
||||
private void NavPanelOnSelectionChanged(object sender, NavigationViewSelectionChangedEventArgs e)
|
||||
private void NavPanelOnSelectionChanged(object sender, FANavigationViewSelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.SelectedItem is NavigationViewItem navItem && navItem.Tag is not null)
|
||||
if (e.SelectedItem is FANavigationViewItem navItem && navItem.Tag is not null)
|
||||
{
|
||||
switch (navItem.Tag.ToString())
|
||||
{
|
||||
|
||||
@@ -34,11 +34,11 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
FlowDirection = LocaleManager.Instance.IsRTL() ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
|
||||
}
|
||||
|
||||
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
||||
/* protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
||||
{
|
||||
base.OnApplyTemplate(e);
|
||||
|
||||
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.SystemChrome | ExtendClientAreaChromeHints.OSXThickTitleBar;
|
||||
}
|
||||
} */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
Spacing="5"
|
||||
Orientation="Horizontal"
|
||||
IsVisible="{Binding ShowBundledContentNotice}">
|
||||
<ui:FontIcon
|
||||
<ui:FAFontIcon
|
||||
Margin="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
FontFamily="avares://FluentAvalonia/Fonts#Symbols"
|
||||
@@ -74,7 +74,7 @@
|
||||
MinWidth="0"
|
||||
MinHeight="0"
|
||||
Click="OpenLocation">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="OpenFolder"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
@@ -86,7 +86,7 @@
|
||||
MinWidth="0"
|
||||
MinHeight="0"
|
||||
Click="RemoveUpdate">
|
||||
<ui:SymbolIcon
|
||||
<ui:FASymbolIcon
|
||||
Symbol="Cancel"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
public static async Task Show(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
|
||||
{
|
||||
ContentDialog contentDialog = new()
|
||||
FAContentDialog contentDialog = new()
|
||||
{
|
||||
PrimaryButtonText = "",
|
||||
SecondaryButtonText = "",
|
||||
@@ -50,14 +50,14 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
private void Close(object sender, RoutedEventArgs e)
|
||||
{
|
||||
((ContentDialog)Parent)?.Hide();
|
||||
((FAContentDialog)Parent)?.Hide();
|
||||
}
|
||||
|
||||
public void Save(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ViewModel.Save();
|
||||
|
||||
((ContentDialog)Parent)?.Hide();
|
||||
((FAContentDialog)Parent)?.Hide();
|
||||
}
|
||||
|
||||
private void OpenLocation(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
MaxHeight="29"
|
||||
Margin="5 0 5 0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Watermark="{locale:Locale Search}"
|
||||
PlaceholderText="{locale:Locale Search}"
|
||||
Text="{Binding Search}" />
|
||||
<StackPanel
|
||||
Grid.Column="2"
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
public static async Task Show(MainWindowViewModel mainWindowViewModel)
|
||||
{
|
||||
ContentDialog contentDialog = new()
|
||||
FAContentDialog contentDialog = new()
|
||||
{
|
||||
PrimaryButtonText = "",
|
||||
SecondaryButtonText = "",
|
||||
@@ -59,7 +59,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
private void Close(object sender, RoutedEventArgs e)
|
||||
{
|
||||
((ContentDialog)Parent)?.Hide();
|
||||
((FAContentDialog)Parent)?.Hide();
|
||||
}
|
||||
|
||||
private void Cancel(Object sender, RoutedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user