Dark border for every window

This commit is contained in:
FrzMtrsprt
2023-01-01 21:18:10 +08:00
parent 020df117c4
commit 26bf7c149c
10 changed files with 18 additions and 2 deletions

View File

@@ -58,6 +58,7 @@ namespace v2rayN.ViewModels
SaveServer(); SaveServer();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
} }
private void SaveServer() private void SaveServer()

View File

@@ -46,6 +46,7 @@ namespace v2rayN.ViewModels
SaveServer(); SaveServer();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
} }
private void SaveServer() private void SaveServer()

View File

@@ -161,6 +161,8 @@ namespace v2rayN.ViewModels
{ {
SaveSetting(); SaveSetting();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
} }
private void InitCoreType() private void InitCoreType()

View File

@@ -61,6 +61,7 @@ namespace v2rayN.ViewModels
SaveRules(); SaveRules();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
} }
private void SaveRules() private void SaveRules()
{ {

View File

@@ -115,6 +115,8 @@ namespace v2rayN.ViewModels
{ {
SaveRouting(); SaveRouting();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
} }
public void RefreshRulesItems() public void RefreshRulesItems()

View File

@@ -113,6 +113,8 @@ namespace v2rayN.ViewModels
{ {
SaveRouting(); SaveRouting();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
} }
#region locked #region locked

View File

@@ -41,6 +41,8 @@ namespace v2rayN.ViewModels
{ {
SaveSub(); SaveSub();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
} }
private void SaveSub() private void SaveSub()
{ {

View File

@@ -5,6 +5,7 @@ using ReactiveUI;
using ReactiveUI.Fody.Helpers; using ReactiveUI.Fody.Helpers;
using Splat; using Splat;
using System.Reactive; using System.Reactive;
using System.Windows;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Base; using v2rayN.Base;
using v2rayN.Handler; using v2rayN.Handler;
@@ -30,7 +31,7 @@ namespace v2rayN.ViewModels
public ReactiveCommand<Unit, Unit> SubShareCmd { get; } public ReactiveCommand<Unit, Unit> SubShareCmd { get; }
public bool IsModified { get; set; } public bool IsModified { get; set; }
public SubSettingViewModel() public SubSettingViewModel(Window view)
{ {
_config = LazyConfig.Instance.GetConfig(); _config = LazyConfig.Instance.GetConfig();
_noticeHandler = Locator.Current.GetService<NoticeHandler>(); _noticeHandler = Locator.Current.GetService<NoticeHandler>();
@@ -59,6 +60,8 @@ namespace v2rayN.ViewModels
{ {
SubShare(); SubShare();
}, canEditRemove); }, canEditRemove);
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
} }
public void RefreshSubItems() public void RefreshSubItems()

View File

@@ -49,6 +49,8 @@ namespace v2rayN.Views
txtGlobalHotkey4.KeyDown += TxtGlobalHotkey_KeyDown; txtGlobalHotkey4.KeyDown += TxtGlobalHotkey_KeyDown;
BindingData(-1); BindingData(-1);
Utils.SetDarkBorder(this, _config.uiItem.colorModeDark);
} }

View File

@@ -11,7 +11,7 @@ namespace v2rayN.Views
{ {
InitializeComponent(); InitializeComponent();
ViewModel = new SubSettingViewModel(); ViewModel = new SubSettingViewModel(this);
lstSubscription.MouseDoubleClick += LstSubscription_MouseDoubleClick; lstSubscription.MouseDoubleClick += LstSubscription_MouseDoubleClick;
this.WhenActivated(disposables => this.WhenActivated(disposables =>