mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-06 20:45:00 +03:00
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:
committed by
GitHub
parent
fa9d4a4769
commit
5ea8ae6420
@@ -75,22 +75,23 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsChecked="{Binding IsSelected}" />
|
IsChecked="{Binding IsSelected}" />
|
||||||
|
|
||||||
<StackPanel
|
<DockPanel
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource MarginLr4}"
|
||||||
IsVisible="{Binding ShowCheckPreRelease}"
|
IsVisible="{Binding ShowCheckPreRelease}">
|
||||||
Orientation="Horizontal">
|
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
IsChecked="{Binding IsCheckPreRelease}"
|
IsChecked="{Binding IsCheckPreRelease}"
|
||||||
OffContent=""
|
OffContent=""
|
||||||
OnContent="" />
|
OnContent="" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsEnableCheckPreReleaseUpdate}" />
|
Text="{x:Static resx:ResUI.TbSettingsEnableCheckPreReleaseUpdate}"
|
||||||
</StackPanel>
|
TextWrapping="Wrap" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
|
|||||||
@@ -85,21 +85,22 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsChecked="{Binding IsSelected}" />
|
IsChecked="{Binding IsSelected}" />
|
||||||
|
|
||||||
<StackPanel
|
<DockPanel
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource MarginLeftRight4}"
|
Margin="{StaticResource MarginLeftRight4}"
|
||||||
Orientation="Horizontal"
|
|
||||||
Visibility="{Binding ShowCheckPreRelease, Converter={StaticResource BoolToVisConverter}}">
|
Visibility="{Binding ShowCheckPreRelease, Converter={StaticResource BoolToVisConverter}}">
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
IsChecked="{Binding IsCheckPreRelease}" />
|
IsChecked="{Binding IsCheckPreRelease}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsEnableCheckPreReleaseUpdate}" />
|
Text="{x:Static resx:ResUI.TbSettingsEnableCheckPreReleaseUpdate}"
|
||||||
</StackPanel>
|
TextWrapping="Wrap" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
|
|||||||
Reference in New Issue
Block a user