feat(ui): Help overlay with Info/Donate tabs, fixed dimensions
Help button now shows a fixed-size two-tab overlay: Info tab: app name + version, one-line description, thin separator, © 2026 Davide Grilli — MIT License, Built with .NET 10 · Avalonia 12 · NBitcoin. Donate tab: dev address (plm1qdq3…) read-only display, free amount input, prepare-preview row, confirm-and-broadcast button. Overlay dimensions are stable across tabs and between desktop/mobile: - TabControl Height=320 (fixed, never resizes on tab switch) - HorizontalAlignment=Stretch + MaxWidth=440 on the card (always fills available width; previously Center caused the card to shrink to content width, which differed between Info and Donate) - Each tab content wrapped in ScrollViewer for safe overflow handling New MainWindowViewModel.Donate.cs: PrepareDonate / ConfirmDonate / ResetDonate (called on overlay close). Six-language Loc keys added for all donate strings.
This commit is contained in:
@@ -1373,14 +1373,16 @@
|
|||||||
<Border Background="{DynamicResource OverlayCardBrush}"
|
<Border Background="{DynamicResource OverlayCardBrush}"
|
||||||
BorderBrush="{DynamicResource BorderSubtleBrush}" BorderThickness="1" CornerRadius="8"
|
BorderBrush="{DynamicResource BorderSubtleBrush}" BorderThickness="1" CornerRadius="8"
|
||||||
MaxWidth="440" Margin="16"
|
MaxWidth="440" Margin="16"
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Center">
|
HorizontalAlignment="Stretch" VerticalAlignment="Center">
|
||||||
<StackPanel Margin="24" Spacing="16">
|
<StackPanel Margin="24" Spacing="16">
|
||||||
<TextBlock Text="{Binding Loc[help.title]}"
|
<TextBlock Text="{Binding Loc[help.title]}"
|
||||||
FontSize="18" FontWeight="Bold"/>
|
FontSize="18" FontWeight="Bold"/>
|
||||||
|
|
||||||
<TabControl>
|
<!-- Fixed height so the overlay never resizes when switching tabs. -->
|
||||||
|
<TabControl Height="320">
|
||||||
<!-- Tab: Info -->
|
<!-- Tab: Info -->
|
||||||
<TabItem Header="{Binding Loc[help.tab.info]}">
|
<TabItem Header="{Binding Loc[help.tab.info]}">
|
||||||
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
<StackPanel Spacing="12" Margin="0,12,0,0">
|
<StackPanel Spacing="12" Margin="0,12,0,0">
|
||||||
<StackPanel Spacing="4">
|
<StackPanel Spacing="4">
|
||||||
<TextBlock Text="Palladium Wallet" FontSize="16" FontWeight="Bold"/>
|
<TextBlock Text="Palladium Wallet" FontSize="16" FontWeight="Bold"/>
|
||||||
@@ -1388,11 +1390,23 @@
|
|||||||
Foreground="{DynamicResource TextSecondaryBrush}"/>
|
Foreground="{DynamicResource TextSecondaryBrush}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Text="{Binding Loc[help.info]}" TextWrapping="Wrap"/>
|
<TextBlock Text="{Binding Loc[help.info]}" TextWrapping="Wrap"/>
|
||||||
|
<Border BorderBrush="{DynamicResource BorderSubtleBrush}"
|
||||||
|
BorderThickness="0,1,0,0" Margin="0,4,0,0"/>
|
||||||
|
<StackPanel Spacing="4">
|
||||||
|
<TextBlock Text="© 2026 Davide Grilli — MIT License"
|
||||||
|
FontSize="12"
|
||||||
|
Foreground="{DynamicResource TextSecondaryBrush}"/>
|
||||||
|
<TextBlock Text="Built with .NET 10 · Avalonia 12 · NBitcoin"
|
||||||
|
FontSize="11"
|
||||||
|
Foreground="{DynamicResource TextSecondaryBrush}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<!-- Tab: Donate -->
|
<!-- Tab: Donate -->
|
||||||
<TabItem Header="{Binding Loc[help.tab.donate]}">
|
<TabItem Header="{Binding Loc[help.tab.donate]}">
|
||||||
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||||
<StackPanel Spacing="12" Margin="0,12,0,0">
|
<StackPanel Spacing="12" Margin="0,12,0,0">
|
||||||
<TextBlock Text="{Binding Loc[donate.desc]}" TextWrapping="Wrap"
|
<TextBlock Text="{Binding Loc[donate.desc]}" TextWrapping="Wrap"
|
||||||
Foreground="{DynamicResource TextSecondaryBrush}"/>
|
Foreground="{DynamicResource TextSecondaryBrush}"/>
|
||||||
@@ -1438,6 +1452,7 @@
|
|||||||
Command="{Binding PrepareDonateCommand}"/>
|
Command="{Binding PrepareDonateCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user