Skip to content

Commit

Permalink
Merge pull request 2dust#4299 from hxdhttk/hxdhttk/notifyUpd
Browse files Browse the repository at this point in the history
Update the H.NotifyIcon to show default system tooltip for sys tray icon.
  • Loading branch information
2dust authored Sep 30, 2023
2 parents 3c2da0a + a2b87b8 commit 2652bee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ public class MainWindowViewModel : ReactiveObject
[Reactive]
public string RunningServerDisplay { get; set; }

//[Reactive]
//public string RunningServerToolTipText { get; set; }
[Reactive]
public string RunningServerToolTipText { get; set; }

[Reactive]
public string RunningInfoDisplay { get; set; }
Expand Down Expand Up @@ -849,12 +849,12 @@ from t33 in t3b.DefaultIfEmpty()
{
var runningSummary = running.GetSummary();
RunningServerDisplay = $"{ResUI.menuServers}:{runningSummary}";
//RunningServerToolTipText = runningSummary;
RunningServerToolTipText = runningSummary;
}
else
{
RunningServerDisplay = ResUI.CheckServerSettings;
//RunningServerToolTipText = ResUI.CheckServerSettings;
RunningServerToolTipText = ResUI.CheckServerSettings;
}
}));
}
Expand Down
1 change: 1 addition & 0 deletions v2rayN/v2rayN/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@
<tb:TaskbarIcon
x:Name="tbNotify"
IconSource="/v2rayN.ico"
ToolTipText="v2rayN"
NoLeftClickDelay="True">
<tb:TaskbarIcon.ContextMenu>
<ContextMenu Style="{StaticResource DefContextMenu}">
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/v2rayN/Views/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public MainWindow()
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.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.AppIcon, v => v.Icon).DisposeWith(disposables);
//this.OneWayBind(ViewModel, vm => vm.BlShowTrayTip, v => v.borTrayToolTip.Visibility).DisposeWith(disposables);
Expand Down

0 comments on commit 2652bee

Please sign in to comment.