Merge pull request #4299 from hxdhttk/hxdhttk/notifyUpd

Update the H.NotifyIcon to show default system tooltip for sys tray icon.
pull/4385/head^2
2dust 2023-09-30 14:25:03 +08:00 committed by GitHub
commit 2652beed88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -210,8 +210,8 @@ namespace v2rayN.ViewModels
[Reactive] [Reactive]
public string RunningServerDisplay { get; set; } public string RunningServerDisplay { get; set; }
//[Reactive] [Reactive]
//public string RunningServerToolTipText { get; set; } public string RunningServerToolTipText { get; set; }
[Reactive] [Reactive]
public string RunningInfoDisplay { get; set; } public string RunningInfoDisplay { get; set; }
@ -849,12 +849,12 @@ namespace v2rayN.ViewModels
{ {
var runningSummary = running.GetSummary(); var runningSummary = running.GetSummary();
RunningServerDisplay = $"{ResUI.menuServers}:{runningSummary}"; RunningServerDisplay = $"{ResUI.menuServers}:{runningSummary}";
//RunningServerToolTipText = runningSummary; RunningServerToolTipText = runningSummary;
} }
else else
{ {
RunningServerDisplay = ResUI.CheckServerSettings; RunningServerDisplay = ResUI.CheckServerSettings;
//RunningServerToolTipText = ResUI.CheckServerSettings; RunningServerToolTipText = ResUI.CheckServerSettings;
} }
})); }));
} }

View File

@ -751,6 +751,7 @@
<tb:TaskbarIcon <tb:TaskbarIcon
x:Name="tbNotify" x:Name="tbNotify"
IconSource="/v2rayN.ico" IconSource="/v2rayN.ico"
ToolTipText="v2rayN"
NoLeftClickDelay="True"> NoLeftClickDelay="True">
<tb:TaskbarIcon.ContextMenu> <tb:TaskbarIcon.ContextMenu>
<ContextMenu Style="{StaticResource DefContextMenu}"> <ContextMenu Style="{StaticResource DefContextMenu}">

View File

@ -176,7 +176,7 @@ namespace v2rayN.Views
this.BindCommand(ViewModel, vm => vm.SubUpdateViaProxyCmd, v => v.menuSubUpdateViaProxy2).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.SubUpdateViaProxyCmd, v => v.menuSubUpdateViaProxy2).DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.NotifyIcon, v => v.tbNotify.Icon).DisposeWith(disposables); this.OneWayBind(ViewModel, vm => vm.NotifyIcon, v => v.tbNotify.Icon).DisposeWith(disposables);
//this.OneWayBind(ViewModel, vm => vm.RunningServerToolTipText, v => v.tbNotify.ToolTipText).DisposeWith(disposables); this.OneWayBind(ViewModel, vm => vm.RunningServerToolTipText, v => v.tbNotify.ToolTipText).DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.NotifyLeftClickCmd, v => v.tbNotify.LeftClickCommand).DisposeWith(disposables); this.OneWayBind(ViewModel, vm => vm.NotifyLeftClickCmd, v => v.tbNotify.LeftClickCommand).DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.AppIcon, v => v.Icon).DisposeWith(disposables); this.OneWayBind(ViewModel, vm => vm.AppIcon, v => v.Icon).DisposeWith(disposables);
//this.OneWayBind(ViewModel, vm => vm.BlShowTrayTip, v => v.borTrayToolTip.Visibility).DisposeWith(disposables); //this.OneWayBind(ViewModel, vm => vm.BlShowTrayTip, v => v.borTrayToolTip.Visibility).DisposeWith(disposables);