Files
Libation/Source/LibationAvalonia/Dialogs/MessageBoxAlertAdminDialog.axaml
T
Cursor Agentandrmcrackan bfaab98eff Fit a longer startup message in the crash dialog
The dialog was pinned to 450px tall with the description in an Auto row, which
was fine for the two-line generic text but not for a message that names the
file, the version it has, the version it needs and the recovery steps: the
description pushed the exception box, the report instructions and the OK button
out of the window.

Cap and scroll the description, give the window room to grow, and top-align the
icon so it stops overlapping the text.

The Classic equivalent, MessageBoxLib.ShowAdminAlert, may need the same and
cannot be checked here.

Co-authored-by: rmcrackan <rmcrackan@gmail.com>
2026-08-26 13:15:53 +00:00

87 lines
2.5 KiB
XML

<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="450"
MinWidth="600" MinHeight="450"
MaxWidth="600" MaxHeight="620"
Width="600" Height="560"
x:Class="LibationAvalonia.Dialogs.MessageBoxAlertAdminDialog"
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
xmlns:dialogs="clr-namespace:LibationAvalonia.Dialogs"
x:DataType="dialogs:MessageBoxAlertAdminDialog"
Title="MessageBoxAlertAdminDialog"
WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="Auto,*,Auto,Auto">
<Grid
Grid.Column="0"
Margin="10,10,10,0"
ColumnDefinitions="Auto,*">
<Image Grid.Column="0" Width="64" Height="64" VerticalAlignment="Top" Source="/Assets/MBIcons/Error_64.png" />
<!--
Scrolled and capped: a startup failure that names the file, its version and the recovery steps
runs far longer than the two lines this dialog was built for, and without a bound on the
description the rows below it were pushed out of the window. See issue #2001.
-->
<ScrollViewer
Grid.Column="1"
MaxHeight="260"
VerticalScrollBarVisibility="Auto">
<TextBlock
Margin="10"
TextWrapping="Wrap"
Text="{Binding ErrorDescription}" />
</ScrollViewer>
</Grid>
<TextBox
Grid.Row="1"
Margin="10,10,10,0"
IsReadOnly="True"
TextWrapping="Wrap"
Text="{Binding ExceptionMessage}" />
<Grid
Grid.Row="2"
Margin="10,10,10,0"
ColumnDefinitions="Auto,*">
<TextBlock
Grid.Column="0"
Text="If you'd like to report this error to an administrator:&#xa;&#xa;Step 1: Go to Libation's &quot;issues&quot; page on github&#xa;Step 2: Find your log files&#xa;Setp 3: Click &quot;New issue&quot; button&#xa;Step 4: Drag/drop your log files" />
<StackPanel
Margin="50,0,0,0"
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Vertical">
<controls:LinkLabel
Margin="10"
Tapped="GoToGithub_Tapped"
Text="Click to go to github" />
<controls:LinkLabel
Margin="10"
Tapped="GoToLogs_Tapped"
Text="Click to open log files folder" />
</StackPanel>
</Grid>
<Button
Grid.Row="3"
HorizontalAlignment="Center"
Margin="10"
Name="OkButton"
Classes="SaveButton"
Content="Ok"
Click="OkButton_Clicked" />
</Grid>
</Window>