Ava UI: RTL Language Support (#5619)
* Add Hebrew locale files to ItemGroups * Align all windows RTL for testing This should be controlled with a binding that selects the appropriate layout based on current language * Update FlowDirection as Locale changes * Fix Settings NavigationViewItem FlowDirection * Fix remaining text * Fix input menu directionality * Fix RTL not rendering * Fix rebase errors
This commit is contained in:
parent
f037fcba9a
commit
1a45dc8df8
14 changed files with 60 additions and 29 deletions
|
@ -1,7 +1,9 @@
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.Platform;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ui.Common.Configuration;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
@ -22,6 +24,14 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
Icon = new WindowIcon(stream);
|
||||
stream.Position = 0;
|
||||
IconImage = new Bitmap(stream);
|
||||
|
||||
LocaleManager.Instance.LocaleChanged += LocaleChanged;
|
||||
LocaleChanged();
|
||||
}
|
||||
|
||||
private void LocaleChanged()
|
||||
{
|
||||
FlowDirection = LocaleManager.Instance.IsRTL() ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
|
||||
}
|
||||
|
||||
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue