[bugfix] getImageFileFromUiUtilsなどimage file取得をimageFileManager(元imageFilenameManager)にて一括で行うように。
UIに入れる時はファイル名ではなくファイルそのもの
This commit is contained in:
@@ -48,7 +48,7 @@ def createMainWindowWidgets(vrct_gui, settings, view_variable):
|
||||
button_fg_color=settings.ctm.HELP_AND_INFO_BUTTON_BG_COLOR,
|
||||
button_enter_color=settings.ctm.HELP_AND_INFO_BUTTON_HOVERED_BG_COLOR,
|
||||
button_clicked_color=settings.ctm.HELP_AND_INFO_BUTTON_CLICKED_BG_COLOR,
|
||||
button_image_filename=settings.image_filename.HELP_ICON,
|
||||
button_image_file=settings.image_file.HELP_ICON,
|
||||
button_image_size=settings.uism.HELP_AND_INFO_BUTTON_SIZE,
|
||||
button_ipadxy=settings.uism.HELP_AND_INFO_BUTTON_IPADXY,
|
||||
button_command=vrct_gui.openHelpAndInfoWindow,
|
||||
|
||||
@@ -69,7 +69,7 @@ def createSidebarFeatures(settings, main_window, view_variable):
|
||||
|
||||
|
||||
|
||||
(img, width, height) = openImageKeepAspectRatio(settings.image_filename.VRCT_LOGO, settings.uism.SF__LOGO_MAX_SIZE)
|
||||
(img, width, height) = openImageKeepAspectRatio(settings.image_file.VRCT_LOGO, settings.uism.SF__LOGO_MAX_SIZE)
|
||||
main_window.sidebar_logo = CTkLabel(
|
||||
main_window.sidebar_bg_container,
|
||||
fg_color=settings.ctm.SIDEBAR_BG_COLOR,
|
||||
@@ -81,7 +81,7 @@ def createSidebarFeatures(settings, main_window, view_variable):
|
||||
|
||||
# "height-a_s" represents the adjustment in size, and the "pady+a_s/2" indicates a padding increase of 4 pixels to compensate for the reduction.
|
||||
a_s = settings.uism.SF__LOGO_HEIGHT_FOR_ADJUSTMENT
|
||||
(img, width, height) = openImageKeepAspectRatio(settings.image_filename.VRCT_LOGO_MARK, height-a_s)
|
||||
(img, width, height) = openImageKeepAspectRatio(settings.image_file.VRCT_LOGO_MARK, height-a_s)
|
||||
main_window.sidebar_compact_mode_logo = CTkLabel(
|
||||
main_window.sidebar_compact_mode_bg_container,
|
||||
fg_color=settings.ctm.SIDEBAR_BG_COLOR,
|
||||
@@ -119,7 +119,7 @@ def createSidebarFeatures(settings, main_window, view_variable):
|
||||
"compact_mode_frame_attr_name": "compact_mode_translation_frame",
|
||||
"selected_mark_attr_name": "translation_selected_mark",
|
||||
"var_label_text": view_variable.VAR_LABEL_TRANSLATION,
|
||||
"icon_file_name": settings.image_filename.TRANSLATION_ICON,
|
||||
"icon_file": settings.image_file.TRANSLATION_ICON,
|
||||
},
|
||||
{
|
||||
"frame_attr_name": "transcription_send_frame",
|
||||
@@ -131,7 +131,7 @@ def createSidebarFeatures(settings, main_window, view_variable):
|
||||
"compact_mode_frame_attr_name": "compact_mode_transcription_send_frame",
|
||||
"selected_mark_attr_name": "transcription_send_selected_mark",
|
||||
"var_label_text": view_variable.VAR_LABEL_TRANSCRIPTION_SEND,
|
||||
"icon_file_name": settings.image_filename.MIC_ICON,
|
||||
"icon_file": settings.image_file.MIC_ICON,
|
||||
},
|
||||
{
|
||||
"frame_attr_name": "transcription_receive_frame",
|
||||
@@ -143,7 +143,7 @@ def createSidebarFeatures(settings, main_window, view_variable):
|
||||
"compact_mode_frame_attr_name": "compact_mode_transcription_receive_frame",
|
||||
"selected_mark_attr_name": "transcription_receive_selected_mark",
|
||||
"var_label_text": view_variable.VAR_LABEL_TRANSCRIPTION_RECEIVE,
|
||||
"icon_file_name": settings.image_filename.HEADPHONES_ICON,
|
||||
"icon_file": settings.image_file.HEADPHONES_ICON,
|
||||
},
|
||||
{
|
||||
"frame_attr_name": "foreground_frame",
|
||||
@@ -155,7 +155,7 @@ def createSidebarFeatures(settings, main_window, view_variable):
|
||||
"compact_mode_frame_attr_name": "compact_mode_foreground_frame",
|
||||
"selected_mark_attr_name": "foreground_selected_mark",
|
||||
"var_label_text": view_variable.VAR_LABEL_FOREGROUND,
|
||||
"icon_file_name": settings.image_filename.FOREGROUND_ICON,
|
||||
"icon_file": settings.image_file.FOREGROUND_ICON,
|
||||
},
|
||||
]
|
||||
|
||||
@@ -172,7 +172,7 @@ def createSidebarFeatures(settings, main_window, view_variable):
|
||||
compact_mode_frame_attr_name = sfs["compact_mode_frame_attr_name"]
|
||||
selected_mark_attr_name = sfs["selected_mark_attr_name"]
|
||||
var_label_text = sfs["var_label_text"]
|
||||
icon_file_name = sfs["icon_file_name"]
|
||||
icon_file = sfs["icon_file"]
|
||||
|
||||
frame_widget = CTkFrame(main_window.sidebar_features_container, corner_radius=0, fg_color=settings.ctm.SF__BG_COLOR, cursor="hand2", width=0, height=0)
|
||||
setattr(main_window, frame_attr_name, frame_widget)
|
||||
@@ -234,7 +234,7 @@ def createSidebarFeatures(settings, main_window, view_variable):
|
||||
text=None,
|
||||
height=0,
|
||||
corner_radius=0,
|
||||
image=CTkImage(getImageFileFromUiUtils(icon_file_name),size=(settings.COMPACT_MODE_ICON_SIZE,settings.COMPACT_MODE_ICON_SIZE)),
|
||||
image=CTkImage((icon_file),size=(settings.COMPACT_MODE_ICON_SIZE,settings.COMPACT_MODE_ICON_SIZE)),
|
||||
)
|
||||
setattr(main_window, compact_mode_icon_attr_name, compact_mode_icon_widget)
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ def createSidebarLanguagesSettings(settings, main_window, view_variable):
|
||||
main_window.sls__arrow_direction_box,
|
||||
text=None,
|
||||
height=0,
|
||||
image=CTkImage(getImageFileFromUiUtils(settings.image_filename.NARROW_ARROW_DOWN).rotate(180),size=settings.uism.SLS__BOX_ARROWS_IMAGE_SIZE)
|
||||
image=CTkImage((settings.image_file.NARROW_ARROW_DOWN).rotate(180),size=settings.uism.SLS__BOX_ARROWS_IMAGE_SIZE)
|
||||
|
||||
)
|
||||
main_window.sls__both_direction_up.grid(row=0, column=1, pady=0)
|
||||
@@ -253,7 +253,7 @@ def createSidebarLanguagesSettings(settings, main_window, view_variable):
|
||||
main_window.sls__arrow_direction_box,
|
||||
text=None,
|
||||
height=0,
|
||||
image=CTkImage(getImageFileFromUiUtils(settings.image_filename.NARROW_ARROW_DOWN).rotate(0),size=settings.uism.SLS__BOX_ARROWS_IMAGE_SIZE)
|
||||
image=CTkImage((settings.image_file.NARROW_ARROW_DOWN).rotate(0),size=settings.uism.SLS__BOX_ARROWS_IMAGE_SIZE)
|
||||
|
||||
)
|
||||
main_window.sls__both_direction_label_down.grid(row=0, column=3, pady=0)
|
||||
@@ -296,7 +296,7 @@ def createSidebarLanguagesSettings(settings, main_window, view_variable):
|
||||
main_window.sidebar_config_button_wrapper,
|
||||
text=None,
|
||||
height=0,
|
||||
image=CTkImage(getImageFileFromUiUtils(settings.image_filename.CONFIGURATION_ICON),size=(settings.COMPACT_MODE_ICON_SIZE,settings.COMPACT_MODE_ICON_SIZE))
|
||||
image=CTkImage((settings.image_file.CONFIGURATION_ICON),size=(settings.COMPACT_MODE_ICON_SIZE,settings.COMPACT_MODE_ICON_SIZE))
|
||||
)
|
||||
main_window.sidebar_config_button.grid(row=0, column=0, padx=0, pady=settings.uism.SIDEBAR_CONFIG_BUTTON_IPADY)
|
||||
|
||||
|
||||
@@ -24,16 +24,16 @@ def createMinimizeSidebarButton(settings, main_window, view_variable):
|
||||
text=None,
|
||||
corner_radius=0,
|
||||
height=0,
|
||||
image=CTkImage(getImageFileFromUiUtils(settings.image_filename.ARROW_LEFT),size=(settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_X,settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_Y))
|
||||
image=CTkImage((settings.image_file.ARROW_LEFT),size=(settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_X,settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_Y))
|
||||
)
|
||||
|
||||
|
||||
if view_variable.IS_MAIN_WINDOW_SIDEBAR_COMPACT_MODE is True:
|
||||
image_file = CTkImage(getImageFileFromUiUtils(settings.image_filename.ARROW_LEFT).rotate(180),size=(settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_X,settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_Y))
|
||||
image_file = CTkImage((settings.image_file.ARROW_LEFT).rotate(180),size=(settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_X,settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_Y))
|
||||
bindButtonReleaseFunction([main_window.minimize_sidebar_button_container, main_window.minimize_sidebar_button], disableCompactMode)
|
||||
|
||||
else:
|
||||
image_file = CTkImage(getImageFileFromUiUtils(settings.image_filename.ARROW_LEFT),size=(settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_X,settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_Y))
|
||||
image_file = CTkImage((settings.image_file.ARROW_LEFT),size=(settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_X,settings.uism.MINIMIZE_SIDEBAR_BUTTON_ICON_SIZE_Y))
|
||||
bindButtonReleaseFunction([main_window.minimize_sidebar_button_container, main_window.minimize_sidebar_button], enableCompactMode)
|
||||
|
||||
main_window.minimize_sidebar_button_container.grid_rowconfigure((0,2), weight=1)
|
||||
|
||||
Reference in New Issue
Block a user