Remove ToolTipText

pull/3943/head
2dust 2023-06-04 16:30:42 +08:00
parent 152c4802d0
commit b176ad03aa
3 changed files with 18 additions and 35 deletions

View File

@ -167,8 +167,8 @@ namespace v2rayN.ViewModels
[Reactive] [Reactive]
public ImageSource AppIcon { get; set; } public ImageSource AppIcon { get; set; }
[Reactive] //[Reactive]
public bool BlShowTrayTip { get; set; } //public bool BlShowTrayTip { get; set; }
#endregion Menu #endregion Menu
@ -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 = RunningServerDisplay = ResUI.CheckServerSettings;
RunningServerToolTipText = ResUI.CheckServerSettings; //RunningServerToolTipText = ResUI.CheckServerSettings;
} }
})); }));
} }
@ -1686,7 +1686,7 @@ namespace v2rayN.ViewModels
} }
CurrentFontSize = _config.uiItem.currentFontSize; CurrentFontSize = _config.uiItem.currentFontSize;
CurrentLanguage = _config.uiItem.currentLanguage; CurrentLanguage = _config.uiItem.currentLanguage;
BlShowTrayTip = _config.uiItem.showTrayTip; //BlShowTrayTip = _config.uiItem.showTrayTip;
this.WhenAnyValue( this.WhenAnyValue(
x => x.ColorModeDark, x => x.ColorModeDark,

View File

@ -301,7 +301,7 @@
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -323,13 +323,13 @@
Margin="8" Margin="8"
IsEnabled="{Binding ElementName=followSystemTheme, Path=IsChecked, Converter={StaticResource InverseBooleanConverter}}" /> IsEnabled="{Binding ElementName=followSystemTheme, Path=IsChecked, Converter={StaticResource InverseBooleanConverter}}" />
<TextBlock <TextBlock
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}" Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSettingsFollowSystemTheme}" /> Text="{x:Static resx:ResUI.TbSettingsFollowSystemTheme}" />
<ToggleButton <ToggleButton
x:Name="followSystemTheme" x:Name="followSystemTheme"
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
@ -856,23 +856,6 @@
Header="{x:Static resx:ResUI.menuExit}" /> Header="{x:Static resx:ResUI.menuExit}" />
</ContextMenu> </ContextMenu>
</tb:TaskbarIcon.ContextMenu> </tb:TaskbarIcon.ContextMenu>
<tb:TaskbarIcon.TrayToolTip>
<Border
x:Name="borTrayToolTip"
Width="Auto"
Height="Auto"
Background="{DynamicResource MaterialDesignLightBackground}"
BorderBrush="{DynamicResource MaterialDesignDarkBackground}"
BorderThickness="0"
CornerRadius="4">
<TextBlock
Margin="8"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="{DynamicResource MaterialDesignDarkBackground}"
Text="{Binding Mode=OneWay, Path=ToolTipText}" />
</Border>
</tb:TaskbarIcon.TrayToolTip>
</tb:TaskbarIcon> </tb:TaskbarIcon>
<materialDesign:Snackbar x:Name="MainSnackbar" MessageQueue="{materialDesign:MessageQueue}" /> <materialDesign:Snackbar x:Name="MainSnackbar" MessageQueue="{materialDesign:MessageQueue}" />
</Grid> </Grid>

View File

@ -163,10 +163,10 @@ 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);
//status bar //status bar
this.OneWayBind(ViewModel, vm => vm.InboundDisplay, v => v.txtInboundDisplay.Text).DisposeWith(disposables); this.OneWayBind(ViewModel, vm => vm.InboundDisplay, v => v.txtInboundDisplay.Text).DisposeWith(disposables);