[Update] Config Window: Dropdown Menu Window. Width指定。フォントやデバイスなどテキストが長くなるものは幅を広めに。(可変は難しいので今は指定型に)

This commit is contained in:
Sakamoto Shiina
2023-10-08 20:03:55 +09:00
parent 39472e64c4
commit 95758919bd
5 changed files with 31 additions and 9 deletions

View File

@@ -82,7 +82,7 @@ class _SettingBoxGenerator():
self.config_window.additional_widgets.append(setting_box_desc)
def createSettingBoxDropdownMenu(self, for_var_label_text, for_var_desc_text, optionmenu_attr_name, command, 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)
def adjustedCommand(value):
@@ -94,6 +94,7 @@ class _SettingBoxGenerator():
dropdown_menu_values=dropdown_menu_values,
command=adjustedCommand,
wrapper_widget=self.config_window.main_bg_container,
dropdown_menu_width=dropdown_menu_width,
)
option_menu_widget = createOptionMenuBox(

View File

@@ -68,6 +68,7 @@ def createSettingBox_Appearance(setting_box_wrapper, config_window, settings, vi
for_var_desc_text=view_variable.VAR_DESC_FONT_FAMILY,
optionmenu_attr_name="sb__optionmenu_font_family",
dropdown_menu_values=view_variable.LIST_FONT_FAMILY,
dropdown_menu_width=settings.uism.RESPONSIVE_UI_SIZE_INT_300,
command=lambda value: optionmenu_font_family_callback(value),
variable=view_variable.VAR_FONT_FAMILY,
)

View File

@@ -58,6 +58,7 @@ def createSettingBox_Mic(setting_box_wrapper, config_window, settings, view_vari
for_var_desc_text=view_variable.VAR_DESC_MIC_DEVICE,
optionmenu_attr_name="sb__optionmenu_mic_device",
dropdown_menu_values=view_variable.LIST_MIC_DEVICE,
dropdown_menu_width=settings.uism.RESPONSIVE_UI_SIZE_INT_300,
command=lambda value: optionmenu_input_mic_device_callback(value),
variable=view_variable.VAR_MIC_DEVICE,
)

View File

@@ -41,6 +41,7 @@ def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_
for_var_desc_text=view_variable.VAR_DESC_SPEAKER_DEVICE,
optionmenu_attr_name="sb__optionmenu_speaker_device",
dropdown_menu_values=view_variable.LIST_SPEAKER_DEVICE,
dropdown_menu_width=settings.uism.RESPONSIVE_UI_SIZE_INT_300,
command=lambda value: optionmenu_input_speaker_device_callback(value),
variable=view_variable.VAR_SPEAKER_DEVICE,
)