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:
Evan Husted
2024-12-24 21:55:12 -06:00
parent f0aa7eedf6
commit 0ca4d6e921
10 changed files with 78 additions and 61 deletions

View File

@ -2,7 +2,6 @@ using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Media;
using Avalonia.Threading;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Windows;
@ -63,27 +62,9 @@ namespace Ryujinx.Ava.UI.Views.Main
// Change the volume by 5% at a time
float newValue = Window.ViewModel.Volume + (float)e.Delta.Y * 0.05f;
Window.ViewModel.Volume = newValue switch
{
< 0 => 0,
> 1 => 1,
_ => newValue,
};
Window.ViewModel.Volume = Math.Clamp(newValue, 0, 1);
e.Handled = true;
}
}
public class StatusBarSeparator : Border
{
public StatusBarSeparator()
{
Width = 2;
Height = 12;
Margin = new Thickness();
BorderBrush = Brushes.Gray;
Background = Brushes.Gray;
BorderThickness = new Thickness(1);
}
}
}