[Update] Config Window: UI Theme Darkモード固定。設定項目からテーマ選択をできなくして、config.jsonを編集したとしても常にDarkモードに固定。※項目として残しているのは、Lightモード実装予定で開発中という事を見せたいため。
This commit is contained in:
15
view.py
15
view.py
@@ -16,7 +16,8 @@ from config import config
|
|||||||
class View():
|
class View():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.settings = SimpleNamespace()
|
self.settings = SimpleNamespace()
|
||||||
theme = get_appearance_mode() if config.APPEARANCE_THEME == "System" else config.APPEARANCE_THEME
|
# theme = get_appearance_mode() if config.APPEARANCE_THEME == "System" else config.APPEARANCE_THEME
|
||||||
|
theme = "Dark"
|
||||||
all_ctm = ColorThemeManager(theme)
|
all_ctm = ColorThemeManager(theme)
|
||||||
all_uism = UiScalingManager(config.UI_SCALING)
|
all_uism = UiScalingManager(config.UI_SCALING)
|
||||||
image_file = ImageFileManager(theme)
|
image_file = ImageFileManager(theme)
|
||||||
@@ -161,9 +162,11 @@ class View():
|
|||||||
|
|
||||||
VAR_LABEL_APPEARANCE_THEME=StringVar(value=i18n.t("config_window.appearance_theme.label")),
|
VAR_LABEL_APPEARANCE_THEME=StringVar(value=i18n.t("config_window.appearance_theme.label")),
|
||||||
VAR_DESC_APPEARANCE_THEME=StringVar(value=i18n.t("config_window.appearance_theme.desc")),
|
VAR_DESC_APPEARANCE_THEME=StringVar(value=i18n.t("config_window.appearance_theme.desc")),
|
||||||
LIST_APPEARANCE_THEME=["Light", "Dark", "System"],
|
LIST_APPEARANCE_THEME=["Dark"],
|
||||||
|
# LIST_APPEARANCE_THEME=["Light", "Dark", "System"],
|
||||||
CALLBACK_SET_APPEARANCE_THEME=None,
|
CALLBACK_SET_APPEARANCE_THEME=None,
|
||||||
VAR_APPEARANCE_THEME=StringVar(value=config.APPEARANCE_THEME),
|
VAR_APPEARANCE_THEME=StringVar(value="Dark"),
|
||||||
|
# VAR_APPEARANCE_THEME=StringVar(value=config.APPEARANCE_THEME),
|
||||||
|
|
||||||
VAR_LABEL_UI_SCALING=StringVar(value=i18n.t("config_window.ui_size.label")),
|
VAR_LABEL_UI_SCALING=StringVar(value=i18n.t("config_window.ui_size.label")),
|
||||||
VAR_DESC_UI_SCALING=None,
|
VAR_DESC_UI_SCALING=None,
|
||||||
@@ -450,6 +453,12 @@ class View():
|
|||||||
self.enableConfigWindowCompactMode()
|
self.enableConfigWindowCompactMode()
|
||||||
vrct_gui.config_window.setting_box_compact_mode_switch_box.select()
|
vrct_gui.config_window.setting_box_compact_mode_switch_box.select()
|
||||||
|
|
||||||
|
vrct_gui._changeConfigWindowWidgetsStatus(
|
||||||
|
status="disabled",
|
||||||
|
target_names=[
|
||||||
|
"sb__optionmenu_appearance_theme",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if config.CHOICE_MIC_HOST == "NoHost":
|
if config.CHOICE_MIC_HOST == "NoHost":
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, sta
|
|||||||
target_widget = config_window.sb__widgets["sb__optionmenu_speaker_device"]
|
target_widget = config_window.sb__widgets["sb__optionmenu_speaker_device"]
|
||||||
disableOptionmenuWidget(target_widget)
|
disableOptionmenuWidget(target_widget)
|
||||||
|
|
||||||
|
case "sb__optionmenu_appearance_theme":
|
||||||
|
if status == "disabled":
|
||||||
|
target_widget = config_window.sb__widgets["sb__optionmenu_appearance_theme"]
|
||||||
|
disableOptionmenuWidget(target_widget)
|
||||||
|
|
||||||
case _:
|
case _:
|
||||||
raise ValueError(f"No matching case for target_name: {target_name}")
|
raise ValueError(f"No matching case for target_name: {target_name}")
|
||||||
|
|||||||
Reference in New Issue
Block a user