[bugfix] getImageFileFromUiUtilsなどimage file取得をimageFileManager(元imageFilenameManager)にて一括で行うように。

UIに入れる時はファイル名ではなくファイルそのもの
This commit is contained in:
Sakamoto Shiina
2023-09-05 01:53:49 +09:00
parent e1466efc51
commit 670a651e57
15 changed files with 110 additions and 108 deletions

View File

@@ -185,7 +185,7 @@ class _SettingBoxGenerator():
progressbar_attr_name,
passive_button_attr_name, passive_button_command,
active_button_attr_name, active_button_command,
button_image_filename,
button_image_file,
variable,
slider_number_of_steps: Union[int, None] = None,
@@ -276,10 +276,10 @@ class _SettingBoxGenerator():
passive_button_wrapper = self._createPassiveButtonForProgressbarXSlider(setting_box_progressbar_x_slider_frame, BUTTON_PADDING, passive_button_command, button_image_filename)
passive_button_wrapper = self._createPassiveButtonForProgressbarXSlider(setting_box_progressbar_x_slider_frame, BUTTON_PADDING, passive_button_command, button_image_file)
setattr(self.config_window, passive_button_attr_name, passive_button_wrapper)
active_button_wrapper = self._createActiveButtonForProgressbarXSlider(setting_box_progressbar_x_slider_frame, BUTTON_PADDING, active_button_command, button_image_filename)
active_button_wrapper = self._createActiveButtonForProgressbarXSlider(setting_box_progressbar_x_slider_frame, BUTTON_PADDING, active_button_command, button_image_file)
setattr(self.config_window, active_button_attr_name, active_button_wrapper)
passive_button_wrapper.grid()
@@ -467,13 +467,13 @@ class _SettingBoxGenerator():
def _createPassiveButtonForProgressbarXSlider(self, setting_box_progressbar_x_slider_frame, BUTTON_PADDING, button_command, button_image_filename):
def _createPassiveButtonForProgressbarXSlider(self, setting_box_progressbar_x_slider_frame, BUTTON_PADDING, button_command, button_image_file):
button_wrapper = createButtonWithImage(
parent_widget=setting_box_progressbar_x_slider_frame,
button_fg_color=self.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_COLOR,
button_enter_color=self.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_HOVERED_COLOR,
button_clicked_color=self.ctm.SB__PROGRESSBAR_X_SLIDER__PASSIVE_BUTTON_CLICKED_COLOR,
button_image_filename=button_image_filename,
button_image_file=button_image_file,
button_image_size=self.uism.SB__PROGRESSBAR_X_SLIDER__BUTTON_ICON_SIZE,
button_ipadxy=self.uism.SB__PROGRESSBAR_X_SLIDER__BUTTON_IPADXY,
button_command=button_command,
@@ -485,13 +485,13 @@ class _SettingBoxGenerator():
def _createActiveButtonForProgressbarXSlider(self, setting_box_progressbar_x_slider_frame, BUTTON_PADDING, button_command, button_image_filename):
def _createActiveButtonForProgressbarXSlider(self, setting_box_progressbar_x_slider_frame, BUTTON_PADDING, button_command, button_image_file):
button_wrapper = createButtonWithImage(
parent_widget=setting_box_progressbar_x_slider_frame,
button_fg_color=self.ctm.SB__PROGRESSBAR_X_SLIDER__ACTIVE_BUTTON_COLOR,
button_enter_color=self.ctm.SB__PROGRESSBAR_X_SLIDER__ACTIVE_BUTTON_HOVERED_COLOR,
button_clicked_color=self.ctm.SB__PROGRESSBAR_X_SLIDER__ACTIVE_BUTTON_CLICKED_COLOR,
button_image_filename=button_image_filename,
button_image_file=button_image_file,
button_image_size=self.uism.SB__PROGRESSBAR_X_SLIDER__BUTTON_ICON_SIZE,
button_ipadxy=self.uism.SB__PROGRESSBAR_X_SLIDER__BUTTON_IPADXY,
button_command=button_command,

View File

@@ -118,7 +118,7 @@ def createSettingBox_Mic(setting_box_wrapper, config_window, settings, view_vari
config_window.sb__progressbar_x_slider__active_button_mic_energy_threshold,
is_turned_on=False,
),
button_image_filename="mic_icon_white.png"
button_image_file=settings.image_file.MIC_ICON
)
config_window.sb__mic_energy_threshold.grid(row=row)
row+=1

View File

@@ -99,7 +99,7 @@ def createSettingBox_Speaker(setting_box_wrapper, config_window, settings, view_
config_window.sb__progressbar_x_slider__active_button_speaker_energy_threshold,
is_turned_on=False,
),
button_image_filename="headphones_icon_white.png"
button_image_file=settings.image_file.HEADPHONES_ICON
)
config_window.sb__speaker_energy_threshold.grid(row=row)
row+=1