LicenseDetailsDialog: header wraps long subtitles + auto-resize
The « Update license expired » header was truncating the « Expired on X. You can still download versions… » subtitle: no TextWrapping on the TextBlock and the inner StackPanel had no horizontal width constraint. Switched the icon-and-text layout from a horizontal StackPanel to a 2-column Grid (Auto + *) so the text column expands to the Border width. TextWrapping="Wrap" on title + subtitle, icon now top-aligned to follow the wrap. Window switched to SizeToContent="Height" with MinHeight=480 so it grows when the localized message wraps to 3+ lines. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,9 @@
|
|||||||
xmlns:loc="clr-namespace:PSLauncher.Core.Localization;assembly=PSLauncher.Core"
|
xmlns:loc="clr-namespace:PSLauncher.Core.Localization;assembly=PSLauncher.Core"
|
||||||
Title="License"
|
Title="License"
|
||||||
Icon="pack://application:,,,/Resources/favicon.ico"
|
Icon="pack://application:,,,/Resources/favicon.ico"
|
||||||
Width="500" Height="480"
|
Width="540" Height="540"
|
||||||
|
SizeToContent="Height"
|
||||||
|
MinHeight="480"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
Background="{StaticResource Brush.Bg.Window}">
|
Background="{StaticResource Brush.Bg.Window}">
|
||||||
@@ -16,24 +18,34 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Header avec badge couleur -->
|
<!-- Header avec badge couleur. On utilise un Grid (Auto + *) pour que la
|
||||||
|
colonne texte prenne tout l'espace disponible et que le sous-titre
|
||||||
|
puisse wrapper sur plusieurs lignes (les messages "License expirée
|
||||||
|
le X. Vous pouvez encore..." font facilement 2-3 lignes). -->
|
||||||
<Border Grid.Row="0" CornerRadius="8" Padding="20,16"
|
<Border Grid.Row="0" CornerRadius="8" Padding="20,16"
|
||||||
BorderThickness="2"
|
BorderThickness="2"
|
||||||
x:Name="HeaderBorder">
|
x:Name="HeaderBorder">
|
||||||
<StackPanel Orientation="Horizontal">
|
<Grid>
|
||||||
<TextBlock x:Name="StatusIconText"
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
x:Name="StatusIconText"
|
||||||
FontSize="32" FontWeight="Bold"
|
FontSize="32" FontWeight="Bold"
|
||||||
VerticalAlignment="Center" Margin="0,0,16,0" />
|
VerticalAlignment="Top" Margin="0,0,16,0" />
|
||||||
<StackPanel VerticalAlignment="Center">
|
<StackPanel Grid.Column="1" VerticalAlignment="Center">
|
||||||
<TextBlock x:Name="StatusTitleText"
|
<TextBlock x:Name="StatusTitleText"
|
||||||
FontSize="18" FontWeight="SemiBold"
|
FontSize="18" FontWeight="SemiBold"
|
||||||
|
TextWrapping="Wrap"
|
||||||
Foreground="{StaticResource Brush.Text.Primary}" />
|
Foreground="{StaticResource Brush.Text.Primary}" />
|
||||||
<TextBlock x:Name="StatusSubtitleText"
|
<TextBlock x:Name="StatusSubtitleText"
|
||||||
FontSize="13"
|
FontSize="13"
|
||||||
|
TextWrapping="Wrap"
|
||||||
Foreground="{StaticResource Brush.Text.Secondary}"
|
Foreground="{StaticResource Brush.Text.Secondary}"
|
||||||
Margin="0,2,0,0" />
|
Margin="0,4,0,0" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Détails -->
|
<!-- Détails -->
|
||||||
|
|||||||
Reference in New Issue
Block a user