Add administrator text in tray icon

This commit is contained in:
Jack251970 2025-05-22 18:44:01 +08:00
parent 7549bba293
commit 369ed86d1d
2 changed files with 6 additions and 1 deletions

View file

@ -46,6 +46,7 @@
<system:String x:Key="PositionReset">Position Reset</system:String>
<system:String x:Key="PositionResetToolTip">Reset search window position</system:String>
<system:String x:Key="queryTextBoxPlaceholder">Type here to search</system:String>
<system:String x:Key="admin">(Admin)</system:String>
<!-- Setting General -->
<system:String x:Key="flowlauncher_settings">Settings</system:String>

View file

@ -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
};