fix(ui): wrap the pre-release label in the update dialog (#10303)

The per-core pre-release switch and its label sit in a horizontal
StackPanel inside a fixed-width column of the update dialog.
Translations longer than the column do not fit: in Avalonia the label
runs over the core name and the update status (Russian, French,
Hungarian, Persian), and in WPF it is cut off. Use a DockPanel so that
the label wraps inside its column, as the interval label of the
subscription window does since #10292. The dialog keeps its width.

In Avalonia the panel also had a vertical margin on top of the
margin of the switch, so the two rows with the switch were 8 px taller
than the other rows. Use a horizontal-only margin, as the WPF view
already does.
This commit is contained in:
Miheichev Aleksandr Sergeevich
2026-10-07 03:11:27 +00:00
committed by GitHub
parent fa9d4a4769
commit 5ea8ae6420
2 changed files with 12 additions and 10 deletions
@@ -75,22 +75,23 @@
VerticalAlignment="Center"
IsChecked="{Binding IsSelected}" />
<StackPanel
<DockPanel
Grid.Column="1"
Margin="{StaticResource Margin4}"
IsVisible="{Binding ShowCheckPreRelease}"
Orientation="Horizontal">
Margin="{StaticResource MarginLr4}"
IsVisible="{Binding ShowCheckPreRelease}">
<ToggleSwitch
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
IsChecked="{Binding IsCheckPreRelease}"
OffContent=""
OnContent="" />
<TextBlock
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbSettingsEnableCheckPreReleaseUpdate}" />
</StackPanel>
Text="{x:Static resx:ResUI.TbSettingsEnableCheckPreReleaseUpdate}"
TextWrapping="Wrap" />
</DockPanel>
<TextBlock
Grid.Column="2"
+5 -4
View File
@@ -85,21 +85,22 @@
VerticalAlignment="Center"
IsChecked="{Binding IsSelected}" />
<StackPanel
<DockPanel
Grid.Column="1"
Margin="{StaticResource MarginLeftRight4}"
Orientation="Horizontal"
Visibility="{Binding ShowCheckPreRelease, Converter={StaticResource BoolToVisConverter}}">
<ToggleButton
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
VerticalAlignment="Center"
IsChecked="{Binding IsCheckPreRelease}" />
<TextBlock
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSettingsEnableCheckPreReleaseUpdate}" />
</StackPanel>
Text="{x:Static resx:ResUI.TbSettingsEnableCheckPreReleaseUpdate}"
TextWrapping="Wrap" />
</DockPanel>
<TextBlock
Grid.Column="2"