bug fixes

pull/3492/head^2
2dust 2023-03-05 19:51:26 +08:00
parent 6fb17a4b74
commit 046ac95dc3
3 changed files with 12 additions and 7 deletions

View File

@ -69,6 +69,8 @@ namespace v2rayN.ViewModels
public ComboItem SelectedServer { get; set; }
[Reactive]
public string ServerFilter { get; set; }
[Reactive]
public bool BlServers { get; set; }
#endregion
#region Menu
@ -787,9 +789,11 @@ namespace v2rayN.ViewModels
_servers.Clear();
if (_lstProfile.Count > _config.guiItem.trayMenuServersLimit)
{
BlServers = false;
return;
}
BlServers = true;
for (int k = 0; k < _lstProfile.Count; k++)
{
ProfileItem it = _lstProfile[k];

View File

@ -833,17 +833,17 @@
</tb:TaskbarIcon.ContextMenu>
<tb:TaskbarIcon.TrayToolTip>
<Border
Background="White"
BorderBrush="Black"
BorderThickness="2"
CornerRadius="2"
Width="Auto"
Height="Auto">
Height="Auto"
Background="{DynamicResource MaterialDesignLightBackground}"
BorderBrush="{DynamicResource MaterialDesignDarkBackground}"
BorderThickness="1">
<TextBlock
Margin="2"
Text="{Binding Mode=OneWay, Path=ToolTipText}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
VerticalAlignment="Center"
Foreground="{DynamicResource MaterialDesignDarkBackground}"
Text="{Binding Mode=OneWay, Path=ToolTipText}" />
</Border>
</tb:TaskbarIcon.TrayToolTip>
</tb:TaskbarIcon>

View File

@ -150,6 +150,7 @@ namespace v2rayN.Views
this.OneWayBind(ViewModel, vm => vm.Servers, v => v.cmbServers.ItemsSource).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SelectedServer, v => v.cmbServers.SelectedItem).DisposeWith(disposables);
this.OneWayBind(ViewModel, vm => vm.BlServers, v => v.cmbServers.Visibility).DisposeWith(disposables);
//tray menu
this.BindCommand(ViewModel, vm => vm.AddServerViaClipboardCmd, v => v.menuAddServerViaClipboard2).DisposeWith(disposables);