mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-30 18:27:11 +02:00
Avalonia: Make slider scrollable with mouse wheel (#5760)
* Add scrollable custom control based on TickFrequency * Use custom slider to update value when pointer wheel scrolled * Remove extra xaml file * Address formatting issues * Only scroll one element at a time * Add OnPointerWheelChanged event to VolumeStatus button Co-authored-by: Ahmad Tantowi <ahmadtantowi@outlook.com> --------- Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
This commit is contained in:
parent
6fdf774845
commit
b4bb22ba06
9 changed files with 76 additions and 22 deletions
|
@ -1,6 +1,7 @@
|
|||
<UserControl
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
|
||||
|
@ -21,7 +22,7 @@
|
|||
TextWrapping="WrapWithOverflow"
|
||||
HorizontalAlignment="Center"
|
||||
Text="{locale:Locale ControllerSettingsRumbleStrongMultiplier}" />
|
||||
<Slider
|
||||
<controls:SliderScroll
|
||||
Margin="0,-5,0,-5"
|
||||
Width="200"
|
||||
TickFrequency="0.01"
|
||||
|
@ -41,7 +42,7 @@
|
|||
TextWrapping="WrapWithOverflow"
|
||||
HorizontalAlignment="Center"
|
||||
Text="{locale:Locale ControllerSettingsRumbleWeakMultiplier}" />
|
||||
<Slider
|
||||
<controls:SliderScroll
|
||||
Margin="0,-5,0,-5"
|
||||
Width="200"
|
||||
MaxWidth="200"
|
||||
|
@ -58,4 +59,4 @@
|
|||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue