mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-29 20:47:11 +02:00
misc: Move StatusBarSeparator into Controls namespace, rename to MiniVerticalSeparator
add bulk property change event method give each markup extension its own property name
This commit is contained in:
parent
f0aa7eedf6
commit
0ca4d6e921
10 changed files with 78 additions and 61 deletions
|
@ -109,7 +109,7 @@ namespace Ryujinx.Ava.Common.Locale
|
|||
{
|
||||
_dynamicValues[key] = values;
|
||||
|
||||
OnPropertyChanged("Item");
|
||||
OnPropertyChanged("Translation");
|
||||
|
||||
return this[key];
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ namespace Ryujinx.Ava.Common.Locale
|
|||
_localeStrings[key] = val;
|
||||
}
|
||||
|
||||
OnPropertyChanged("Item");
|
||||
OnPropertyChanged("Translation");
|
||||
|
||||
LocaleChanged?.Invoke();
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Ryujinx.Ava.Common.Markup
|
|||
{
|
||||
internal abstract class BasicMarkupExtension<T> : MarkupExtension
|
||||
{
|
||||
public virtual string Name => "Item";
|
||||
public abstract string Name { get; }
|
||||
public virtual Action<object, T?>? Setter => null;
|
||||
|
||||
protected abstract T? Value { get; }
|
||||
|
|
|
@ -6,16 +6,19 @@ namespace Ryujinx.Ava.Common.Markup
|
|||
{
|
||||
internal class IconExtension(string iconString) : BasicMarkupExtension<Icon>
|
||||
{
|
||||
public override string Name => "Icon";
|
||||
protected override Icon Value => new() { Value = iconString };
|
||||
}
|
||||
|
||||
internal class SpinningIconExtension(string iconString) : BasicMarkupExtension<Icon>
|
||||
{
|
||||
public override string Name => "SIcon";
|
||||
protected override Icon Value => new() { Value = iconString, Animation = IconAnimation.Spin };
|
||||
}
|
||||
|
||||
internal class LocaleExtension(LocaleKeys key) : BasicMarkupExtension<string>
|
||||
{
|
||||
public override string Name => "Translation";
|
||||
protected override string Value => LocaleManager.Instance[key];
|
||||
|
||||
protected override void ConfigureBindingExtension(CompiledBindingExtension bindingExtension)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue