From 369ed86d1d8e68746b28634d75f12a2d4bead828 Mon Sep 17 00:00:00 2001
From: Jack251970 <1160210343@qq.com>
Date: Thu, 22 May 2025 18:44:01 +0800
Subject: [PATCH] Add administrator text in tray icon
---
Flow.Launcher/Languages/en.xaml | 1 +
Flow.Launcher/MainWindow.xaml.cs | 6 +++++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index f233a30d5..2abeb28f5 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -46,6 +46,7 @@
Position Reset
Reset search window position
Type here to search
+ (Admin)
Settings
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index bb29d78e5..470b25f93 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -595,9 +595,13 @@ namespace Flow.Launcher
private void InitializeNotifyIcon()
{
+ var text = Win32Helper.IsAdministrator() ?
+ Constant.FlowLauncherFullName + " " + App.API.GetTranslation("admin") :
+ Constant.FlowLauncherFullName;
+
_notifyIcon = new NotifyIcon
{
- Text = Constant.FlowLauncherFullName,
+ Text = text,
Icon = Constant.Version == "1.0.0" ? Properties.Resources.dev : Properties.Resources.app,
Visible = !_settings.HideNotifyIcon
};