From 890b115b37e286a85293878846e627712aaa6091 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 17 Jul 2025 11:50:56 +0800 Subject: [PATCH] Fix message box vertically center issue when message type is not OK --- Flow.Launcher/MessageBoxEx.xaml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher/MessageBoxEx.xaml.cs b/Flow.Launcher/MessageBoxEx.xaml.cs index 7296ff4cab6..907bfb926d5 100644 --- a/Flow.Launcher/MessageBoxEx.xaml.cs +++ b/Flow.Launcher/MessageBoxEx.xaml.cs @@ -37,8 +37,9 @@ public static MessageBoxResult Show( try { msgBox = new MessageBoxEx(button); - if (caption == string.Empty && button == MessageBoxButton.OK && icon == MessageBoxImage.None) + if (caption == string.Empty && icon == MessageBoxImage.None) { + // If there is no caption and no icon, use DescOnlyTextBlock for vertically centered text msgBox.Title = messageBoxText; msgBox.DescOnlyTextBlock.Visibility = Visibility.Visible; msgBox.DescOnlyTextBlock.Text = messageBoxText;