[Update] Config Window: デバイスが検出されなかった場合のdisabled表示一部実装(Mic Host, Mic Device, Speaker Deviceのオプションメニューのみ) そしてその関数の汎用化。
[Chore] Appearance Themeを開発中としてラベル編集。
This commit is contained in:
@@ -40,7 +40,7 @@ config_window:
|
|||||||
label: Transparency
|
label: Transparency
|
||||||
desc: Change the main window's transparency.
|
desc: Change the main window's transparency.
|
||||||
appearance_theme:
|
appearance_theme:
|
||||||
label: Theme
|
label: Theme [Under development]
|
||||||
desc: Change the color theme. If you selected "System", it will adjust based on your Windows theme.
|
desc: Change the color theme. If you selected "System", it will adjust based on your Windows theme.
|
||||||
ui_size:
|
ui_size:
|
||||||
label: UI Size
|
label: UI Size
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ config_window:
|
|||||||
label: 透明度
|
label: 透明度
|
||||||
desc: メイン画面の透明度を変更できます。
|
desc: メイン画面の透明度を変更できます。
|
||||||
appearance_theme:
|
appearance_theme:
|
||||||
label: 外観テーマ
|
label: 外観テーマ [開発中]
|
||||||
desc: カラーテーマを変更できます。「System」を選択した場合、Windowsのテーマに基づいて自動的に「Dark」か「Light」テーマを判断し、適用します。
|
desc: カラーテーマを変更できます。「System」を選択した場合、Windowsのテーマに基づいて自動的に「Dark」か「Light」テーマを判断し、適用します。
|
||||||
ui_size:
|
ui_size:
|
||||||
label: UIのサイズ
|
label: UIのサイズ
|
||||||
|
|||||||
20
view.py
20
view.py
@@ -447,6 +447,26 @@ 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()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if config.CHOICE_MIC_HOST == "NoHost" or config.CHOICE_MIC_DEVICE == "NoDevice":
|
||||||
|
vrct_gui._changeConfigWindowWidgetsStatus(
|
||||||
|
status="disabled",
|
||||||
|
target_names=[
|
||||||
|
"sb__optionmenu_mic_host",
|
||||||
|
"sb__optionmenu_mic_device",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if config.CHOICE_SPEAKER_DEVICE == "NoDevice":
|
||||||
|
vrct_gui._changeConfigWindowWidgetsStatus(
|
||||||
|
status="disabled",
|
||||||
|
target_names=[
|
||||||
|
"sb__optionmenu_speaker_device",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Insert sample conversation for testing.
|
# Insert sample conversation for testing.
|
||||||
# self._insertSampleConversationToTextbox()
|
# self._insertSampleConversationToTextbox()
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,16 @@ def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, sta
|
|||||||
target_names = ["mic_energy_threshold_check_button", "speaker_energy_threshold_check_button"]
|
target_names = ["mic_energy_threshold_check_button", "speaker_energy_threshold_check_button"]
|
||||||
|
|
||||||
|
|
||||||
|
def disableOptionmenuWidget(target_widget):
|
||||||
|
target_widget.label_widget.configure(text_color=settings.ctm.LABELS_TEXT_DISABLED_COLOR)
|
||||||
|
if target_widget.desc_widget is not None:
|
||||||
|
target_widget.desc_widget.configure(text_color=settings.ctm.LABELS_TEXT_DISABLED_COLOR)
|
||||||
|
target_widget.optionmenu_label_widget.configure(text_color=settings.ctm.LABELS_TEXT_DISABLED_COLOR)
|
||||||
|
target_widget.optionmenu_img_widget.configure(image=CTkImage(settings.image_file.ARROW_LEFT_DISABLED.rotate(90), size=settings.uism.SB__OPTIONMENU_IMG_SIZE))
|
||||||
|
target_widget.optionmenu_box.unbindFunction()
|
||||||
|
target_widget.optionmenu_box.configure(cursor="")
|
||||||
|
|
||||||
|
|
||||||
for target_name in target_names:
|
for target_name in target_names:
|
||||||
match target_name:
|
match target_name:
|
||||||
case "mic_energy_threshold_check_button":
|
case "mic_energy_threshold_check_button":
|
||||||
@@ -26,6 +36,22 @@ def _changeConfigWindowWidgetsStatus(config_window, settings, view_variable, sta
|
|||||||
config_window.sb__progressbar_x_slider__passive_button_speaker_energy_threshold.children["!ctklabel"].configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR)
|
config_window.sb__progressbar_x_slider__passive_button_speaker_energy_threshold.children["!ctklabel"].configure(fg_color=settings.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR)
|
||||||
|
|
||||||
|
|
||||||
|
case "sb__optionmenu_mic_host":
|
||||||
|
if status == "disabled":
|
||||||
|
target_widget = config_window.sb__widgets["sb__optionmenu_mic_host"]
|
||||||
|
disableOptionmenuWidget(target_widget)
|
||||||
|
|
||||||
|
case "sb__optionmenu_mic_device":
|
||||||
|
if status == "disabled":
|
||||||
|
target_widget = config_window.sb__widgets["sb__optionmenu_mic_device"]
|
||||||
|
disableOptionmenuWidget(target_widget)
|
||||||
|
|
||||||
|
case "sb__optionmenu_speaker_device":
|
||||||
|
if status == "disabled":
|
||||||
|
target_widget = config_window.sb__widgets["sb__optionmenu_speaker_device"]
|
||||||
|
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}")
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class ConfigWindow(CTkToplevel):
|
|||||||
# When the configuration window's compact mode is turned on, it will call `grid_remove()` on each widget appended to this array. In the opposite case, `grid()` will be called.
|
# When the configuration window's compact mode is turned on, it will call `grid_remove()` on each widget appended to this array. In the opposite case, `grid()` will be called.
|
||||||
self.additional_widgets = []
|
self.additional_widgets = []
|
||||||
|
|
||||||
|
self.sb__widgets = {}
|
||||||
|
|
||||||
createConfigWindowTitle(config_window=self, settings=self.settings, view_variable=self._view_variable)
|
createConfigWindowTitle(config_window=self, settings=self.settings, view_variable=self._view_variable)
|
||||||
|
|
||||||
createSettingBoxTopBar(config_window=self, settings=self.settings, view_variable=self._view_variable)
|
createSettingBoxTopBar(config_window=self, settings=self.settings, view_variable=self._view_variable)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
|
from types import SimpleNamespace
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from customtkinter import CTkOptionMenu, CTkFont, CTkFrame, CTkLabel, CTkRadioButton, CTkEntry, CTkSlider, CTkSwitch, CTkCheckBox, CTkProgressBar
|
from customtkinter import CTkOptionMenu, CTkFont, CTkFrame, CTkLabel, CTkRadioButton, CTkEntry, CTkSlider, CTkSwitch, CTkCheckBox, CTkProgressBar
|
||||||
@@ -17,7 +18,9 @@ class _SettingBoxGenerator():
|
|||||||
|
|
||||||
self.dropdown_menu_window = vrct_gui.vrct_gui.dropdown_menu_window
|
self.dropdown_menu_window = vrct_gui.vrct_gui.dropdown_menu_window
|
||||||
|
|
||||||
def _createSettingBoxFrame(self, for_var_label_text, for_var_desc_text):
|
def _createSettingBoxFrame(self, sb__attr_name, for_var_label_text, for_var_desc_text):
|
||||||
|
self.config_window.sb__widgets[sb__attr_name] = SimpleNamespace()
|
||||||
|
|
||||||
setting_box_frame = CTkFrame(self.parent_widget, corner_radius=0, fg_color=self.settings.ctm.SB__BG_COLOR, width=0, height=0)
|
setting_box_frame = CTkFrame(self.parent_widget, corner_radius=0, fg_color=self.settings.ctm.SB__BG_COLOR, width=0, height=0)
|
||||||
|
|
||||||
# "pady=(0,1)" is for bottom padding. It can be removed(override) when you do like "self.attr_name.grid(row=row, pady=0)"
|
# "pady=(0,1)" is for bottom padding. It can be removed(override) when you do like "self.attr_name.grid(row=row, pady=0)"
|
||||||
@@ -36,7 +39,7 @@ class _SettingBoxGenerator():
|
|||||||
setting_box_frame_wrapper_fix_border2 = CTkFrame(setting_box_frame, corner_radius=0, width=0, height=0)
|
setting_box_frame_wrapper_fix_border2 = CTkFrame(setting_box_frame, corner_radius=0, width=0, height=0)
|
||||||
setting_box_frame_wrapper_fix_border2.grid(row=0, column=1, sticky="ns")
|
setting_box_frame_wrapper_fix_border2.grid(row=0, column=1, sticky="ns")
|
||||||
|
|
||||||
self._setSettingBoxLabels(setting_box_frame_wrapper, for_var_label_text, for_var_desc_text)
|
self._setSettingBoxLabels(sb__attr_name, setting_box_frame_wrapper, for_var_label_text, for_var_desc_text)
|
||||||
|
|
||||||
setting_box_item_frame = CTkFrame(setting_box_frame_wrapper, corner_radius=0, width=0, height=0, fg_color=self.settings.ctm.SB__BG_COLOR)
|
setting_box_item_frame = CTkFrame(setting_box_frame_wrapper, corner_radius=0, width=0, height=0, fg_color=self.settings.ctm.SB__BG_COLOR)
|
||||||
setting_box_item_frame.grid(row=0, column=2, padx=0, sticky="nsew")
|
setting_box_item_frame.grid(row=0, column=2, padx=0, sticky="nsew")
|
||||||
@@ -45,7 +48,7 @@ class _SettingBoxGenerator():
|
|||||||
|
|
||||||
return (setting_box_frame, setting_box_item_frame)
|
return (setting_box_frame, setting_box_item_frame)
|
||||||
|
|
||||||
def _setSettingBoxLabels(self, setting_box_frame_wrapper, for_var_label_text, for_var_desc_text=None):
|
def _setSettingBoxLabels(self, sb__attr_name, setting_box_frame_wrapper, for_var_label_text, for_var_desc_text=None):
|
||||||
|
|
||||||
setting_box_labels_frame = CTkFrame(setting_box_frame_wrapper, corner_radius=0, fg_color=self.settings.ctm.SB__BG_COLOR, width=0, height=0)
|
setting_box_labels_frame = CTkFrame(setting_box_frame_wrapper, corner_radius=0, fg_color=self.settings.ctm.SB__BG_COLOR, width=0, height=0)
|
||||||
setting_box_labels_frame.grid(row=0, column=0, padx=0, pady=0, sticky="nsew")
|
setting_box_labels_frame.grid(row=0, column=0, padx=0, pady=0, sticky="nsew")
|
||||||
@@ -59,6 +62,8 @@ class _SettingBoxGenerator():
|
|||||||
text_color=self.settings.ctm.LABELS_TEXT_COLOR
|
text_color=self.settings.ctm.LABELS_TEXT_COLOR
|
||||||
)
|
)
|
||||||
setting_box_label.grid(row=0, column=0, padx=0, pady=0, sticky="ew")
|
setting_box_label.grid(row=0, column=0, padx=0, pady=0, sticky="ew")
|
||||||
|
self.config_window.sb__widgets[sb__attr_name].label_widget = setting_box_label
|
||||||
|
|
||||||
|
|
||||||
if for_var_desc_text is not None:
|
if for_var_desc_text is not None:
|
||||||
setting_box_desc = CTkLabel(
|
setting_box_desc = CTkLabel(
|
||||||
@@ -73,17 +78,22 @@ class _SettingBoxGenerator():
|
|||||||
)
|
)
|
||||||
setting_box_desc.grid(row=1, column=0, padx=0, pady=(self.settings.uism.SB__DESC_TOP_PADY,0), sticky="ew")
|
setting_box_desc.grid(row=1, column=0, padx=0, pady=(self.settings.uism.SB__DESC_TOP_PADY,0), sticky="ew")
|
||||||
self.config_window.additional_widgets.append(setting_box_desc)
|
self.config_window.additional_widgets.append(setting_box_desc)
|
||||||
|
self.config_window.sb__widgets[sb__attr_name].desc_widget=setting_box_desc
|
||||||
|
else:
|
||||||
|
self.config_window.sb__widgets[sb__attr_name].desc_widget=None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def createSettingBoxDropdownMenu(self, for_var_label_text, for_var_desc_text, optionmenu_attr_name, command, dropdown_menu_width=None, variable=None, dropdown_menu_values=None):
|
def createSettingBoxDropdownMenu(self, for_var_label_text, for_var_desc_text, optionmenu_attr_name, command, dropdown_menu_width=None, variable=None, dropdown_menu_values=None):
|
||||||
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(for_var_label_text, for_var_desc_text)
|
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(optionmenu_attr_name, for_var_label_text, for_var_desc_text)
|
||||||
|
|
||||||
def adjustedCommand(value):
|
def adjustedCommand(value):
|
||||||
variable.set(value)
|
variable.set(value)
|
||||||
command(value)
|
command(value)
|
||||||
|
|
||||||
|
|
||||||
option_menu_widget = createOptionMenuBox(
|
(option_menu_widget, optionmenu_label_widget, optionmenu_img_widget) = createOptionMenuBox(
|
||||||
parent_widget=setting_box_item_frame,
|
parent_widget=setting_box_item_frame,
|
||||||
optionmenu_bg_color=self.settings.ctm.SB__OPTIONMENU_BG_COLOR,
|
optionmenu_bg_color=self.settings.ctm.SB__OPTIONMENU_BG_COLOR,
|
||||||
optionmenu_hovered_bg_color=self.settings.ctm.SB__OPTIONMENU_HOVERED_BG_COLOR,
|
optionmenu_hovered_bg_color=self.settings.ctm.SB__OPTIONMENU_HOVERED_BG_COLOR,
|
||||||
@@ -104,6 +114,12 @@ class _SettingBoxGenerator():
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
self.config_window.sb__widgets[optionmenu_attr_name].optionmenu_box = option_menu_widget
|
||||||
|
self.config_window.sb__widgets[optionmenu_attr_name].optionmenu_label_widget = optionmenu_label_widget
|
||||||
|
self.config_window.sb__widgets[optionmenu_attr_name].optionmenu_img_widget = optionmenu_img_widget
|
||||||
|
|
||||||
|
|
||||||
option_menu_widget.grid(row=1, column=SETTING_BOX_COLUMN, sticky="e")
|
option_menu_widget.grid(row=1, column=SETTING_BOX_COLUMN, sticky="e")
|
||||||
setattr(self.config_window, optionmenu_attr_name, option_menu_widget)
|
setattr(self.config_window, optionmenu_attr_name, option_menu_widget)
|
||||||
|
|
||||||
@@ -122,7 +138,7 @@ class _SettingBoxGenerator():
|
|||||||
|
|
||||||
|
|
||||||
def createSettingBoxSwitch(self, for_var_label_text, for_var_desc_text, switch_attr_name, is_checked, command):
|
def createSettingBoxSwitch(self, for_var_label_text, for_var_desc_text, switch_attr_name, is_checked, command):
|
||||||
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(for_var_label_text, for_var_desc_text)
|
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(switch_attr_name, for_var_label_text, for_var_desc_text)
|
||||||
|
|
||||||
switch_widget = CTkSwitch(
|
switch_widget = CTkSwitch(
|
||||||
setting_box_item_frame,
|
setting_box_item_frame,
|
||||||
@@ -151,7 +167,7 @@ class _SettingBoxGenerator():
|
|||||||
|
|
||||||
|
|
||||||
def createSettingBoxCheckbox(self, for_var_label_text, for_var_desc_text, checkbox_attr_name, variable, command):
|
def createSettingBoxCheckbox(self, for_var_label_text, for_var_desc_text, checkbox_attr_name, variable, command):
|
||||||
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(for_var_label_text, for_var_desc_text)
|
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(checkbox_attr_name, for_var_label_text, for_var_desc_text)
|
||||||
|
|
||||||
checkbox_widget = CTkCheckBox(
|
checkbox_widget = CTkCheckBox(
|
||||||
setting_box_item_frame,
|
setting_box_item_frame,
|
||||||
@@ -185,7 +201,7 @@ class _SettingBoxGenerator():
|
|||||||
|
|
||||||
|
|
||||||
def createSettingBoxSlider(self, for_var_label_text, for_var_desc_text, slider_attr_name, slider_range, command, variable, slider_number_of_steps: Union[int, None] = None):
|
def createSettingBoxSlider(self, for_var_label_text, for_var_desc_text, slider_attr_name, slider_range, command, variable, slider_number_of_steps: Union[int, None] = None):
|
||||||
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(for_var_label_text, for_var_desc_text)
|
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(slider_attr_name, for_var_label_text, for_var_desc_text)
|
||||||
|
|
||||||
# print(self.settings.uism.SB__SLIDER_WIDTH)
|
# print(self.settings.uism.SB__SLIDER_WIDTH)
|
||||||
# print(self.settings.uism.SB__SLIDER_HEIGHT)
|
# print(self.settings.uism.SB__SLIDER_HEIGHT)
|
||||||
@@ -212,7 +228,7 @@ class _SettingBoxGenerator():
|
|||||||
|
|
||||||
def createSettingBoxProgressbarXSlider(
|
def createSettingBoxProgressbarXSlider(
|
||||||
self,
|
self,
|
||||||
for_var_label_text, for_var_desc_text, command,
|
for_var_label_text, for_var_desc_text, command, progressbar_x_slider_attr_name,
|
||||||
entry_attr_name, entry_bind__FocusOut,
|
entry_attr_name, entry_bind__FocusOut,
|
||||||
slider_attr_name, slider_range,
|
slider_attr_name, slider_range,
|
||||||
progressbar_attr_name,
|
progressbar_attr_name,
|
||||||
@@ -227,7 +243,7 @@ class _SettingBoxGenerator():
|
|||||||
):
|
):
|
||||||
|
|
||||||
|
|
||||||
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(for_var_label_text, for_var_desc_text)
|
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(progressbar_x_slider_attr_name, for_var_label_text, for_var_desc_text)
|
||||||
|
|
||||||
ENTRY_WIDTH = self.settings.uism.SB__PROGRESSBAR_X_SLIDER__ENTRY_WIDTH
|
ENTRY_WIDTH = self.settings.uism.SB__PROGRESSBAR_X_SLIDER__ENTRY_WIDTH
|
||||||
BAR_WIDTH = self.settings.uism.SB__PROGRESSBAR_X_SLIDER__BAR_WIDTH
|
BAR_WIDTH = self.settings.uism.SB__PROGRESSBAR_X_SLIDER__BAR_WIDTH
|
||||||
@@ -320,7 +336,7 @@ class _SettingBoxGenerator():
|
|||||||
|
|
||||||
|
|
||||||
def createSettingBoxEntry(self, for_var_label_text, for_var_desc_text, entry_attr_name, entry_width, entry_bind__Any_KeyRelease, entry_textvariable, entry_bind__FocusOut=None):
|
def createSettingBoxEntry(self, for_var_label_text, for_var_desc_text, entry_attr_name, entry_width, entry_bind__Any_KeyRelease, entry_textvariable, entry_bind__FocusOut=None):
|
||||||
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(for_var_label_text, for_var_desc_text)
|
(setting_box_frame, setting_box_item_frame) = self._createSettingBoxFrame(entry_attr_name, for_var_label_text, for_var_desc_text)
|
||||||
|
|
||||||
def adjusted_command__for_entry_bind__Any_KeyRelease(e):
|
def adjusted_command__for_entry_bind__Any_KeyRelease(e):
|
||||||
entry_bind__Any_KeyRelease(e.widget.get())
|
entry_bind__Any_KeyRelease(e.widget.get())
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ def createSettingBox_Mic(setting_box_wrapper, config_window, settings, view_vari
|
|||||||
for_var_label_text=view_variable.VAR_LABEL_MIC_ENERGY_THRESHOLD,
|
for_var_label_text=view_variable.VAR_LABEL_MIC_ENERGY_THRESHOLD,
|
||||||
for_var_desc_text=view_variable.VAR_DESC_MIC_ENERGY_THRESHOLD,
|
for_var_desc_text=view_variable.VAR_DESC_MIC_ENERGY_THRESHOLD,
|
||||||
command=slider_input_mic_energy_threshold_callback,
|
command=slider_input_mic_energy_threshold_callback,
|
||||||
|
progressbar_x_slider_attr_name="sb__mic_energy_threshold",
|
||||||
|
|
||||||
entry_attr_name="sb__progressbar_x_slider__entry_mic_energy_threshold",
|
entry_attr_name="sb__progressbar_x_slider__entry_mic_energy_threshold",
|
||||||
entry_variable=view_variable.VAR_MIC_ENERGY_THRESHOLD__ENTRY,
|
entry_variable=view_variable.VAR_MIC_ENERGY_THRESHOLD__ENTRY,
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_
|
|||||||
for_var_label_text=view_variable.VAR_LABEL_SPEAKER_ENERGY_THRESHOLD,
|
for_var_label_text=view_variable.VAR_LABEL_SPEAKER_ENERGY_THRESHOLD,
|
||||||
for_var_desc_text=view_variable.VAR_DESC_SPEAKER_ENERGY_THRESHOLD,
|
for_var_desc_text=view_variable.VAR_DESC_SPEAKER_ENERGY_THRESHOLD,
|
||||||
command=slider_input_speaker_energy_threshold_callback,
|
command=slider_input_speaker_energy_threshold_callback,
|
||||||
|
progressbar_x_slider_attr_name="sb__speaker_energy_threshold",
|
||||||
|
|
||||||
entry_variable=view_variable.VAR_SPEAKER_ENERGY_THRESHOLD__ENTRY,
|
entry_variable=view_variable.VAR_SPEAKER_ENERGY_THRESHOLD__ENTRY,
|
||||||
entry_attr_name="sb__progressbar_x_slider__entry_speaker_energy_threshold",
|
entry_attr_name="sb__progressbar_x_slider__entry_speaker_energy_threshold",
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ def createSidebarLanguagesSettings(settings, main_window, view_variable):
|
|||||||
sls__box_optionmenu_wrapper.grid(row=1, column=0, sticky="ew")
|
sls__box_optionmenu_wrapper.grid(row=1, column=0, sticky="ew")
|
||||||
|
|
||||||
sls__box_optionmenu_wrapper.grid_columnconfigure(0, weight=1)
|
sls__box_optionmenu_wrapper.grid_columnconfigure(0, weight=1)
|
||||||
sls__selected_language_box = createOptionMenuBox(
|
(sls__selected_language_box, optionmenu_label_widget, optionmenu_img_widget) = createOptionMenuBox(
|
||||||
parent_widget=sls__box_optionmenu_wrapper,
|
parent_widget=sls__box_optionmenu_wrapper,
|
||||||
optionmenu_bg_color=settings.ctm.SLS__OPTIONMENU_BG_COLOR,
|
optionmenu_bg_color=settings.ctm.SLS__OPTIONMENU_BG_COLOR,
|
||||||
optionmenu_hovered_bg_color=settings.ctm.SLS__OPTIONMENU_HOVERED_BG_COLOR,
|
optionmenu_hovered_bg_color=settings.ctm.SLS__OPTIONMENU_HOVERED_BG_COLOR,
|
||||||
|
|||||||
@@ -220,6 +220,8 @@ class ColorThemeManager():
|
|||||||
self.config_window.LABELS_TEXT_COLOR = self.config_window.BASIC_TEXT_COLOR
|
self.config_window.LABELS_TEXT_COLOR = self.config_window.BASIC_TEXT_COLOR
|
||||||
self.config_window.LABELS_DESC_TEXT_COLOR = self.DARK_500_COLOR
|
self.config_window.LABELS_DESC_TEXT_COLOR = self.DARK_500_COLOR
|
||||||
|
|
||||||
|
self.config_window.LABELS_TEXT_DISABLED_COLOR = self.DARK_600_COLOR
|
||||||
|
|
||||||
|
|
||||||
# Top bar
|
# Top bar
|
||||||
self.config_window.TOP_BAR_BG_COLOR = self.DARK_850_COLOR
|
self.config_window.TOP_BAR_BG_COLOR = self.DARK_850_COLOR
|
||||||
|
|||||||
@@ -78,6 +78,11 @@ def bindButtonFunctionAndColor(target_widgets, enter_color, leave_color, clicked
|
|||||||
bindButtonPressColor(target_widgets, clicked_color, enter_color)
|
bindButtonPressColor(target_widgets, clicked_color, enter_color)
|
||||||
bindButtonReleaseFunction(target_widgets, buttonReleasedFunction)
|
bindButtonReleaseFunction(target_widgets, buttonReleasedFunction)
|
||||||
|
|
||||||
|
def unbindEnterLEaveButtonPressButtonReleaseFunction(target_widgets):
|
||||||
|
for target_widget in target_widgets:
|
||||||
|
for event_name in ["<Enter>", "<Leave>", "<ButtonPress>", "<ButtonRelease>"]:
|
||||||
|
target_widget.unbind(event_name)
|
||||||
|
|
||||||
def unbindEventFromActiveTabWidget(active_tab_widget):
|
def unbindEventFromActiveTabWidget(active_tab_widget):
|
||||||
for event_name in ["<Enter>", "<Leave>", "<ButtonPress>", "<ButtonRelease>"]:
|
for event_name in ["<Enter>", "<Leave>", "<ButtonPress>", "<ButtonRelease>"]:
|
||||||
active_tab_widget.unbind(event_name)
|
active_tab_widget.unbind(event_name)
|
||||||
@@ -192,7 +197,13 @@ def createOptionMenuBox(parent_widget, optionmenu_bg_color, optionmenu_hovered_b
|
|||||||
|
|
||||||
bindButtonReleaseFunction([optionmenu_label_wrapper, option_menu_box, optionmenu_label_widget, optionmenu_img_widget], optionmenu_clicked_command)
|
bindButtonReleaseFunction([optionmenu_label_wrapper, option_menu_box, optionmenu_label_widget, optionmenu_img_widget], optionmenu_clicked_command)
|
||||||
|
|
||||||
return option_menu_box
|
def unbindEventFromWidgets():
|
||||||
|
unbindEnterLEaveButtonPressButtonReleaseFunction([optionmenu_label_wrapper, option_menu_box, optionmenu_label_widget, optionmenu_img_widget])
|
||||||
|
|
||||||
|
option_menu_box.unbindFunction = unbindEventFromWidgets
|
||||||
|
|
||||||
|
|
||||||
|
return (option_menu_box, optionmenu_label_widget, optionmenu_img_widget)
|
||||||
|
|
||||||
|
|
||||||
def applyUiScalingAndFixTheBugScrollBar(scrollbar_widget, padx, width):
|
def applyUiScalingAndFixTheBugScrollBar(scrollbar_widget, padx, width):
|
||||||
|
|||||||
Reference in New Issue
Block a user