From 4bc9e86a27a7f7568543cf3c98e8f88caf18c5db Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Mon, 25 Nov 2024 12:06:33 +0800
Subject: [PATCH] Improve MessageBoxEx style as System.Windows.MessageBox
---
Flow.Launcher.Core/MessageBoxEx.xaml | 24 ++++++++++++------------
Flow.Launcher.Core/MessageBoxEx.xaml.cs | 6 +++---
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/Flow.Launcher.Core/MessageBoxEx.xaml b/Flow.Launcher.Core/MessageBoxEx.xaml
index 3467b3a0c..8edb0873d 100644
--- a/Flow.Launcher.Core/MessageBoxEx.xaml
+++ b/Flow.Launcher.Core/MessageBoxEx.xaml
@@ -124,18 +124,6 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Orientation="Horizontal">
-
-
+
+
diff --git a/Flow.Launcher.Core/MessageBoxEx.xaml.cs b/Flow.Launcher.Core/MessageBoxEx.xaml.cs
index 911e6b5b8..1a986be4c 100644
--- a/Flow.Launcher.Core/MessageBoxEx.xaml.cs
+++ b/Flow.Launcher.Core/MessageBoxEx.xaml.cs
@@ -125,16 +125,16 @@ namespace Flow.Launcher.Core
case MessageBoxButton.OKCancel:
msgBox.btnNo.Visibility = Visibility.Collapsed;
msgBox.btnYes.Visibility = Visibility.Collapsed;
- msgBox.btnCancel.Focus();
+ msgBox.btnOk.Focus();
break;
case MessageBoxButton.YesNo:
msgBox.btnOk.Visibility = Visibility.Collapsed;
msgBox.btnCancel.Visibility = Visibility.Collapsed;
- msgBox.btnNo.Focus();
+ msgBox.btnYes.Focus();
break;
case MessageBoxButton.YesNoCancel:
msgBox.btnOk.Visibility = Visibility.Collapsed;
- msgBox.btnCancel.Focus();
+ msgBox.btnYes.Focus();
break;
default:
break;