diff --git a/Directory.Packages.props b/Directory.Packages.props
index 8c5ce0410..01236a0b7 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -3,27 +3,27 @@
true
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
+
@@ -57,10 +57,10 @@
-
-
-
-
+
+
+
+
diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs
index 5e048e55d..309e2cbde 100644
--- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs
+++ b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs
@@ -23,15 +23,15 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
private readonly Lock _bufferLock = new();
- private RenderingSurfaceInfo _surfaceInfo = null;
+ private RenderingSurfaceInfo _surfaceInfo;
private SKImageInfo _imageInfo;
- private SKSurface _surface = null;
- private byte[] _bufferData = null;
+ private SKSurface _surface;
+ private byte[] _bufferData;
- private readonly SKBitmap _ryujinxLogo = null;
- private readonly SKBitmap _padAcceptIcon = null;
- private readonly SKBitmap _padCancelIcon = null;
- private readonly SKBitmap _keyModeIcon = null;
+ private readonly SKBitmap _ryujinxLogo;
+ private readonly SKBitmap _padAcceptIcon;
+ private readonly SKBitmap _padCancelIcon;
+ private readonly SKBitmap _keyModeIcon;
private readonly float _textBoxOutlineWidth;
private readonly float _padPressedPenWidth;
@@ -181,7 +181,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
if (newHeight != 0 && newWidth != 0)
{
- SKBitmap resized = bitmap.Resize(new SKImageInfo(newWidth, newHeight), SKFilterQuality.High);
+ SKBitmap resized = bitmap.Resize(new SKImageInfo(newWidth, newHeight), new SKSamplingOptions(SKFilterMode.Linear));
if (resized != null)
{
bitmap.Dispose();
@@ -220,14 +220,16 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
return;
}
- using SKPaint paint = new(_messageFont)
- {
- Color = _textNormalColor,
- IsAntialias = true
- };
+ using SKFont font = new();
+ font.Edging = SKFontEdging.Alias;
+ font.Typeface = SKTypeface.Default;
+
+ using SKPaint paint = new();
+ paint.Color = _textNormalColor;
+ paint.IsAntialias = true;
SKCanvas canvas = _surface.Canvas;
- SKRect messageRectangle = MeasureString(MessageText, paint);
+ SKRect messageRectangle = MeasureString(MessageText, font);
float messagePositionX = (_panelRectangle.Width - messageRectangle.Width) / 2 - messageRectangle.Left;
float messagePositionY = _messagePositionY - messageRectangle.Top;
SKPoint messagePosition = new(messagePositionX, messagePositionY);
@@ -235,7 +237,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
canvas.DrawRect(messageBoundRectangle, _panelBrush);
- canvas.DrawText(MessageText, messagePosition.X, messagePosition.Y + _messageFont.Metrics.XHeight + _messageFont.Metrics.Descent, paint);
+ canvas.DrawText(MessageText, messagePosition.X, messagePosition.Y + _messageFont.Metrics.XHeight + _messageFont.Metrics.Descent, SKTextAlign.Left, _messageFont, paint);
if (!state.TypingEnabled)
{
@@ -303,33 +305,34 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
_logoPosition = new SKPoint(logoPositionX, logoPositionY);
}
- private static SKRect MeasureString(string text, SKPaint paint)
+
+ private static SKRect MeasureString(string text, SKFont font)
{
- SKRect bounds = SKRect.Empty;
+ SKRect bounds;
if (text == string.Empty)
{
- paint.MeasureText(" ", ref bounds);
+ font.MeasureText(" ", out bounds);
}
else
{
- paint.MeasureText(text, ref bounds);
+ font.MeasureText(text, out bounds);
}
return bounds;
}
- private static SKRect MeasureString(ReadOnlySpan text, SKPaint paint)
+ private static SKRect MeasureString(ReadOnlySpan text, SKFont font)
{
- SKRect bounds = SKRect.Empty;
+ SKRect bounds;
if (text == string.Empty)
{
- paint.MeasureText(" ", ref bounds);
+ font.MeasureText(" ", out bounds);
}
else
{
- paint.MeasureText(text, ref bounds);
+ font.MeasureText(text, out bounds);
}
return bounds;
@@ -337,12 +340,14 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
private void DrawTextBox(SKCanvas canvas, SoftwareKeyboardUIState state)
{
- using SKPaint textPaint = new(_labelsTextFont)
- {
- IsAntialias = true,
- Color = _textNormalColor
- };
- SKRect inputTextRectangle = MeasureString(state.InputText, textPaint);
+ using SKFont textFont = new();
+ textFont.Edging = SKFontEdging.Alias;
+ textFont.Typeface = SKTypeface.Default;
+
+ using SKPaint textPaint = new();
+ textPaint.IsAntialias = true;
+ textPaint.Color = _textNormalColor;
+ SKRect inputTextRectangle = MeasureString(state.InputText, textFont);
float boxWidth = (int)(Math.Max(300, inputTextRectangle.Width + inputTextRectangle.Left + 8));
float boxHeight = 32;
@@ -362,7 +367,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
float inputTextY = boxY + 5;
SKPoint inputTextPosition = new(inputTextX, inputTextY);
- canvas.DrawText(state.InputText, inputTextPosition.X, inputTextPosition.Y + (_labelsTextFont.Metrics.XHeight + _labelsTextFont.Metrics.Descent), textPaint);
+ canvas.DrawText(state.InputText, inputTextPosition.X, inputTextPosition.Y + (_labelsTextFont.Metrics.XHeight + _labelsTextFont.Metrics.Descent), SKTextAlign.Left, _labelsTextFont, textPaint);
// Draw the cursor on top of the text and redraw the text with a different color if necessary.
@@ -388,8 +393,8 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
ReadOnlySpan textUntilBegin = state.InputText.AsSpan(0, state.CursorBegin);
ReadOnlySpan textUntilEnd = state.InputText.AsSpan(0, state.CursorEnd);
- SKRect selectionBeginRectangle = MeasureString(textUntilBegin, textPaint);
- SKRect selectionEndRectangle = MeasureString(textUntilEnd, textPaint);
+ SKRect selectionBeginRectangle = MeasureString(textUntilBegin, textFont);
+ SKRect selectionEndRectangle = MeasureString(textUntilEnd, textFont);
cursorVisible = true;
cursorPositionXLeft = inputTextX + selectionBeginRectangle.Width + selectionBeginRectangle.Left;
@@ -407,7 +412,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
int cursorBegin = Math.Min(state.InputText.Length, state.CursorBegin);
ReadOnlySpan textUntilCursor = state.InputText.AsSpan(0, cursorBegin);
- SKRect cursorTextRectangle = MeasureString(textUntilCursor, textPaint);
+ SKRect cursorTextRectangle = MeasureString(textUntilCursor, textFont);
cursorVisible = true;
cursorPositionXLeft = inputTextX + cursorTextRectangle.Width + cursorTextRectangle.Left;
@@ -419,7 +424,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
if (state.CursorBegin < state.InputText.Length)
{
textUntilCursor = state.InputText.AsSpan(0, cursorBegin + 1);
- cursorTextRectangle = MeasureString(textUntilCursor, textPaint);
+ cursorTextRectangle = MeasureString(textUntilCursor, textFont);
cursorPositionXRight = inputTextX + cursorTextRectangle.Width + cursorTextRectangle.Left;
}
else
@@ -462,13 +467,11 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
SKCanvas textOverCanvas = textOverCursor.Canvas;
SKPoint textRelativePosition = new(inputTextPosition.X - cursorRectangle.Left, inputTextPosition.Y - cursorRectangle.Top);
- using SKPaint cursorPaint = new(_inputTextFont)
- {
- Color = cursorTextColor,
- IsAntialias = true
- };
+ using SKPaint cursorPaint = new();
+ cursorPaint.Color = cursorTextColor;
+ cursorPaint.IsAntialias = true;
- textOverCanvas.DrawText(state.InputText, textRelativePosition.X, textRelativePosition.Y + _inputTextFont.Metrics.XHeight + _inputTextFont.Metrics.Descent, cursorPaint);
+ textOverCanvas.DrawText(state.InputText, textRelativePosition.X, textRelativePosition.Y + _inputTextFont.Metrics.XHeight + _inputTextFont.Metrics.Descent, SKTextAlign.Left, _inputTextFont, cursorPaint);
SKPoint cursorPosition = new((int)cursorRectangle.Left, (int)cursorRectangle.Top);
textOverCursor.Flush();
@@ -493,13 +496,15 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
float iconWidth = icon.Width;
float iconHeight = icon.Height;
- using SKPaint paint = new(_labelsTextFont)
- {
- Color = _textNormalColor,
- IsAntialias = true
- };
+ using SKFont font = new();
+ font.Edging = SKFontEdging.Alias;
+ font.Typeface = SKTypeface.Default;
- SKRect labelRectangle = MeasureString(label, paint);
+ using SKPaint paint = new();
+ paint.Color = _textNormalColor;
+ paint.IsAntialias = true;
+
+ SKRect labelRectangle = MeasureString(label, font);
float labelPositionX = iconWidth + 8 - labelRectangle.Left;
float labelPositionY = 3;
@@ -526,7 +531,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
canvas.DrawRect(boundRectangle, _panelBrush);
canvas.DrawBitmap(icon, iconPosition);
- canvas.DrawText(label, labelPosition.X, labelPosition.Y + _labelsTextFont.Metrics.XHeight + _labelsTextFont.Metrics.Descent, paint);
+ canvas.DrawText(label, labelPosition.X, labelPosition.Y + _labelsTextFont.Metrics.XHeight + _labelsTextFont.Metrics.Descent, SKTextAlign.Left, _labelsTextFont, paint);
if (enabled)
{
@@ -546,12 +551,14 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
private void DrawControllerToggle(SKCanvas canvas, SKPoint point)
{
- using SKPaint paint = new(_labelsTextFont)
- {
- IsAntialias = true,
- Color = _textNormalColor
- };
- SKRect labelRectangle = MeasureString(ControllerToggleText, paint);
+ using SKFont font = new();
+ font.Edging = SKFontEdging.Alias;
+ font.Typeface = SKTypeface.Default;
+
+ using SKPaint paint = new();
+ paint.IsAntialias = true;
+ paint.Color = _textNormalColor;
+ SKRect labelRectangle = MeasureString(ControllerToggleText, font);
// Use relative positions so we can center the entire drawing later.
@@ -579,7 +586,7 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
SKPoint overlayPosition = new((int)keyX, (int)keyY);
canvas.DrawBitmap(_keyModeIcon, overlayPosition);
- canvas.DrawText(ControllerToggleText, labelPosition.X, labelPosition.Y + _labelsTextFont.Metrics.XHeight, paint);
+ canvas.DrawText(ControllerToggleText, labelPosition.X, labelPosition.Y + _labelsTextFont.Metrics.XHeight, SKTextAlign.Left, _labelsTextFont, paint);
}
public unsafe void CopyImageToBuffer()
diff --git a/src/Ryujinx/Assets/Styles/Styles.xaml b/src/Ryujinx/Assets/Styles/Styles.xaml
index 34c7e2516..b585be640 100644
--- a/src/Ryujinx/Assets/Styles/Styles.xaml
+++ b/src/Ryujinx/Assets/Styles/Styles.xaml
@@ -37,12 +37,12 @@
Width="100"
VerticalAlignment="Center"
Text="Rrrrr"
- UseFloatingWatermark="True"
- Watermark="Hello" />
+ UseFloatingPlaceholder="True"
+ PlaceholderText="Hello" />
Test Check
-
+
@@ -248,7 +248,7 @@
-
diff --git a/src/Ryujinx/Common/Markup/BasicMarkupExtension.cs b/src/Ryujinx/Common/Markup/BasicMarkupExtension.cs
index d55e3c9a7..6f8bb4c86 100644
--- a/src/Ryujinx/Common/Markup/BasicMarkupExtension.cs
+++ b/src/Ryujinx/Common/Markup/BasicMarkupExtension.cs
@@ -1,3 +1,4 @@
+using Avalonia.Data;
using Avalonia.Data.Core;
using Avalonia.Markup.Xaml;
using Avalonia.Markup.Xaml.MarkupExtensions;
diff --git a/src/Ryujinx/Common/Markup/MarkupExtensions.cs b/src/Ryujinx/Common/Markup/MarkupExtensions.cs
index b2ed01517..f2bd83869 100644
--- a/src/Ryujinx/Common/Markup/MarkupExtensions.cs
+++ b/src/Ryujinx/Common/Markup/MarkupExtensions.cs
@@ -1,5 +1,5 @@
using Avalonia.Markup.Xaml.MarkupExtensions;
-using Projektanker.Icons.Avalonia;
+using Optris.Icons.Avalonia;
using Ryujinx.Ava.Common.Locale;
namespace Ryujinx.Ava.Common.Markup
diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs
index 17d941962..8e3a9c214 100644
--- a/src/Ryujinx/Program.cs
+++ b/src/Ryujinx/Program.cs
@@ -2,9 +2,9 @@ using Avalonia;
using Avalonia.Threading;
using DiscordRPC;
using Gommon;
-using Projektanker.Icons.Avalonia;
-using Projektanker.Icons.Avalonia.FontAwesome;
-using Projektanker.Icons.Avalonia.MaterialDesign;
+using Optris.Icons.Avalonia;
+using Optris.Icons.Avalonia.FontAwesome;
+using Optris.Icons.Avalonia.MaterialDesign;
using Ryujinx.Ava.Systems;
using Ryujinx.Ava.Systems.Configuration;
using Ryujinx.Ava.Systems.Configuration.System;
diff --git a/src/Ryujinx/Ryujinx.csproj b/src/Ryujinx/Ryujinx.csproj
index 8a89f3a46..68aa880f2 100644
--- a/src/Ryujinx/Ryujinx.csproj
+++ b/src/Ryujinx/Ryujinx.csproj
@@ -43,7 +43,7 @@
-
+
@@ -57,9 +57,9 @@
-
-
-
+
+
+
diff --git a/src/Ryujinx/Systems/Rebooter.cs b/src/Ryujinx/Systems/Rebooter.cs
index bb91f608f..e423223bf 100644
--- a/src/Ryujinx/Systems/Rebooter.cs
+++ b/src/Ryujinx/Systems/Rebooter.cs
@@ -24,11 +24,11 @@ namespace Ryujinx.Ava.Systems
bool shouldRestart = true;
- TaskDialog taskDialog = new()
+ FATaskDialog taskDialog = new()
{
Header = LocaleManager.Instance[LocaleKeys.RyujinxRebooter],
SubHeader = LocaleManager.Instance[LocaleKeys.DialogRebooterMessage],
- IconSource = new SymbolIconSource { Symbol = Symbol.Games },
+ IconSource = new FASymbolIconSource { Symbol = FASymbol.Games },
XamlRoot = RyujinxApp.MainWindow,
};
diff --git a/src/Ryujinx/Systems/Updater/Updater.cs b/src/Ryujinx/Systems/Updater/Updater.cs
index e1b45e4b0..f4453617e 100644
--- a/src/Ryujinx/Systems/Updater/Updater.cs
+++ b/src/Ryujinx/Systems/Updater/Updater.cs
@@ -132,11 +132,11 @@ namespace Ryujinx.Ava.Systems
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 = RyujinxApp.MainWindow,
};
@@ -239,7 +239,7 @@ namespace Ryujinx.Ava.Systems
}
}
- 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;
@@ -283,7 +283,7 @@ namespace Ryujinx.Ava.Systems
Interlocked.Exchange(ref progressPercentage[index], args.ProgressPercentage);
Interlocked.Add(ref totalProgressPercentage, args.ProgressPercentage);
- taskDialog.SetProgressBarState(totalProgressPercentage / _connectionCount, TaskDialogProgressState.Normal);
+ taskDialog.SetProgressBarState(totalProgressPercentage / _connectionCount, FATaskDialogProgressState.Normal);
};
client.DownloadDataCompleted += (_, args) =>
@@ -357,7 +357,7 @@ namespace Ryujinx.Ava.Systems
}
}
- 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
@@ -383,7 +383,7 @@ namespace Ryujinx.Ava.Systems
bytesWritten += readSize;
- taskDialog.SetProgressBarState(GetPercentage(bytesWritten, totalBytes), TaskDialogProgressState.Normal);
+ taskDialog.SetProgressBarState(GetPercentage(bytesWritten, totalBytes), FATaskDialogProgressState.Normal);
RyujinxApp.SetTaskbarProgressValue(bytesWritten, totalBytes);
updateFileStream.Write(buffer, 0, readSize);
@@ -398,7 +398,7 @@ namespace Ryujinx.Ava.Systems
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))
{
@@ -439,11 +439,11 @@ namespace Ryujinx.Ava.Systems
archive.WriteToDirectory(outputDirectoryPath);
}
- 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())
{
@@ -460,7 +460,7 @@ namespace Ryujinx.Ava.Systems
// The new decompression implementations don't have a way to show progress
// so the progressbar is just set to 100% after the decompression is done
- taskDialog.SetProgressBarState(100, TaskDialogProgressState.Normal);
+ taskDialog.SetProgressBarState(100, FATaskDialogProgressState.Normal);
// Delete downloaded zip
File.Delete(updateFile);
@@ -468,7 +468,7 @@ namespace Ryujinx.Ava.Systems
List 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())
@@ -484,7 +484,7 @@ namespace Ryujinx.Ava.Systems
Dispatcher.UIThread.InvokeAsync(() =>
{
- taskDialog.SetProgressBarState(GetPercentage(count, allFiles.Count), TaskDialogProgressState.Normal);
+ taskDialog.SetProgressBarState(GetPercentage(count, allFiles.Count), FATaskDialogProgressState.Normal);
});
}
catch
@@ -496,7 +496,7 @@ namespace Ryujinx.Ava.Systems
Dispatcher.UIThread.InvokeAsync(() =>
{
taskDialog.SubHeader = LocaleManager.Instance[LocaleKeys.UpdaterAddingFiles];
- taskDialog.SetProgressBarState(0, TaskDialogProgressState.Normal);
+ taskDialog.SetProgressBarState(0, FATaskDialogProgressState.Normal);
});
MoveAllFilesOver(_updatePublishDir, _homeDir, taskDialog);
@@ -587,7 +587,7 @@ namespace Ryujinx.Ava.Systems
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))
@@ -611,7 +611,7 @@ namespace Ryujinx.Ava.Systems
Dispatcher.UIThread.InvokeAsync(() =>
{
- taskDialog.SetProgressBarState(GetPercentage(count, total), TaskDialogProgressState.Normal);
+ taskDialog.SetProgressBarState(GetPercentage(count, total), FATaskDialogProgressState.Normal);
});
}
}
diff --git a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
index 45235ee3f..4deb644e5 100644
--- a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
+++ b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs
@@ -81,7 +81,7 @@ namespace Ryujinx.Ava.UI.Applet
LocaleManager.Instance[LocaleKeys.DialogOpenSettingsWindowLabel],
string.Empty,
LocaleManager.Instance[LocaleKeys.SettingsButtonClose],
- (int)Symbol.Important,
+ (int)FASymbol.Important,
deferEvent,
async window =>
{
diff --git a/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs b/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs
index ee0e884d2..843fb3872 100644
--- a/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs
+++ b/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs
@@ -65,16 +65,16 @@ namespace Ryujinx.Ava.UI.Applet
public static async Task 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;
}
@@ -125,7 +125,7 @@ namespace Ryujinx.Ava.UI.Applet
public void Close()
{
- ((ContentDialog)Parent)?.Hide();
+ ((FAContentDialog)Parent)?.Hide();
}
}
}
diff --git a/src/Ryujinx/UI/Applet/ProfileSelectorDialog.axaml.cs b/src/Ryujinx/UI/Applet/ProfileSelectorDialog.axaml.cs
index 6fdfaab5a..4359caf0f 100644
--- a/src/Ryujinx/UI/Applet/ProfileSelectorDialog.axaml.cs
+++ b/src/Ryujinx/UI/Applet/ProfileSelectorDialog.axaml.cs
@@ -92,7 +92,7 @@ namespace Ryujinx.Ava.UI.Applet
return (defaultId, true);
}
- ContentDialog contentDialog = new()
+ FAContentDialog contentDialog = new()
{
Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle],
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.Continue],
@@ -111,9 +111,9 @@ namespace Ryujinx.Ava.UI.Applet
return (result, input);
- void Handler(ContentDialog sender, ContentDialogClosedEventArgs eventArgs)
+ void Handler(FAContentDialog sender, FAContentDialogClosedEventArgs eventArgs)
{
- if (eventArgs.Result == ContentDialogResult.Primary)
+ if (eventArgs.Result == FAContentDialogResult.Primary)
{
result = viewModel.SelectedUserId;
input = true;
diff --git a/src/Ryujinx/UI/Applet/SwkbdAppletDialog.axaml b/src/Ryujinx/UI/Applet/SwkbdAppletDialog.axaml
index dd5e1e324..5670a7b92 100644
--- a/src/Ryujinx/UI/Applet/SwkbdAppletDialog.axaml
+++ b/src/Ryujinx/UI/Applet/SwkbdAppletDialog.axaml
@@ -44,7 +44,7 @@
Text="{Binding Message}"
TextInput="Message_TextInput"
TextWrapping="Wrap"
- UseFloatingWatermark="True" />
+ UseFloatingPlaceholder="True" />
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
{
diff --git a/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml b/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml
index bf34b303a..eeb9f9e3d 100644
--- a/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml
+++ b/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml
@@ -9,9 +9,9 @@
d:DesignHeight="450"
x:Class="Ryujinx.Ava.UI.Controls.NavigationDialogHost"
Focusable="True">
-
-
-
\ No newline at end of file
+
+
diff --git a/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml.cs b/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml.cs
index fb0bd5e82..481cb942e 100644
--- a/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml.cs
+++ b/src/Ryujinx/UI/Controls/NavigationDialogHost.axaml.cs
@@ -69,7 +69,7 @@ namespace Ryujinx.Ava.UI.Controls
HorizonClient ownerHorizonClient)
{
NavigationDialogHost content = new(ownerAccountManager, ownerContentManager, ownerVirtualFileSystem, ownerHorizonClient);
- ContentDialog contentDialog = new()
+ FAContentDialog contentDialog = new()
{
Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle],
PrimaryButtonText = string.Empty,
diff --git a/src/Ryujinx/UI/Helpers/CharacterReader.cs b/src/Ryujinx/UI/Helpers/CharacterReader.cs
new file mode 100644
index 000000000..a1104f1de
--- /dev/null
+++ b/src/Ryujinx/UI/Helpers/CharacterReader.cs
@@ -0,0 +1,94 @@
+using System;
+
+#nullable enable
+namespace Ryujinx.Ava.UI.Helpers;
+
+public ref struct CharacterReader(ReadOnlySpan s)
+{
+ private ReadOnlySpan _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 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(s.AsSpan()))
+ return false;
+ this._s = this._s.Slice(s.Length);
+ this.Position += s.Length;
+ return true;
+ }
+
+ public bool TakeIf(Func condition)
+ {
+ if (!condition(this.Peek))
+ return false;
+ int num = (int) this.Take();
+ return true;
+ }
+
+ public ReadOnlySpan TakeUntil(char c)
+ {
+ int num = 0;
+ while (num < this._s.Length && (int) this._s[num] != (int) c)
+ ++num;
+ ReadOnlySpan until = this._s.Slice(0, num);
+ this._s = this._s.Slice(num);
+ this.Position += num;
+ return until;
+ }
+
+ public ReadOnlySpan TakeWhile(Func condition)
+ {
+ int num = 0;
+ while (num < this._s.Length && condition(this._s[num]))
+ ++num;
+ ReadOnlySpan readOnlySpan = this._s.Slice(0, num);
+ this._s = this._s.Slice(num);
+ this.Position += num;
+ return readOnlySpan;
+ }
+
+ public ReadOnlySpan TryPeek(int count)
+ {
+ return this._s.Length < count ? ReadOnlySpan.Empty : this._s.Slice(0, count);
+ }
+
+ public ReadOnlySpan 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);
+ }
+}
diff --git a/src/Ryujinx/UI/Helpers/ContentDialogHelper.cs b/src/Ryujinx/UI/Helpers/ContentDialogHelper.cs
index 65de07e6e..b34f71184 100644
--- a/src/Ryujinx/UI/Helpers/ContentDialogHelper.cs
+++ b/src/Ryujinx/UI/Helpers/ContentDialogHelper.cs
@@ -23,8 +23,8 @@ namespace Ryujinx.Ava.UI.Helpers
private static bool _isChoiceDialogOpen;
private static ContentDialogOverlayWindow _contentDialogOverlayWindow;
- public static ContentDialog ApplyStyles(
- this ContentDialog contentDialog,
+ public static FAContentDialog ApplyStyles(
+ this FAContentDialog contentDialog,
double closeButtonWidth = 80,
HorizontalAlignment buttonSpaceAlignment = HorizontalAlignment.Right)
{
@@ -48,11 +48,11 @@ namespace Ryujinx.Ava.UI.Helpers
string closeButton,
UserResult primaryButtonResult = UserResult.Ok,
ManualResetEvent deferResetEvent = null,
- TypedEventHandler deferCloseAction = null)
+ TypedEventHandler deferCloseAction = null)
{
UserResult result = UserResult.None;
- ContentDialog contentDialog = new()
+ FAContentDialog contentDialog = new()
{
Title = title,
PrimaryButtonText = primaryButton,
@@ -97,7 +97,7 @@ namespace Ryujinx.Ava.UI.Helpers
int iconSymbol,
UserResult primaryButtonResult = UserResult.Ok,
ManualResetEvent deferResetEvent = null,
- TypedEventHandler deferCloseAction = null)
+ TypedEventHandler deferCloseAction = null)
{
Grid content = CreateTextDialogContent(primaryText, secondaryText, iconSymbol);
@@ -116,7 +116,7 @@ namespace Ryujinx.Ava.UI.Helpers
Action onClick,
UserResult primaryButtonResult = UserResult.Ok,
ManualResetEvent deferResetEvent = null,
- TypedEventHandler deferCloseAction = null)
+ TypedEventHandler deferCloseAction = null)
{
Grid content = CreateTextDialogContentWithButton(primaryText, secondaryText, iconSymbol, buttonText, onClick);
@@ -149,7 +149,7 @@ namespace Ryujinx.Ava.UI.Helpers
deferResetEvent,
DeferClose);
- async void DeferClose(ContentDialog sender, ContentDialogButtonClickEventArgs args)
+ async void DeferClose(FAContentDialog sender, FAContentDialogButtonClickEventArgs args)
{
if (startedDeferring)
{
@@ -160,7 +160,7 @@ namespace Ryujinx.Ava.UI.Helpers
startedDeferring = true;
- Deferral deferral = args.GetDeferral();
+ FADeferral deferral = args.GetDeferral();
sender.PrimaryButtonClick -= DeferClose;
@@ -193,9 +193,9 @@ namespace Ryujinx.Ava.UI.Helpers
MinHeight = 80,
};
- content.Children.Add(new SymbolIcon
+ content.Children.Add(new FASymbolIcon
{
- Symbol = (Symbol)symbol,
+ Symbol = (FASymbol)symbol,
Margin = new Thickness(10),
FontSize = 40,
FlowDirection = FlowDirection.LeftToRight,
@@ -238,9 +238,9 @@ namespace Ryujinx.Ava.UI.Helpers
MinHeight = 80,
};
- content.Children.Add(new SymbolIcon
+ content.Children.Add(new FASymbolIcon
{
- Symbol = (Symbol)symbol,
+ Symbol = (FASymbol)symbol,
Margin = new Thickness(10),
FontSize = 40,
FlowDirection = FlowDirection.LeftToRight,
@@ -262,10 +262,10 @@ namespace Ryujinx.Ava.UI.Helpers
Margin = new Thickness(2)
});
- buttonContent.Children.Add(new SymbolIcon
+ buttonContent.Children.Add(new FASymbolIcon
{
FlowDirection = FlowDirection.LeftToRight,
- Symbol = Symbol.Open
+ Symbol = FASymbol.Open
});
content.Children.Add(new TextBlock
@@ -313,7 +313,7 @@ namespace Ryujinx.Ava.UI.Helpers
acceptButton,
string.Empty,
closeButton,
- (int)Symbol.Important);
+ (int)FASymbol.Important);
internal static async Task CreateConfirmationDialog(
string primaryText,
@@ -329,7 +329,7 @@ namespace Ryujinx.Ava.UI.Helpers
acceptButtonText,
string.Empty,
cancelButtonText,
- (int)Symbol.Help,
+ (int)FASymbol.Help,
primaryButtonResult);
internal static async Task CreateDeniableConfirmationDialog(
@@ -347,7 +347,7 @@ namespace Ryujinx.Ava.UI.Helpers
acceptButtonText,
noAcceptButtonText,
cancelButtonText,
- (int)Symbol.Help,
+ (int)FASymbol.Help,
primaryButtonResult);
internal static async Task CreateLocalizedConfirmationDialog(string primaryText, string secondaryText)
@@ -366,7 +366,7 @@ namespace Ryujinx.Ava.UI.Helpers
string.Empty,
string.Empty,
LocaleManager.Instance[LocaleKeys.InputDialogOk],
- (int)Symbol.Important);
+ (int)FASymbol.Important);
internal static async Task CreateUpdaterUpToDateInfoDialog(string primary, string secondaryText,
string changelogUrl)
@@ -378,7 +378,7 @@ namespace Ryujinx.Ava.UI.Helpers
string.Empty,
string.Empty,
LocaleManager.Instance[LocaleKeys.InputDialogOk],
- (int)Symbol.Important,
+ (int)FASymbol.Important,
LocaleManager.Instance[LocaleKeys.DialogUpdaterShowChangelogMessage],
() => OpenHelper.OpenUrl(changelogUrl));
}
@@ -391,7 +391,7 @@ namespace Ryujinx.Ava.UI.Helpers
string.Empty,
string.Empty,
LocaleManager.Instance[LocaleKeys.InputDialogOk],
- (int)Symbol.Important);
+ (int)FASymbol.Important);
internal static async Task CreateErrorDialog(string errorMessage, string secondaryErrorMessage = "")
{
@@ -404,7 +404,7 @@ namespace Ryujinx.Ava.UI.Helpers
secondaryErrorMessage,
string.Empty,
LocaleManager.Instance[LocaleKeys.InputDialogOk],
- (int)Symbol.Dismiss);
+ (int)FASymbol.Dismiss);
}
internal static async Task CreateChoiceDialog(string title, string primary, string secondaryText)
@@ -423,7 +423,7 @@ namespace Ryujinx.Ava.UI.Helpers
LocaleManager.Instance[LocaleKeys.InputDialogYes],
string.Empty,
LocaleManager.Instance[LocaleKeys.InputDialogNo],
- (int)Symbol.Help,
+ (int)FASymbol.Help,
UserResult.Yes);
_isChoiceDialogOpen = false;
@@ -447,7 +447,7 @@ namespace Ryujinx.Ava.UI.Helpers
LocaleManager.Instance[LocaleKeys.InputDialogYes],
string.Empty,
LocaleManager.Instance[LocaleKeys.InputDialogNo],
- (int)Symbol.Help,
+ (int)FASymbol.Help,
LocaleManager.Instance[LocaleKeys.DialogUpdaterShowChangelogMessage],
() => OpenHelper.OpenUrl(changelogUrl),
UserResult.Yes);
@@ -473,9 +473,9 @@ namespace Ryujinx.Ava.UI.Helpers
LocaleManager.Instance[LocaleKeys.DialogExitSubMessage]);
}
- public static async Task ShowAsync(ContentDialog contentDialog)
+ public static async Task ShowAsync(FAContentDialog contentDialog)
{
- ContentDialogResult result;
+ FAContentDialogResult result;
bool isTopDialog = true;
Window parent = GetMainWindow();
@@ -497,9 +497,11 @@ namespace Ryujinx.Ava.UI.Helpers
ShowInTaskbar = false,
};
+/*
#if DEBUG
_contentDialogOverlayWindow.AttachDevTools(new KeyGesture(Key.F12, KeyModifiers.Control));
#endif
+*/
parent.PositionChanged += OverlayOnPositionChanged;
@@ -533,14 +535,14 @@ namespace Ryujinx.Ava.UI.Helpers
result = await ShowDialog();
}
- result = await _contentDialogOverlayWindow.ShowDialog(parent);
+ result = await _contentDialogOverlayWindow.ShowDialog(parent);
}
else
{
result = await ShowDialog();
}
- async Task ShowDialog()
+ async Task ShowDialog()
{
if (_contentDialogOverlayWindow is not null)
{
@@ -550,7 +552,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.");
}
diff --git a/src/Ryujinx/UI/Helpers/Converters/GlyphValueConverter.cs b/src/Ryujinx/UI/Helpers/Converters/GlyphValueConverter.cs
index 22b30be85..4c91c7ac2 100644
--- a/src/Ryujinx/UI/Helpers/Converters/GlyphValueConverter.cs
+++ b/src/Ryujinx/UI/Helpers/Converters/GlyphValueConverter.cs
@@ -11,12 +11,12 @@ namespace Ryujinx.Ava.UI.Helpers
private static readonly Dictionary _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.Device, char.ConvertFromUtf32(0xE7F7) },
{ Glyph.Bug, char.ConvertFromUtf32(0xEBE8) },
- { Glyph.Important, char.ConvertFromUtf32((int)Symbol.Important) },
+ { Glyph.Important, char.ConvertFromUtf32((int)FASymbol.Important) },
};
public GlyphValueConverter(string key)
diff --git a/src/Ryujinx/UI/RyujinxApp.axaml.cs b/src/Ryujinx/UI/RyujinxApp.axaml.cs
index 22b98dea7..632198c1f 100644
--- a/src/Ryujinx/UI/RyujinxApp.axaml.cs
+++ b/src/Ryujinx/UI/RyujinxApp.axaml.cs
@@ -1,5 +1,6 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
+using Avalonia.Input;
using Avalonia.Input.Platform;
using Avalonia.Markup.Xaml;
using Avalonia.Platform;
@@ -46,7 +47,7 @@ namespace Ryujinx.Ava
return clipboard != null;
}
- public static void SetTaskbarProgress(TaskBarProgressBarState state) => MainWindow.PlatformFeatures.SetTaskBarProgressBarState(state);
+ public static void SetTaskbarProgress(FATaskBarProgressBarState state) => MainWindow.PlatformFeatures.SetTaskBarProgressBarState(state);
public static void SetTaskbarProgressValue(ulong current, ulong total) => MainWindow.PlatformFeatures.SetTaskBarProgressBarValue(current, total);
public static void SetTaskbarProgressValue(long current, long total) => SetTaskbarProgressValue(Convert.ToUInt64(current), Convert.ToUInt64(total));
@@ -59,6 +60,10 @@ namespace Ryujinx.Ava
AvaloniaXamlLoader.Load(this);
+#if DEBUG
+ this.AttachDeveloperTools(options => options.Gesture = new KeyGesture(Key.F12, KeyModifiers.Control));
+#endif
+
if (OperatingSystem.IsMacOS())
{
// Switches macOS key held behavior to repeat the input key instead of showing the character accents menu (like doing on an iOS keyboard would).
diff --git a/src/Ryujinx/UI/ViewModels/DownloadableContentManagerViewModel.cs b/src/Ryujinx/UI/ViewModels/DownloadableContentManagerViewModel.cs
index 39e53184f..9c933cd8f 100644
--- a/src/Ryujinx/UI/ViewModels/DownloadableContentManagerViewModel.cs
+++ b/src/Ryujinx/UI/ViewModels/DownloadableContentManagerViewModel.cs
@@ -260,7 +260,7 @@ namespace Ryujinx.Ava.UI.ViewModels
string.Empty,
string.Empty,
LocaleManager.Instance[LocaleKeys.InputDialogOk],
- (int)Symbol.Checkmark);
+ (int)FASymbol.Checkmark);
});
}
}
diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
index e488495d6..01cada8b5 100644
--- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
+++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs
@@ -275,9 +275,11 @@ namespace Ryujinx.Ava.UI.ViewModels
SetMainContent = setMainContent;
TopLevel = topLevel;
+/*
#if DEBUG
topLevel.AttachDevTools(new KeyGesture(Avalonia.Input.Key.F12, KeyModifiers.Control));
#endif
+*/
Window.ApplicationLibrary.TotalTimePlayedRecalculated += TotalTimePlayed_Recalculated;
}
@@ -1357,7 +1359,7 @@ namespace Ryujinx.Ava.UI.ViewModels
string.Empty,
string.Empty,
LocaleManager.Instance[LocaleKeys.InputDialogOk],
- (int)Symbol.Checkmark);
+ (int)FASymbol.Checkmark);
});
}
}
@@ -2652,7 +2654,7 @@ namespace Ryujinx.Ava.UI.ViewModels
await using Stream fileStream = await iconFile.OpenWriteAsync();
using SKBitmap bitmap = SKBitmap.Decode(viewModel.SelectedApplication.Icon)
- .Resize(new SKSizeI(512, 512), SKFilterQuality.High);
+ .Resize(new SKSizeI(512, 512), new SKSamplingOptions(SKFilterMode.Linear));
using SKData png = bitmap.Encode(SKEncodedImageFormat.Png, 100);
diff --git a/src/Ryujinx/UI/ViewModels/TitleUpdateViewModel.cs b/src/Ryujinx/UI/ViewModels/TitleUpdateViewModel.cs
index 3d34643ab..b0e5da11a 100644
--- a/src/Ryujinx/UI/ViewModels/TitleUpdateViewModel.cs
+++ b/src/Ryujinx/UI/ViewModels/TitleUpdateViewModel.cs
@@ -196,7 +196,7 @@ namespace Ryujinx.Ava.UI.ViewModels
string.Empty,
string.Empty,
LocaleManager.Instance[LocaleKeys.InputDialogOk],
- (int)Symbol.Checkmark
+ (int)FASymbol.Checkmark
));
}
}
diff --git a/src/Ryujinx/UI/Views/Dialog/AboutView.axaml.cs b/src/Ryujinx/UI/Views/Dialog/AboutView.axaml.cs
index 8cfb18d15..16fc4b57a 100644
--- a/src/Ryujinx/UI/Views/Dialog/AboutView.axaml.cs
+++ b/src/Ryujinx/UI/Views/Dialog/AboutView.axaml.cs
@@ -23,7 +23,7 @@ namespace Ryujinx.Ava.UI.Views.Dialog
{
using AboutWindowViewModel viewModel = new();
- ContentDialog contentDialog = new()
+ FAContentDialog contentDialog = new()
{
PrimaryButtonText = string.Empty,
SecondaryButtonText = string.Empty,
diff --git a/src/Ryujinx/UI/Views/Dialog/ApplicationDataView.axaml b/src/Ryujinx/UI/Views/Dialog/ApplicationDataView.axaml
index 7ba4ad784..132d03f39 100644
--- a/src/Ryujinx/UI/Views/Dialog/ApplicationDataView.axaml
+++ b/src/Ryujinx/UI/Views/Dialog/ApplicationDataView.axaml
@@ -100,7 +100,7 @@
-
+
-
+
-
@@ -132,7 +132,7 @@
TextAlignment="Start"
TextWrapping="Wrap">
-
diff --git a/src/Ryujinx/UI/Views/Dialog/ApplicationDataView.axaml.cs b/src/Ryujinx/UI/Views/Dialog/ApplicationDataView.axaml.cs
index 8f6be58a9..7ffcec4fc 100644
--- a/src/Ryujinx/UI/Views/Dialog/ApplicationDataView.axaml.cs
+++ b/src/Ryujinx/UI/Views/Dialog/ApplicationDataView.axaml.cs
@@ -18,7 +18,7 @@ namespace Ryujinx.Ava.UI.Views.Dialog
{
public static async Task Show(ApplicationData appData)
{
- ContentDialog contentDialog = new()
+ FAContentDialog contentDialog = new()
{
Title = appData.Name,
PrimaryButtonText = string.Empty,
@@ -42,7 +42,7 @@ namespace Ryujinx.Ava.UI.Views.Dialog
return;
if (RyujinxApp.AppLifetime.Windows.TryGetFirst(x => x is ContentDialogOverlayWindow, out Window window))
- window.Close(ContentDialogResult.None);
+ window.Close(FAContentDialogResult.None);
await CompatibilityListWindow.Show((string)playabilityLabel.Tag);
}
diff --git a/src/Ryujinx/UI/Views/Dialog/DlcSelectView.axaml.cs b/src/Ryujinx/UI/Views/Dialog/DlcSelectView.axaml.cs
index 8390b7403..f3569fc8b 100644
--- a/src/Ryujinx/UI/Views/Dialog/DlcSelectView.axaml.cs
+++ b/src/Ryujinx/UI/Views/Dialog/DlcSelectView.axaml.cs
@@ -22,7 +22,7 @@ namespace Ryujinx.Ava.UI.Views.Dialog
{
DlcSelectViewModel viewModel = new(selectedTitleId, appLibrary);
- ContentDialog contentDialog = new()
+ FAContentDialog contentDialog = new()
{
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.Continue],
SecondaryButtonText = string.Empty,
diff --git a/src/Ryujinx/UI/Views/Dialog/DownloadableContentManagerView.axaml b/src/Ryujinx/UI/Views/Dialog/DownloadableContentManagerView.axaml
index 8b97a4822..d55a2ea49 100644
--- a/src/Ryujinx/UI/Views/Dialog/DownloadableContentManagerView.axaml
+++ b/src/Ryujinx/UI/Views/Dialog/DownloadableContentManagerView.axaml
@@ -21,7 +21,7 @@
Spacing="5"
Orientation="Horizontal"
IsVisible="{Binding ShowBundledContentNotice}">
-
@@ -123,7 +123,7 @@
MinWidth="0"
MinHeight="0"
Click="OpenLocation">
-
@@ -135,7 +135,7 @@
MinWidth="0"
MinHeight="0"
Click="RemoveDLC">
-
diff --git a/src/Ryujinx/UI/Views/Dialog/DownloadableContentManagerView.axaml.cs b/src/Ryujinx/UI/Views/Dialog/DownloadableContentManagerView.axaml.cs
index 408e8892d..6a0671f3f 100644
--- a/src/Ryujinx/UI/Views/Dialog/DownloadableContentManagerView.axaml.cs
+++ b/src/Ryujinx/UI/Views/Dialog/DownloadableContentManagerView.axaml.cs
@@ -21,7 +21,7 @@ namespace Ryujinx.Ava.UI.Views.Dialog
public static async Task Show(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
{
- ContentDialog contentDialog = new()
+ FAContentDialog contentDialog = new()
{
PrimaryButtonText = string.Empty,
SecondaryButtonText = string.Empty,
@@ -44,12 +44,12 @@ namespace Ryujinx.Ava.UI.Views.Dialog
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)
diff --git a/src/Ryujinx/UI/Views/Dialog/ModManagerView.axaml b/src/Ryujinx/UI/Views/Dialog/ModManagerView.axaml
index ee913b56d..c057bf1ee 100644
--- a/src/Ryujinx/UI/Views/Dialog/ModManagerView.axaml
+++ b/src/Ryujinx/UI/Views/Dialog/ModManagerView.axaml
@@ -46,7 +46,7 @@
MinHeight="27"
MaxHeight="27"
HorizontalAlignment="Stretch"
- Watermark="{ext:Locale Search}"
+ PlaceholderText="{ext:Locale Search}"
Text="{Binding Search}" />
@@ -91,7 +91,7 @@
MinHeight="0"
ToolTip.Tip="{Binding Path}"
Click="OpenLocation">
-
@@ -103,7 +103,7 @@
MinWidth="0"
MinHeight="0"
Click="DeleteMod">
-
diff --git a/src/Ryujinx/UI/Views/Dialog/ModManagerView.axaml.cs b/src/Ryujinx/UI/Views/Dialog/ModManagerView.axaml.cs
index 31e4323b7..68a1655d9 100644
--- a/src/Ryujinx/UI/Views/Dialog/ModManagerView.axaml.cs
+++ b/src/Ryujinx/UI/Views/Dialog/ModManagerView.axaml.cs
@@ -23,7 +23,7 @@ namespace Ryujinx.Ava.UI.Views.Dialog
public static async Task Show(ulong titleId, ulong titleIdBase, ApplicationLibrary appLibrary, string titleName)
{
- ContentDialog contentDialog = new()
+ FAContentDialog contentDialog = new()
{
PrimaryButtonText = string.Empty,
SecondaryButtonText = string.Empty,
@@ -46,12 +46,12 @@ namespace Ryujinx.Ava.UI.Views.Dialog
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)
diff --git a/src/Ryujinx/UI/Views/Dialog/TitleUpdateManagerView.axaml b/src/Ryujinx/UI/Views/Dialog/TitleUpdateManagerView.axaml
index ba3e85e8b..554d5e820 100644
--- a/src/Ryujinx/UI/Views/Dialog/TitleUpdateManagerView.axaml
+++ b/src/Ryujinx/UI/Views/Dialog/TitleUpdateManagerView.axaml
@@ -21,7 +21,7 @@
Spacing="5"
Orientation="Horizontal"
IsVisible="{Binding ShowBundledContentNotice}">
-
-
@@ -83,7 +83,7 @@
MinWidth="0"
MinHeight="0"
Click="RemoveUpdate">
-
diff --git a/src/Ryujinx/UI/Views/Dialog/TitleUpdateManagerView.axaml.cs b/src/Ryujinx/UI/Views/Dialog/TitleUpdateManagerView.axaml.cs
index 3c745f3cb..ac1729f34 100644
--- a/src/Ryujinx/UI/Views/Dialog/TitleUpdateManagerView.axaml.cs
+++ b/src/Ryujinx/UI/Views/Dialog/TitleUpdateManagerView.axaml.cs
@@ -21,7 +21,7 @@ namespace Ryujinx.Ava.UI.Views.Dialog
public static async Task Show(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
{
- ContentDialog contentDialog = new()
+ FAContentDialog contentDialog = new()
{
PrimaryButtonText = string.Empty,
SecondaryButtonText = string.Empty,
@@ -43,14 +43,14 @@ namespace Ryujinx.Ava.UI.Views.Dialog
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)
diff --git a/src/Ryujinx/UI/Views/Dialog/XciTrimmerView.axaml b/src/Ryujinx/UI/Views/Dialog/XciTrimmerView.axaml
index 4bddcd16a..d2907d3ab 100644
--- a/src/Ryujinx/UI/Views/Dialog/XciTrimmerView.axaml
+++ b/src/Ryujinx/UI/Views/Dialog/XciTrimmerView.axaml
@@ -40,13 +40,13 @@
Orientation="Vertical">
-
@@ -111,7 +111,7 @@
VerticalAlignment="Center"
ToolTip.Tip="{ext:Locale ControllerSettingsLoadProfileToolTip}"
Command="{Binding LoadProfileButton}">
-
@@ -123,7 +123,7 @@
VerticalAlignment="Center"
ToolTip.Tip="{ext:Locale ControllerSettingsSaveProfileToolTip}"
Command="{Binding SaveProfile}">
-
@@ -135,7 +135,7 @@
VerticalAlignment="Center"
ToolTip.Tip="{ext:Locale ControllerSettingsRemoveProfileToolTip}"
Command="{Binding RemoveProfile}">
-
@@ -169,7 +169,7 @@
Margin="5,0,0,0"
VerticalAlignment="Center"
Command="{Binding LoadDevice}">
-
diff --git a/src/Ryujinx/UI/Views/Input/LedInputView.axaml.cs b/src/Ryujinx/UI/Views/Input/LedInputView.axaml.cs
index d0407beb3..2d766ef0f 100644
--- a/src/Ryujinx/UI/Views/Input/LedInputView.axaml.cs
+++ b/src/Ryujinx/UI/Views/Input/LedInputView.axaml.cs
@@ -55,7 +55,7 @@ namespace Ryujinx.UI.Views.Input
{
LedInputView content = new(viewModel);
- ContentDialog contentDialog = new()
+ FAContentDialog contentDialog = new()
{
Title = LocaleManager.Instance[LocaleKeys.ControllerLedTitle],
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.ControllerSettingsSave],
diff --git a/src/Ryujinx/UI/Views/Input/MotionInputView.axaml b/src/Ryujinx/UI/Views/Input/MotionInputView.axaml
index abab04285..ba85b3a41 100644
--- a/src/Ryujinx/UI/Views/Input/MotionInputView.axaml
+++ b/src/Ryujinx/UI/Views/Input/MotionInputView.axaml
@@ -115,7 +115,7 @@
Margin="0,10,0,0"
VerticalAlignment="Center"
Text="{ext:Locale ControllerSettingsMotionControllerSlot}" />
-
-
-
@@ -103,7 +103,7 @@
Margin="-5,0,5,0"
Background="Transparent"
BorderThickness="0">
-
-
-
+ PlaceholderText="{ext:Locale MenuSearch}" />
-
-
-
-
-
-
-
-
-
+ PlaceholderText="{ext:Locale LdnPassphraseInputPublic}" />
-
-
+
+ AddHandler(FAFrame.NavigatedToEvent, (s, e) =>
{
NavigatedTo(e);
}, RoutingStrategies.Direct);
@@ -36,7 +37,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;
@@ -46,7 +47,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])}";
AddPictureButton.IsVisible = _isNewUser;
diff --git a/src/Ryujinx/UI/Views/User/UserFirmwareAvatarSelectorView.axaml b/src/Ryujinx/UI/Views/User/UserFirmwareAvatarSelectorView.axaml
index 9028d5802..52debb935 100644
--- a/src/Ryujinx/UI/Views/User/UserFirmwareAvatarSelectorView.axaml
+++ b/src/Ryujinx/UI/Views/User/UserFirmwareAvatarSelectorView.axaml
@@ -69,7 +69,7 @@
MinWidth="50"
Height="35"
Click="GoBack">
-
+
+ AddHandler(FAFrame.NavigatedToEvent, (s, e) =>
{
NavigatedTo(e);
}, RoutingStrategies.Direct);
@@ -36,7 +37,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;
diff --git a/src/Ryujinx/UI/Views/User/UserProfileImageSelectorView.axaml b/src/Ryujinx/UI/Views/User/UserProfileImageSelectorView.axaml
index 03aebec8f..88be43cd3 100644
--- a/src/Ryujinx/UI/Views/User/UserProfileImageSelectorView.axaml
+++ b/src/Ryujinx/UI/Views/User/UserProfileImageSelectorView.axaml
@@ -33,7 +33,7 @@
Width="50"
MinWidth="50"
Click="GoBack">
-
+
+ AddHandler(FAFrame.NavigatedToEvent, (s, e) =>
{
NavigatedTo(e);
}, RoutingStrategies.Direct);
@@ -36,11 +38,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)
{
@@ -49,7 +51,7 @@ namespace Ryujinx.Ava.UI.Views.User
}
break;
- case NavigationMode.Back:
+ case FANavigationMode.Back:
if (_profile.Image != null)
{
_parent.GoBack();
@@ -62,9 +64,8 @@ namespace Ryujinx.Ava.UI.Views.User
private async void Import_OnClick(object sender, RoutedEventArgs e)
{
- IReadOnlyList result = await ((Window)this.GetVisualRoot()!).StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
+ Optional result = await ((Window)TopLevel.GetTopLevel(this))!.StorageProvider.OpenSingleFilePickerAsync(new FilePickerOpenOptions
{
- AllowMultiple = false,
FileTypeFilter = new List
{
new(LocaleManager.Instance[LocaleKeys.AllSupportedFormats])
@@ -76,9 +77,9 @@ namespace Ryujinx.Ava.UI.Views.User
},
});
- if (result.Count > 0)
+ if (result.HasValue)
{
- _profile.Image = ProcessProfileImage(File.ReadAllBytes(result[0].Path.LocalPath));
+ _profile.Image = ProcessProfileImage(await File.ReadAllBytesAsync(result.Value.Path.LocalPath));
_parent.GoBack();
}
}
@@ -100,7 +101,7 @@ namespace Ryujinx.Ava.UI.Views.User
{
using SKBitmap bitmap = SKBitmap.Decode(buffer);
- SKBitmap resizedBitmap = bitmap.Resize(new SKImageInfo(256, 256), SKFilterQuality.High);
+ SKBitmap resizedBitmap = bitmap.Resize(new SKImageInfo(256, 256), new SKSamplingOptions(SKFilterMode.Linear));
using MemoryStream streamJpg = new();
diff --git a/src/Ryujinx/UI/Views/User/UserRecovererView.axaml b/src/Ryujinx/UI/Views/User/UserRecovererView.axaml
index 43d84787d..de0bea0de 100644
--- a/src/Ryujinx/UI/Views/User/UserRecovererView.axaml
+++ b/src/Ryujinx/UI/Views/User/UserRecovererView.axaml
@@ -67,7 +67,7 @@
Width="50"
MinWidth="50"
Click="GoBack">
-
+
diff --git a/src/Ryujinx/UI/Views/User/UserRecovererView.axaml.cs b/src/Ryujinx/UI/Views/User/UserRecovererView.axaml.cs
index d1fd70e9b..b2e71f11a 100644
--- a/src/Ryujinx/UI/Views/User/UserRecovererView.axaml.cs
+++ b/src/Ryujinx/UI/Views/User/UserRecovererView.axaml.cs
@@ -4,6 +4,7 @@ using FluentAvalonia.UI.Navigation;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Controls;
using Ryujinx.Ava.UI.ViewModels;
+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, (s, e) =>
+ AddHandler(FAFrame.NavigatedToEvent, (s, 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;
}
diff --git a/src/Ryujinx/UI/Views/User/UserSaveManagerView.axaml b/src/Ryujinx/UI/Views/User/UserSaveManagerView.axaml
index 80fb442e5..bf82c3661 100644
--- a/src/Ryujinx/UI/Views/User/UserSaveManagerView.axaml
+++ b/src/Ryujinx/UI/Views/User/UserSaveManagerView.axaml
@@ -105,7 +105,7 @@
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
BorderThickness="1"
IsVisible="{Binding !InGameList}">
-
-
@@ -155,7 +155,7 @@
MinHeight="0"
Name="Delete"
Click="Delete">
-
@@ -174,7 +174,7 @@
Width="50"
MinWidth="50"
Click="GoBack">
-
+
diff --git a/src/Ryujinx/UI/Views/User/UserSaveManagerView.axaml.cs b/src/Ryujinx/UI/Views/User/UserSaveManagerView.axaml.cs
index 7571888b8..1814b887b 100644
--- a/src/Ryujinx/UI/Views/User/UserSaveManagerView.axaml.cs
+++ b/src/Ryujinx/UI/Views/User/UserSaveManagerView.axaml.cs
@@ -18,6 +18,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
@@ -32,7 +33,7 @@ namespace Ryujinx.Ava.UI.Views.User
public UserSaveManagerView()
{
InitializeComponent();
- AddHandler(Frame.NavigatedToEvent, (s, e) =>
+ AddHandler(FAFrame.NavigatedToEvent, (s, e) =>
{
NavigatedTo(e);
}, RoutingStrategies.Direct);
@@ -44,7 +45,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;
@@ -55,7 +56,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);
}
diff --git a/src/Ryujinx/UI/Views/User/UserSelectorView.axaml b/src/Ryujinx/UI/Views/User/UserSelectorView.axaml
index 42ccc41fe..03f774ce8 100644
--- a/src/Ryujinx/UI/Views/User/UserSelectorView.axaml
+++ b/src/Ryujinx/UI/Views/User/UserSelectorView.axaml
@@ -96,7 +96,7 @@
CornerRadius="12"
Padding="0"
Click="EditUser">
-
+
@@ -117,7 +117,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Click="AddUser">
-
+
-
-
-
+
-
+
-
-
+
-
-
-
-
-
+
-
-
-
+
+
-
-
-
-
-
-
+
+
diff --git a/src/Ryujinx/UI/Windows/GameSpecificSettingsWindow.axaml.cs b/src/Ryujinx/UI/Windows/GameSpecificSettingsWindow.axaml.cs
index 6fe583224..58f4f4c9d 100644
--- a/src/Ryujinx/UI/Windows/GameSpecificSettingsWindow.axaml.cs
+++ b/src/Ryujinx/UI/Windows/GameSpecificSettingsWindow.axaml.cs
@@ -57,10 +57,10 @@ 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())
{
diff --git a/src/Ryujinx/UI/Windows/LdnGamesListWindow.axaml b/src/Ryujinx/UI/Windows/LdnGamesListWindow.axaml
index ec36e0caa..e95a99617 100644
--- a/src/Ryujinx/UI/Windows/LdnGamesListWindow.axaml
+++ b/src/Ryujinx/UI/Windows/LdnGamesListWindow.axaml
@@ -29,7 +29,7 @@
Name="SearchBoxFlush"
Margin="0, 5, 0, 5"
HorizontalAlignment="Stretch"
- Watermark="{ext:Locale LdnGameListSearchBoxWatermark}"
+ PlaceholderText="{ext:Locale LdnGameListSearchBoxWatermark}"
TextChanged="TextBox_OnTextChanged"/>
+ PlaceholderText="{ext:Locale LdnGameListSearchBoxWatermark}" TextChanged="TextBox_OnTextChanged" />
-
diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs
index e7934f38a..533c57598 100644
--- a/src/Ryujinx/UI/Windows/MainWindow.axaml.cs
+++ b/src/Ryujinx/UI/Windows/MainWindow.axaml.cs
@@ -121,14 +121,15 @@ namespace Ryujinx.Ava.UI.Windows
app.ApplyConfiguredTheme(ConfigurationState.Instance.UI.BaseStyle);
}
- protected override void OnClosed(EventArgs e)
+ /* protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
if (PlatformSettings != null)
{
+ // Unsubscribe to the ColorValuesChanged event
PlatformSettings.ColorValuesChanged -= OnPlatformColorValuesChanged;
}
- }
+ } */
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
@@ -310,7 +311,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;
@@ -492,8 +493,12 @@ namespace Ryujinx.Ava.UI.Windows
base.OnOpened(e);
Initialize();
-
- PlatformSettings!.ColorValuesChanged += OnPlatformColorValuesChanged;
+
+ // Subscribe to the ColorValuesChanged event
+ /* if (PlatformSettings != null)
+ {
+ PlatformSettings.ColorValuesChanged += OnPlatformColorValuesChanged;
+ } */
ViewModel.Initialize(
ContentManager,
@@ -753,7 +758,7 @@ namespace Ryujinx.Ava.UI.Windows
string.Empty,
string.Empty,
LocaleManager.Instance[LocaleKeys.InputDialogOk],
- (int)Symbol.Checkmark);
+ (int)FASymbol.Checkmark);
});
}
@@ -771,7 +776,7 @@ namespace Ryujinx.Ava.UI.Windows
_intelMacWarningShown = true;
}
- private void AppWindow_OnGotFocus(object sender, GotFocusEventArgs e)
+ private void AppWindow_OnGotFocus(object sender, FocusChangedEventArgs e)
{
if (ViewModel.AppHost is null)
return;
diff --git a/src/Ryujinx/UI/Windows/SettingsWindow.axaml b/src/Ryujinx/UI/Windows/SettingsWindow.axaml
index 7be53d2cd..06c78956f 100644
--- a/src/Ryujinx/UI/Windows/SettingsWindow.axaml
+++ b/src/Ryujinx/UI/Windows/SettingsWindow.axaml
@@ -49,7 +49,7 @@
-
-
-
+
-
-
+
-
-
-
+
+
-
-
-
-
+
-
-
-
+
+
-
-
-
-
-
-
-
+
-
-
-
+
+
-
-
+
+
-
-
-
+
+
diff --git a/src/Ryujinx/UI/Windows/SettingsWindow.axaml.cs b/src/Ryujinx/UI/Windows/SettingsWindow.axaml.cs
index e5b473627..31095d8d7 100644
--- a/src/Ryujinx/UI/Windows/SettingsWindow.axaml.cs
+++ b/src/Ryujinx/UI/Windows/SettingsWindow.axaml.cs
@@ -27,8 +27,8 @@ namespace Ryujinx.Ava.UI.Windows
NavPanel.PaneDisplayMode =
ConfigurationState.Instance.ShowOldUI
- ? NavigationViewPaneDisplayMode.Left
- : NavigationViewPaneDisplayMode.Top;
+ ? FANavigationViewPaneDisplayMode.Left
+ : FANavigationViewPaneDisplayMode.Top;
Height = ConfigurationState.Instance.ShowOldUI
? 906
@@ -62,9 +62,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())
{
diff --git a/src/Ryujinx/UI/Windows/StyleableWindow.cs b/src/Ryujinx/UI/Windows/StyleableWindow.cs
index 066440382..94fd8dec1 100644
--- a/src/Ryujinx/UI/Windows/StyleableWindow.cs
+++ b/src/Ryujinx/UI/Windows/StyleableWindow.cs
@@ -12,15 +12,17 @@ using System.Threading.Tasks;
namespace Ryujinx.Ava.UI.Windows
{
- public abstract class StyleableAppWindow : AppWindow
+ public abstract class StyleableAppWindow : FAAppWindow
{
public static async Task ShowAsync(StyleableAppWindow appWindow, Window owner = null)
{
+/*
#if DEBUG
- appWindow.AttachDevTools(new KeyGesture(Key.F12, KeyModifiers.Control));
+ appWindow.AttachDevTools(new KeyGesture(Key.F12, KeyModifiers.Control));
#endif
- await appWindow.ShowDialog(owner ?? RyujinxApp.MainWindow);
- }
+*/
+ await appWindow.ShowDialog(owner ?? RyujinxApp.MainWindow);
+ }
protected StyleableAppWindow(bool useCustomTitleBar = false, double? titleBarHeight = null)
{
@@ -33,7 +35,7 @@ namespace Ryujinx.Ava.UI.Windows
if (useCustomTitleBar)
{
TitleBar.ExtendsContentIntoTitleBar = !ConfigurationState.Instance.ShowOldUI;
- TitleBar.TitleBarHitTestType = ConfigurationState.Instance.ShowOldUI ? TitleBarHitTestType.Simple : TitleBarHitTestType.Complex;
+ TitleBar.TitleBarHitTestType = ConfigurationState.Instance.ShowOldUI ? FATitleBarHitTestType.Simple : FATitleBarHitTestType.Complex;
if (TitleBar.ExtendsContentIntoTitleBar && titleBarHeight != null)
TitleBar.Height = titleBarHeight.Value;
@@ -47,21 +49,23 @@ 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;
- }
+ } */
}
public abstract class StyleableWindow : Window
{
public static async Task ShowAsync(StyleableWindow window, Window owner = null)
{
+/*
#if DEBUG
window.AttachDevTools(new KeyGesture(Key.F12, KeyModifiers.Control));
#endif
+*/
await window.ShowDialog(owner ?? RyujinxApp.MainWindow);
}
@@ -81,11 +85,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;
- }
+ } */
}
}
diff --git a/src/Ryujinx/UI/Windows/UpdateWaitWindow.axaml.cs b/src/Ryujinx/UI/Windows/UpdateWaitWindow.axaml.cs
index b4226b4b2..30da393b4 100644
--- a/src/Ryujinx/UI/Windows/UpdateWaitWindow.axaml.cs
+++ b/src/Ryujinx/UI/Windows/UpdateWaitWindow.axaml.cs
@@ -7,7 +7,7 @@ namespace Ryujinx.Ava.UI.Windows
{
public UpdateWaitWindow(string primaryText, string secondaryText, CancellationTokenSource cancellationToken) : this(primaryText, secondaryText)
{
- SystemDecorations = SystemDecorations.Full;
+ WindowDecorations = WindowDecorations.Full;
ShowInTaskbar = true;
Closing += (_, _) => cancellationToken.Cancel();
@@ -18,7 +18,7 @@ namespace Ryujinx.Ava.UI.Windows
PrimaryText.Text = primaryText;
SecondaryText.Text = secondaryText;
WindowStartupLocation = WindowStartupLocation.CenterOwner;
- SystemDecorations = SystemDecorations.BorderOnly;
+ WindowDecorations = WindowDecorations.BorderOnly;
ShowInTaskbar = false;
}
diff --git a/src/Ryujinx/Utilities/ShortcutHelper.cs b/src/Ryujinx/Utilities/ShortcutHelper.cs
index b92f97f55..50ddfb498 100644
--- a/src/Ryujinx/Utilities/ShortcutHelper.cs
+++ b/src/Ryujinx/Utilities/ShortcutHelper.cs
@@ -19,7 +19,7 @@ namespace Ryujinx.Ava.Utilities
MemoryStream iconDataStream = new(iconData);
using SKBitmap image = SKBitmap.Decode(iconDataStream);
- image.Resize(new SKImageInfo(128, 128), SKFilterQuality.High);
+ image.Resize(new SKImageInfo(128, 128), new SKSamplingOptions(SKFilterMode.Linear));
SaveBitmapAsIcon(image, iconPath);
Shortcut shortcut = Shortcut.CreateShortcut(basePath, GetArgsString(applicationFilePath, applicationId, args), iconPath, 0);