ux: use Slider instead of NumericUpDown for SubjectGuideLength in preferences window

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-06-24 15:31:29 +08:00
parent d4edb41e9f
commit f63eefc81b
No known key found for this signature in database

View file

@ -98,14 +98,20 @@
Text="{DynamicResource Text.Preferences.General.SubjectGuideLength}"
HorizontalAlignment="Right"
Margin="0,0,16,0"/>
<NumericUpDown Grid.Row="3" Grid.Column="1"
Minimum="50" Maximum="1000" Increment="1"
Height="28"
Padding="4"
ShowButtonSpinner="False"
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
CornerRadius="3"
Value="{Binding SubjectGuideLength, Mode=TwoWay}"/>
<Grid Grid.Row="3" Grid.Column="1" ColumnDefinitions="*,64">
<Slider Grid.Column="0"
Minimum="50" Maximum="200"
TickPlacement="BottomRight" TickFrequency="10"
IsSnapToTickEnabled="True"
VerticalAlignment="Center"
Foreground="{DynamicResource Brush.Border1}"
Value="{Binding SubjectGuideLength, Mode=TwoWay}"/>
<TextBlock Grid.Column="1"
HorizontalAlignment="Right" VerticalAlignment="Center"
Foreground="{DynamicResource Brush.FG1}"
Text="{Binding SubjectGuideLength, Mode=OneWay}"/>
</Grid>
<TextBlock Grid.Row="4" Grid.Column="0"
Text="{DynamicResource Text.Preferences.General.MaxHistoryCommits}"