Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Mar 5, 2023
1 parent 6fb17a4 commit 046ac95
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public class MainWindowViewModel : ReactiveObject
public ComboItem SelectedServer { get; set; }
[Reactive]
public string ServerFilter { get; set; }
[Reactive]
public bool BlServers { get; set; }
#endregion

#region Menu
Expand Down Expand Up @@ -787,9 +789,11 @@ private void RefreshServersMenu()
_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];
Expand Down
14 changes: 7 additions & 7 deletions v2rayN/v2rayN/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions v2rayN/v2rayN/Views/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public MainWindow()
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);
Expand Down

0 comments on commit 046ac95

Please sign in to comment.