Skip to content

Commit 4b9ddb8

Browse files
committed
Bug fix
1 parent c07c7ad commit 4b9ddb8

11 files changed

+11
-10
lines changed

v2rayN/v2rayN/ViewModels/AddServer2ViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public AddServer2ViewModel(ProfileItem profileItem, Window view)
5656
SaveServer();
5757
});
5858

59-
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
59+
Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
6060
}
6161

6262
private void SaveServer()

v2rayN/v2rayN/ViewModels/AddServerViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public AddServerViewModel(ProfileItem profileItem, Window view)
4444
SaveServer();
4545
});
4646

47-
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
47+
Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
4848
}
4949

5050
private void SaveServer()

v2rayN/v2rayN/ViewModels/DNSSettingViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public DNSSettingViewModel(Window view)
5656
tunDNS2 = Utils.GetEmbedText(Global.TunSingboxDNSFileName);
5757
});
5858

59-
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
59+
Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
6060
}
6161

6262
private void SaveSetting()

v2rayN/v2rayN/ViewModels/OptionSettingViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public OptionSettingViewModel(Window view)
196196
SaveSetting();
197197
});
198198

199-
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
199+
Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
200200
}
201201

202202
private void InitCoreType()

v2rayN/v2rayN/ViewModels/RoutingRuleDetailsViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public RoutingRuleDetailsViewModel(RulesItem rulesItem, Window view)
6262
SaveRules();
6363
});
6464

65-
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
65+
Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
6666
}
6767

6868
private void SaveRules()

v2rayN/v2rayN/ViewModels/RoutingRuleSettingViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public RoutingRuleSettingViewModel(RoutingItem routingItem, Window view)
115115
SaveRouting();
116116
});
117117

118-
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
118+
Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
119119
}
120120

121121
public void RefreshRulesItems()

v2rayN/v2rayN/ViewModels/RoutingSettingViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public RoutingSettingViewModel(Window view)
126126
SaveRouting();
127127
});
128128

129-
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
129+
Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
130130
}
131131

132132
#region locked

v2rayN/v2rayN/ViewModels/SubEditViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public SubEditViewModel(SubItem subItem, Window view)
4040
SaveSub();
4141
});
4242

43-
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
43+
Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
4444
}
4545

4646
private void SaveSub()

v2rayN/v2rayN/ViewModels/SubSettingViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public SubSettingViewModel(Window view)
6262
SubShare();
6363
}, canEditRemove);
6464

65-
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
65+
Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
6666
}
6767

6868
public void RefreshSubItems()

v2rayN/v2rayN/Views/GlobalHotkeySettingWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public GlobalHotkeySettingWindow()
3939

4040
HotkeyHandler.Instance.IsPause = true;
4141
this.Closing += (s, e) => HotkeyHandler.Instance.IsPause = false;
42-
Utils.SetDarkBorder(this, _config.uiItem.colorModeDark);
42+
Utils.SetDarkBorder(this, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
4343
InitData();
4444
}
4545

v2rayN/v2rayN/Views/MainWindow.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
Title="v2rayN"
1616
Width="900"
1717
Height="700"
18+
MinWidth="900"
1819
x:TypeArguments="vms:MainWindowViewModel"
1920
Background="{DynamicResource MaterialDesignPaper}"
2021
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"

0 commit comments

Comments
 (0)