The first letter of the guiconfig attribute must be capitalized.

This commit is contained in:
2dust
2024-10-23 10:42:35 +08:00
parent 1e7284f141
commit 2d143687b8
51 changed files with 694 additions and 705 deletions

View File

@@ -28,21 +28,21 @@ namespace v2rayN.Desktop.ViewModels
private void RestoreUI()
{
ModifyTheme(_config.uiItem.colorModeDark);
ModifyTheme(_config.UiItem.ColorModeDark);
}
private void BindingUI()
{
ColorModeDark = _config.uiItem.colorModeDark;
CurrentFontSize = _config.uiItem.currentFontSize;
CurrentLanguage = _config.uiItem.currentLanguage;
ColorModeDark = _config.UiItem.ColorModeDark;
CurrentFontSize = _config.UiItem.CurrentFontSize;
CurrentLanguage = _config.UiItem.CurrentLanguage;
this.WhenAnyValue(x => x.ColorModeDark)
.Subscribe(c =>
{
if (_config.uiItem.colorModeDark != ColorModeDark)
if (_config.UiItem.ColorModeDark != ColorModeDark)
{
_config.uiItem.colorModeDark = ColorModeDark;
_config.UiItem.ColorModeDark = ColorModeDark;
ModifyTheme(ColorModeDark);
ConfigHandler.SaveConfig(_config);
}
@@ -55,7 +55,7 @@ namespace v2rayN.Desktop.ViewModels
{
if (CurrentFontSize >= Global.MinFontSize)
{
_config.uiItem.currentFontSize = CurrentFontSize;
_config.UiItem.CurrentFontSize = CurrentFontSize;
double size = CurrentFontSize;
ModifyFontSize(size);
@@ -68,9 +68,9 @@ namespace v2rayN.Desktop.ViewModels
y => y != null && !y.IsNullOrEmpty())
.Subscribe(c =>
{
if (Utils.IsNotEmpty(CurrentLanguage) && _config.uiItem.currentLanguage != CurrentLanguage)
if (Utils.IsNotEmpty(CurrentLanguage) && _config.UiItem.CurrentLanguage != CurrentLanguage)
{
_config.uiItem.currentLanguage = CurrentLanguage;
_config.UiItem.CurrentLanguage = CurrentLanguage;
Thread.CurrentThread.CurrentUICulture = new(CurrentLanguage);
ConfigHandler.SaveConfig(_config);
NoticeHandler.Instance.Enqueue(ResUI.NeedRebootTips);