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>
128 lines
6.6 KiB
XML
128 lines
6.6 KiB
XML
<Window x:Class="PSLauncher.App.Views.LicenseDetailsDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:loc="clr-namespace:PSLauncher.Core.Localization;assembly=PSLauncher.Core"
|
|
Title="License"
|
|
Icon="pack://application:,,,/Resources/favicon.ico"
|
|
Width="540" Height="540"
|
|
SizeToContent="Height"
|
|
MinHeight="480"
|
|
ResizeMode="NoResize"
|
|
WindowStartupLocation="CenterOwner"
|
|
Background="{StaticResource Brush.Bg.Window}">
|
|
<Grid Margin="32,28">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 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"
|
|
BorderThickness="2"
|
|
x:Name="HeaderBorder">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0"
|
|
x:Name="StatusIconText"
|
|
FontSize="32" FontWeight="Bold"
|
|
VerticalAlignment="Top" Margin="0,0,16,0" />
|
|
<StackPanel Grid.Column="1" VerticalAlignment="Center">
|
|
<TextBlock x:Name="StatusTitleText"
|
|
FontSize="18" FontWeight="SemiBold"
|
|
TextWrapping="Wrap"
|
|
Foreground="{StaticResource Brush.Text.Primary}" />
|
|
<TextBlock x:Name="StatusSubtitleText"
|
|
FontSize="13"
|
|
TextWrapping="Wrap"
|
|
Foreground="{StaticResource Brush.Text.Secondary}"
|
|
Margin="0,4,0,0" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Détails -->
|
|
<Border Grid.Row="2" Background="{StaticResource Brush.Bg.Card}"
|
|
BorderBrush="{StaticResource Brush.Border}" BorderThickness="1"
|
|
CornerRadius="6" Padding="20" Margin="0,16,0,0">
|
|
<StackPanel>
|
|
<Grid Margin="0,0,0,12">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="160" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" Text="{x:Static loc:Strings.LicenseDetailsClient}"
|
|
Foreground="{StaticResource Brush.Text.Secondary}" FontSize="12" />
|
|
<TextBlock Grid.Column="1" x:Name="OwnerText"
|
|
FontWeight="SemiBold"
|
|
Foreground="{StaticResource Brush.Text.Primary}" />
|
|
</Grid>
|
|
<Grid Margin="0,0,0,12">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="160" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" Text="{x:Static loc:Strings.LicenseDetailsValidity}"
|
|
Foreground="{StaticResource Brush.Text.Secondary}" FontSize="12" />
|
|
<TextBlock Grid.Column="1" x:Name="UntilText"
|
|
FontWeight="SemiBold"
|
|
Foreground="{StaticResource Brush.Text.Primary}" />
|
|
</Grid>
|
|
<Grid Margin="0,0,0,12">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="160" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" Text="{x:Static loc:Strings.LicenseDetailsActivatedOn}"
|
|
Foreground="{StaticResource Brush.Text.Secondary}" FontSize="12" />
|
|
<TextBlock Grid.Column="1" x:Name="IssuedText"
|
|
Foreground="{StaticResource Brush.Text.Primary}" />
|
|
</Grid>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="160" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" Text="{x:Static loc:Strings.LicenseDetailsMachineId}"
|
|
Foreground="{StaticResource Brush.Text.Secondary}" FontSize="12"
|
|
VerticalAlignment="Center" />
|
|
<Grid Grid.Column="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" x:Name="MachineIdText"
|
|
FontFamily="Consolas" FontSize="11"
|
|
Foreground="{StaticResource Brush.Text.Primary}"
|
|
TextTrimming="CharacterEllipsis" VerticalAlignment="Center" />
|
|
<Button Grid.Column="1" Style="{StaticResource SecondaryButton}"
|
|
Content="📋"
|
|
ToolTip="{x:Static loc:Strings.CopyTooltip}"
|
|
Click="OnCopyMachineId" />
|
|
</Grid>
|
|
</Grid>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Footer actions -->
|
|
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,18,0,0">
|
|
<Button Style="{StaticResource SecondaryButton}"
|
|
Content="{x:Static loc:Strings.LicenseDetailsDeactivate}"
|
|
Click="OnDeactivate"
|
|
Margin="0,0,12,0" />
|
|
<Button Style="{StaticResource AccentButton}"
|
|
Content="{x:Static loc:Strings.ActionClose}"
|
|
IsCancel="True" IsDefault="True"
|
|
Padding="32,8"
|
|
Click="OnClose" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|