Compare commits

..

2 Commits

Author SHA1 Message Date
Daniel Nylander
d213d048f0 Merge c0a9957d04 into f7976753fd 2025-03-04 01:03:55 -06:00
Daniel Nylander
c0a9957d04 Updated Swedish in locales.json 2025-03-04 07:00:37 +01:00
8 changed files with 50 additions and 42 deletions

View File

@@ -1664,7 +1664,7 @@
"pl_PL": "Rozszerzenie pliku: {0}",
"pt_BR": "Extensão: {0}",
"ru_RU": "Расширение файла: {0}",
"sv_SE": "Filänd: {0}",
"sv_SE": "Filändelse: {0}",
"th_TH": "นามสกุลไฟล์: {0}",
"tr_TR": "Dosya Uzantısı: {0}",
"uk_UA": "Розширення файлу: {0}",
@@ -1789,7 +1789,7 @@
"pl_PL": "Rozszerzenie pliku",
"pt_BR": "Extensão",
"ru_RU": "Расширение файла",
"sv_SE": "Filänd",
"sv_SE": "Filändelse",
"th_TH": "นามสกุลไฟล์",
"tr_TR": "Dosya Uzantısı",
"uk_UA": "Розширення файлу",
@@ -3989,7 +3989,7 @@
"pl_PL": "",
"pt_BR": "Carregar Automaticamente Pasta de DLC e Atualizações",
"ru_RU": "Автозагрузка папки с DLC/Обновлениями",
"sv_SE": "Läs automatisk in DLC/speluppdateringar",
"sv_SE": "Läs automatiskt in DLC/speluppdateringar",
"th_TH": "โหลดไดเรกทอรี DLC/ไฟล์อัปเดต อัตโนมัติ",
"tr_TR": "",
"uk_UA": "Автозавантаження теки DLC/Оновлень",
@@ -7239,7 +7239,7 @@
"pl_PL": "Przyciski",
"pt_BR": "Botões",
"ru_RU": "Кнопки",
"sv_SE": "Knappar",
"sv_SE": "Handlingsknappar",
"th_TH": "ปุ่มกด",
"tr_TR": "Tuşlar",
"uk_UA": "Кнопки",
@@ -14889,7 +14889,7 @@
"pl_PL": "Wielowątkowość Backendu Graficznego:",
"pt_BR": "Multi Enfileiramento do Renderizador Gráfico:",
"ru_RU": "Многопоточность графического бэкенда:",
"sv_SE": "Multithreading för grafikbakände:",
"sv_SE": "Multitrådning för grafikbakände:",
"th_TH": "มัลติเธรด กราฟิกเบื้องหลัง:",
"tr_TR": "Grafik Backend Multithreading:",
"uk_UA": "Багатопотоковість графічного сервера:",
@@ -18689,7 +18689,7 @@
"pl_PL": "",
"pt_BR": "Não Reduzido",
"ru_RU": "Не обрезан",
"sv_SE": "Inte optimerad",
"sv_SE": "Orörd",
"th_TH": "",
"tr_TR": "",
"uk_UA": "Необрізані",

View File

@@ -17,9 +17,4 @@
<sty:FluentAvaloniaTheme PreferUserAccentColor="True" PreferSystemTheme="False" />
<StyleInclude Source="/Assets/Styles/Styles.xaml" />
</Application.Styles>
<NativeMenu.Menu>
<NativeMenu>
<NativeMenuItem Header="About Ryujinx" Click="AboutRyujinx_OnClick" />
</NativeMenu>
</NativeMenu.Menu>
</Application>

View File

@@ -147,10 +147,5 @@ namespace Ryujinx.Ava
Current is RyujinxApp { PlatformSettings: not null } app
? ConvertThemeVariant(app.PlatformSettings.GetColorValues().ThemeVariant)
: ThemeVariant.Default;
private async void AboutRyujinx_OnClick(object sender, EventArgs e)
{
await AboutWindow.Show();
}
}
}

View File

