Skip to content

Commit 721726d

Browse files
Jack251970TBM13
authored andcommitted
Merge pull request Flow-Launcher#3838 from Flow-Launcher/message_box_ex_vertically_center
Fix message box vertically center issue when message type is not OK
1 parent dea585a commit 721726d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Flow.Launcher/MessageBoxEx.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ public static MessageBoxResult Show(
3737
try
3838
{
3939
msgBox = new MessageBoxEx(button);
40-
if (caption == string.Empty && button == MessageBoxButton.OK && icon == MessageBoxImage.None)
40+
if (caption == string.Empty && icon == MessageBoxImage.None)
4141
{
42+
// If there is no caption and no icon, use DescOnlyTextBlock for vertically centered text
4243
msgBox.Title = messageBoxText;
4344
msgBox.DescOnlyTextBlock.Visibility = Visibility.Visible;
4445
msgBox.DescOnlyTextBlock.Text = messageBoxText;

0 commit comments

Comments
 (0)