[Refactor/fix] Config Window: _SettingBoxGenerator周りのリファクタリング。見た目は同じだけど構造を結構変えている。
また、ui_utilsにあるcreateButtonWithImageは、circleを廃止。
This commit is contained in:
@@ -120,7 +120,7 @@ def switchTabsColor(target_widget, tab_buttons, active_bg_color, active_text_col
|
||||
|
||||
|
||||
|
||||
def createButtonWithImage(parent_widget, button_fg_color, button_enter_color, button_clicked_color, button_image_file, button_image_size, button_ipadxy, button_command, corner_radius: int = 0 ,shape: str = "normal"):
|
||||
def createButtonWithImage(parent_widget, button_fg_color, button_enter_color, button_clicked_color, button_image_file, button_image_size, button_ipadxy, button_command, corner_radius: int = 0):
|
||||
button_wrapper = CTkFrame(parent_widget, corner_radius=corner_radius, fg_color=button_fg_color, height=0, width=0, cursor="hand2")
|
||||
|
||||
button_widget = CTkLabel(
|
||||
@@ -139,11 +139,4 @@ def createButtonWithImage(parent_widget, button_fg_color, button_enter_color, bu
|
||||
buttonReleasedFunction=button_command,
|
||||
)
|
||||
|
||||
if shape == "circle":
|
||||
# To round the corners of the button into a circle
|
||||
button_wrapper.grid()
|
||||
button_wrapper.configure(corner_radius=int(getLatestWidth(button_wrapper)/2))
|
||||
button_wrapper.grid_remove()
|
||||
|
||||
|
||||
return button_wrapper
|
||||
|
||||
Reference in New Issue
Block a user