0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2025-01-09 08:52:00 +00:00

UI: clean up slider UI for shader translation delay

This commit is contained in:
Evan Husted 2024-12-31 20:11:49 -06:00
parent 6286501550
commit 3525d5ecd4
2 changed files with 23 additions and 17 deletions

View file

@ -40,7 +40,7 @@ namespace Ryujinx.Ava.UI.ViewModels
} }
} }
public string ShaderTranslationDelayTooltipText => $"Current value: {ShaderTranslationDelay}"; public string ShaderTranslationDelayValueText => $"{ShaderTranslationDelay}ms";
public int ShaderTranslationDelay public int ShaderTranslationDelay
{ {
@ -49,7 +49,7 @@ namespace Ryujinx.Ava.UI.ViewModels
{ {
_shaderTranslationSleepDelay = value; _shaderTranslationSleepDelay = value;
OnPropertiesChanged(nameof(ShaderTranslationDelay), nameof(ShaderTranslationDelayTooltipText)); OnPropertiesChanged(nameof(ShaderTranslationDelay), nameof(ShaderTranslationDelayValueText));
} }
} }

View file

@ -54,21 +54,27 @@
<TextBlock VerticalAlignment="Center" <TextBlock VerticalAlignment="Center"
Text="Arbitrary Delay on Shader Translation"/> Text="Arbitrary Delay on Shader Translation"/>
</StackPanel> </StackPanel>
<Slider IsVisible="{Binding DirtyHacks.ShaderTranslationDelayEnabled}" <StackPanel
HorizontalAlignment="Center" IsVisible="{Binding DirtyHacks.ShaderTranslationDelayEnabled}"
Value="{Binding DirtyHacks.ShaderTranslationDelay}" Margin="0,10,0,0"
ToolTip.Tip="{Binding DirtyHacks.ShaderTranslationDelayTooltipText}" Orientation="Horizontal"
Width="175" HorizontalAlignment="Center">
Margin="0,-3,0,0" <Slider HorizontalAlignment="Center"
Height="32" Value="{Binding DirtyHacks.ShaderTranslationDelay}"
Padding="0,-5" Width="175"
TickFrequency="1" Margin="0,-3,0,0"
IsSnapToTickEnabled="True" Height="32"
LargeChange="10" Padding="0,-5"
SmallChange="1" TickFrequency="1"
VerticalAlignment="Center" IsSnapToTickEnabled="True"
Minimum="1" LargeChange="10"
Maximum="1000" /> SmallChange="1"
VerticalAlignment="Center"
Minimum="1"
Maximum="1000" />
<TextBlock Margin="5,0"
Text="{Binding DirtyHacks.ShaderTranslationDelayValueText}"/>
</StackPanel>
<Separator/> <Separator/>
</StackPanel> </StackPanel>
</Border> </Border>