[Refactor] IS_CONFIG_WINDOW_COMPACT_MODE をview_variableへ移動。
This commit is contained in:
@@ -5,9 +5,8 @@ from vrct_gui.ui_utils import createButtonWithImage
|
||||
from typing import Union
|
||||
|
||||
class _SettingBoxGenerator():
|
||||
def __init__(self, parent_widget, config_window, settings):
|
||||
|
||||
self.IS_CONFIG_WINDOW_COMPACT_MODE = settings.IS_CONFIG_WINDOW_COMPACT_MODE
|
||||
def __init__(self, parent_widget, config_window, settings, view_variable):
|
||||
self.view_variable = view_variable
|
||||
self.config_window = config_window
|
||||
self.parent_widget = parent_widget
|
||||
self.settings = settings
|
||||
@@ -50,7 +49,7 @@ class _SettingBoxGenerator():
|
||||
)
|
||||
setting_box_label.grid(row=0, column=0, padx=0, pady=0, sticky="ew")
|
||||
|
||||
if for_var_desc_text == None or self.IS_CONFIG_WINDOW_COMPACT_MODE is True:
|
||||
if for_var_desc_text == None or self.view_variable.IS_CONFIG_WINDOW_COMPACT_MODE is True:
|
||||
pass
|
||||
else:
|
||||
self.setting_box_desc = CTkLabel(
|
||||
|
||||
@@ -3,7 +3,7 @@ from utils import callFunctionIfCallable
|
||||
from .._SettingBoxGenerator import _SettingBoxGenerator
|
||||
|
||||
def createSettingBox_AdvancedSettings(setting_box_wrapper, config_window, settings, view_variable):
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings)
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable)
|
||||
createSettingBoxEntry = sbg.createSettingBoxEntry
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from utils import callFunctionIfCallable
|
||||
from .._SettingBoxGenerator import _SettingBoxGenerator
|
||||
|
||||
def createSettingBox_Appearance(setting_box_wrapper, config_window, settings, view_variable):
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings)
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable)
|
||||
createSettingBoxDropdownMenu = sbg.createSettingBoxDropdownMenu
|
||||
createSettingBoxSlider = sbg.createSettingBoxSlider
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from utils import callFunctionIfCallable
|
||||
from .._SettingBoxGenerator import _SettingBoxGenerator
|
||||
|
||||
def createSettingBox_Others(setting_box_wrapper, config_window, settings, view_variable):
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings)
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable)
|
||||
createSettingBoxCheckbox = sbg.createSettingBoxCheckbox
|
||||
createSettingBoxEntry = sbg.createSettingBoxEntry
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from utils import callFunctionIfCallable
|
||||
from .._SettingBoxGenerator import _SettingBoxGenerator
|
||||
|
||||
def createSettingBox_Mic(setting_box_wrapper, config_window, settings, view_variable):
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings)
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable)
|
||||
createSettingBoxDropdownMenu = sbg.createSettingBoxDropdownMenu
|
||||
createSettingBoxCheckbox = sbg.createSettingBoxCheckbox
|
||||
createSettingBoxProgressbarXSlider = sbg.createSettingBoxProgressbarXSlider
|
||||
|
||||
@@ -3,7 +3,7 @@ from utils import callFunctionIfCallable
|
||||
from .._SettingBoxGenerator import _SettingBoxGenerator
|
||||
|
||||
def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_variable):
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings)
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable)
|
||||
createSettingBoxDropdownMenu = sbg.createSettingBoxDropdownMenu
|
||||
createSettingBoxCheckbox = sbg.createSettingBoxCheckbox
|
||||
createSettingBoxProgressbarXSlider = sbg.createSettingBoxProgressbarXSlider
|
||||
|
||||
@@ -3,7 +3,7 @@ from utils import callFunctionIfCallable
|
||||
from .._SettingBoxGenerator import _SettingBoxGenerator
|
||||
|
||||
def createSettingBox_Translation(setting_box_wrapper, config_window, settings, view_variable):
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings)
|
||||
sbg = _SettingBoxGenerator(setting_box_wrapper, config_window, settings, view_variable)
|
||||
createSettingBoxEntry = sbg.createSettingBoxEntry
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user