@@ -10,14 +10,17 @@ def show(shortcut_type: str, path: str):
1010
1111 window = custom_ui .Toplevel ()
1212 window .title (strings .lang .customize_shortcut )
13- window .configure (padx = 16 )
13+ window .configure (padx = preferences . get_scaled_value ( 16 ) )
1414
1515 use_folder_icon = tk .BooleanVar (value = True )
1616
1717 shortcut_info = ttk .Frame (window )
18- shortcut_info .pack (fill = "x" , expand = True , pady = (16 , 0 ))
18+ shortcut_info .pack (fill = "x" , expand = True , pady = (preferences . get_scaled_value ( 16 ) , 0 ))
1919
20- icon_canvas = tk .Canvas (shortcut_info , width = 32 , height = 32 , bd = 0 , highlightthickness = 0 , background = custom_ui .colors .bg )
20+ icon_canvas = tk .Canvas (
21+ shortcut_info , width = preferences .get_scaled_value (32 ), height = preferences .get_scaled_value (32 ), bd = 0 ,
22+ highlightthickness = 0 , background = custom_ui .colors .bg
23+ )
2124 icon_canvas .pack (side = "left" )
2225
2326 def update_icon (icon_path : str , icon_index : int = 0 ):
@@ -34,7 +37,7 @@ def update_icon(icon_path: str, icon_index: int = 0):
3437
3538 name_rame = tk .Frame (shortcut_info , highlightbackground = custom_ui .colors .entry_bd , highlightcolor = custom_ui .colors .entry_focus ,
3639 highlightthickness = 1 )
37- name_rame .pack (anchor = "w" , padx = (16 , 0 ), side = "left" )
40+ name_rame .pack (anchor = "w" , padx = (preferences . get_scaled_value ( 16 ) , 0 ), side = "left" )
3841
3942 name = tk .Entry (name_rame , width = 50 , background = custom_ui .colors .entry_bg ,
4043 foreground = custom_ui .colors .fg , border = 0 , highlightthickness = 2 ,
@@ -57,10 +60,10 @@ def show_change_icon_btn():
5760 update_icon ("C:/Windows/System32/shell32.dll" , 4 )
5861
5962 if shortcut_type == "folder" :
60- custom_ui .Checkbutton (window , text = strings .lang .use_folder_icon , variable = use_folder_icon , command = show_change_icon_btn ).pack (pady = (8 , 0 ), anchor = "w" )
63+ custom_ui .Checkbutton (window , text = strings .lang .use_folder_icon , variable = use_folder_icon , command = show_change_icon_btn ).pack (pady = (preferences . get_scaled_value ( 8 ) , 0 ), anchor = "w" )
6164
6265 buttons = ttk .Frame (window )
63- buttons .pack (pady = 16 , fill = "x" , expand = True )
66+ buttons .pack (pady = preferences . get_scaled_value ( 16 ) , fill = "x" , expand = True )
6467
6568 def change_icon ():
6669 shortcut_icon , shortcut_icon_index = icon .pick_icon (window )
@@ -80,8 +83,8 @@ def create_shortcut():
8083 if shortcut_type == "folder" : shortcut .create_folder_shortcut (path , shortcut_name , shortcut_icon , shortcut_icon_index )
8184 else : shortcut .create_file_shortcut (path , shortcut_name , shortcut_icon , shortcut_icon_index )
8285
83- ok_btn = custom_ui .Button (buttons , text = strings .lang .ok , default = "active" , command = create_shortcut ).pack (side = "right" , padx = (8 , 0 ))
84- cancel_btn = custom_ui .Button (buttons , text = strings .lang .cancel , command = window .destroy ).pack (side = "right" )
86+ custom_ui .Button (buttons , text = strings .lang .ok , default = "active" , command = create_shortcut ).pack (side = "right" , padx = (preferences . get_scaled_value ( 8 ) , 0 ))
87+ custom_ui .Button (buttons , text = strings .lang .cancel , command = window .destroy ).pack (side = "right" )
8588
8689 if shortcut_type == "folder" : show_change_icon_btn ()
8790 else : update_icon ("C:/Windows/System32/shell32.dll" , 0 )
0 commit comments