@@ -4,7 +4,6 @@ using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Input;
using Avalonia.Layout;
using Avalonia.Media;
using Avalonia.Styling;
using Avalonia.Threading;
using FluentAvalonia.Core;
using FluentAvalonia.UI.Controls;
@@ -22,23 +21,6 @@ namespace Ryujinx.Ava.UI.Helpers
private static bool _isChoiceDialogOpen;
private static ContentDialogOverlayWindow _contentDialogOverlayWindow;
public static ContentDialog ApplyStyles(
this ContentDialog contentDialog,
double closeButtonWidth = 80,
HorizontalAlignment buttonSpaceAlignment = HorizontalAlignment.Right)
{
Style closeButton = new(x => x.Name("CloseButton"));
closeButton.Setters.Add(new Setter(Layoutable.WidthProperty, closeButtonWidth));
Style closeButtonParent = new(x => x.Name("CommandSpace"));
closeButtonParent.Setters.Add(new Setter(Layoutable.HorizontalAlignmentProperty, buttonSpaceAlignment));
contentDialog.Styles.Add(closeButton);
contentDialog.Styles.Add(closeButtonParent);
return contentDialog;
}
private async static Task<UserResult> ShowContentDialog(
string title,
object content,

View File

@@ -1,7 +1,6 @@
using Avalonia.Controls;
using Avalonia.Input.Platform;
using Avalonia.Interactivity;
using Avalonia.Layout;
using Avalonia.Styling;
using FluentAvalonia.UI.Controls;
using Ryujinx.Ava.Common.Locale;
@@ -30,7 +29,17 @@ namespace Ryujinx.Ava.UI.Views.Misc
Content = new ApplicationDataView { ViewModel = new ApplicationDataViewModel(appData) }
};
await ContentDialogHelper.ShowAsync(contentDialog.ApplyStyles(160, HorizontalAlignment.Center));
Style closeButton = new(x => x.Name("CloseButton"));
closeButton.Setters.Add(new Setter(WidthProperty, 160d));
Style closeButtonParent = new(x => x.Name("CommandSpace"));
closeButtonParent.Setters.Add(new Setter(HorizontalAlignmentProperty,
Avalonia.Layout.HorizontalAlignment.Center));
contentDialog.Styles.Add(closeButton);
contentDialog.Styles.Add(closeButtonParent);
await ContentDialogHelper.ShowAsync(contentDialog);
}
public ApplicationDataView()

View File

@@ -32,7 +32,17 @@ namespace Ryujinx.Ava.UI.Views.Misc
Content = new DlcSelectView { ViewModel = viewModel }
};
await ContentDialogHelper.ShowAsync(contentDialog.ApplyStyles());
Style closeButton = new(x => x.Name("CloseButton"));
closeButton.Setters.Add(new Setter(WidthProperty, 80d));
Style closeButtonParent = new(x => x.Name("CommandSpace"));
closeButtonParent.Setters.Add(new Setter(HorizontalAlignmentProperty,
Avalonia.Layout.HorizontalAlignment.Right));
contentDialog.Styles.Add(closeButton);
contentDialog.Styles.Add(closeButtonParent);
await ContentDialogHelper.ShowAsync(contentDialog);
return viewModel.SelectedDlc;
}

View File

@@ -5,7 +5,6 @@ using Avalonia.Layout;
using Avalonia.Styling;
using FluentAvalonia.UI.Controls;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Controls;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Common;
@@ -15,7 +14,7 @@ using Button = Avalonia.Controls.Button;
namespace Ryujinx.Ava.UI.Windows
{
public partial class AboutWindow : RyujinxControl<AboutWindowViewModel>
public partial class AboutWindow : UserControl
{
public AboutWindow()
{
@@ -34,10 +33,19 @@ namespace Ryujinx.Ava.UI.Windows
PrimaryButtonText = string.Empty,
SecondaryButtonText = string.Empty,
CloseButtonText = LocaleManager.Instance[LocaleKeys.UserProfilesClose],
Content = new AboutWindow { ViewModel = viewModel }
Content = new AboutWindow { DataContext = viewModel }
};
await ContentDialogHelper.ShowAsync(contentDialog.ApplyStyles());
Style closeButton = new(x => x.Name("CloseButton"));
closeButton.Setters.Add(new Setter(WidthProperty, 80d));
Style closeButtonParent = new(x => x.Name("CommandSpace"));
closeButtonParent.Setters.Add(new Setter(HorizontalAlignmentProperty, HorizontalAlignment.Right));
contentDialog.Styles.Add(closeButton);
contentDialog.Styles.Add(closeButtonParent);
await ContentDialogHelper.ShowAsync(contentDialog);
}
private void Button_OnClick(object sender, RoutedEventArgs e)

View File

@@ -25,7 +25,16 @@ namespace Ryujinx.Ava.Utilities.Compat
}
};
await ContentDialogHelper.ShowAsync(contentDialog.ApplyStyles());
Style closeButton = new(x => x.Name("CloseButton"));
closeButton.Setters.Add(new Setter(WidthProperty, 80d));
Style closeButtonParent = new(x => x.Name("CommandSpace"));
closeButtonParent.Setters.Add(new Setter(HorizontalAlignmentProperty, Avalonia.Layout.HorizontalAlignment.Right));
contentDialog.Styles.Add(closeButton);
contentDialog.Styles.Add(closeButtonParent);
await ContentDialogHelper.ShowAsync(contentDialog);
}
public CompatibilityList()