pull/5087/head
2dust 2024-05-07 14:15:08 +08:00
parent c07c7ad82f
commit 4b9ddb803f
11 changed files with 11 additions and 10 deletions

View File

@ -56,7 +56,7 @@ namespace v2rayN.ViewModels
SaveServer(); SaveServer();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark); Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
} }
private void SaveServer() private void SaveServer()

View File

@ -44,7 +44,7 @@ namespace v2rayN.ViewModels
SaveServer(); SaveServer();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark); Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
} }
private void SaveServer() private void SaveServer()

View File

@ -56,7 +56,7 @@ namespace v2rayN.ViewModels
tunDNS2 = Utils.GetEmbedText(Global.TunSingboxDNSFileName); tunDNS2 = Utils.GetEmbedText(Global.TunSingboxDNSFileName);
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark); Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
} }
private void SaveSetting() private void SaveSetting()

View File

@ -196,7 +196,7 @@ namespace v2rayN.ViewModels
SaveSetting(); SaveSetting();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark); Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
} }
private void InitCoreType() private void InitCoreType()

View File

@ -62,7 +62,7 @@ namespace v2rayN.ViewModels
SaveRules(); SaveRules();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark); Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
} }
private void SaveRules() private void SaveRules()

View File

@ -115,7 +115,7 @@ namespace v2rayN.ViewModels
SaveRouting(); SaveRouting();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark); Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
} }
public void RefreshRulesItems() public void RefreshRulesItems()

View File

@ -126,7 +126,7 @@ namespace v2rayN.ViewModels
SaveRouting(); SaveRouting();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark); Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
} }
#region locked #region locked

View File

@ -40,7 +40,7 @@ namespace v2rayN.ViewModels
SaveSub(); SaveSub();
}); });
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark); Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
} }
private void SaveSub() private void SaveSub()

View File

@ -62,7 +62,7 @@ namespace v2rayN.ViewModels
SubShare(); SubShare();
}, canEditRemove); }, canEditRemove);
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark); Utils.SetDarkBorder(view, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
} }
public void RefreshSubItems() public void RefreshSubItems()

View File

@ -39,7 +39,7 @@ namespace v2rayN.Views
HotkeyHandler.Instance.IsPause = true; HotkeyHandler.Instance.IsPause = true;
this.Closing += (s, e) => HotkeyHandler.Instance.IsPause = false; this.Closing += (s, e) => HotkeyHandler.Instance.IsPause = false;
Utils.SetDarkBorder(this, _config.uiItem.colorModeDark); Utils.SetDarkBorder(this, _config.uiItem.followSystemTheme ? !Utils.IsLightTheme() : _config.uiItem.colorModeDark);
InitData(); InitData();
} }

View File

@ -15,6 +15,7 @@
Title="v2rayN" Title="v2rayN"
Width="900" Width="900"
Height="700" Height="700"
MinWidth="900"
x:TypeArguments="vms:MainWindowViewModel" x:TypeArguments="vms:MainWindowViewModel"
Background="{DynamicResource MaterialDesignPaper}" Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}" FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"