@@ -131,16 +131,14 @@ def export_button_handler(self):
131
131
self .progress_window .geometry ("300x100" )
132
132
#self.progress_window.iconbitmap("icon.ico")
133
133
134
- progress_label = Label (self .progress_window , text = "Exporting images" , font = ( "Segoe UI" , 16 ))
135
- # progress_label.grid(row=0, column=0, sticky="we")
136
- progress_label .pack (fill = "x" , side = "top" )
134
+ Label (self .progress_window ,
135
+ text = "Exporting images" ,
136
+ font = ( "Segoe UI" , 16 )) .pack (fill = "x" , side = "top" )
137
137
138
138
progress_bar = ttk .Progressbar (self .progress_window ,
139
139
orient = "horizontal" ,
140
140
length = 280 ,
141
141
mode = "determinate" )
142
- # progress_bar.pack(expand=True, fill="both")
143
- # progress_bar.grid(row=1, column=0, sticky="wes", padx=10)
144
142
progress_bar .pack (expand = True , fill = "both" , side = "bottom" )
145
143
progress_bar ["value" ] = 60
146
144
progress_bar ["maximum" ] = 100
@@ -194,19 +192,19 @@ def create_widgets(self):
194
192
main_container .grid (row = 0 , column = 0 , padx = 20 )
195
193
196
194
# Header/title
197
- label = Label (main_container , text = "Batch Image Resize" , font = font_big )
198
- label . grid ( row = 0 , column = 0 , columnspan = 3 , pady = 8 )
195
+ Label (main_container , text = "Batch Image Resize" , font = font_big ). grid (
196
+ row = 0 , column = 0 , columnspan = 3 , pady = 8 )
199
197
200
198
# Browse
201
- browse_field = ttk .Entry (main_container , textvariable = self .selected_directory )
202
- browse_field . grid ( row = 1 , column = 0 , columnspan = 2 , sticky = "we" , padx = 2 )
199
+ ttk .Entry (main_container , textvariable = self .selected_directory ). grid (
200
+ row = 1 , column = 0 , columnspan = 2 , sticky = "we" , padx = 2 )
203
201
204
- browse_btn = ttk .Button (main_container , text = "Browse" , command = self .browse_for_directory )
205
- browse_btn . grid ( row = 1 , column = 2 , sticky = "we" , padx = 2 )
202
+ ttk .Button (main_container , text = "Browse" , command = self .browse_for_directory ). grid (
203
+ row = 1 , column = 2 , sticky = "we" , padx = 2 )
206
204
207
205
# Resize to
208
- resize_to_label = Label (main_container , text = "Resize to:" , font = font_medium )
209
- resize_to_label . grid ( row = 2 , column = 0 , sticky = "e" )
206
+ Label (main_container , text = "Resize to:" , font = font_medium ). grid (
207
+ row = 2 , column = 0 , sticky = "e" )
210
208
211
209
resize_width_field = ttk .Entry (main_container , textvariable = self .export_properties ["width" ])
212
210
resize_width_field .grid (row = 2 , column = 1 , padx = 2 )
@@ -217,8 +215,8 @@ def create_widgets(self):
217
215
resize_height_field .bind ("<FocusIn>" , self .clear_entry )
218
216
219
217
# Save as
220
- save_as_label = Label (main_container , text = "Save as:" , font = font_medium )
221
- save_as_label . grid ( row = 3 , column = 0 , sticky = "e" )
218
+ Label (main_container , text = "Save as:" , font = font_medium ). grid (
219
+ row = 3 , column = 0 , sticky = "e" )
222
220
223
221
self .save_as_dropdown = ttk .OptionMenu (main_container ,
224
222
self .export_properties ["type" ],
@@ -228,21 +226,21 @@ def create_widgets(self):
228
226
self .save_as_dropdown .grid (row = 3 , column = 1 , sticky = "we" , padx = 2 )
229
227
230
228
# Overwrite original
231
- overwrite_checkbox = ttk .Checkbutton (main_container ,
232
- text = "Overwrite original" ,
233
- variable = self .overwrite_original ,
234
- onvalue = True ,
235
- offvalue = False ,
236
- command = self .toggle_save_as_dropdown )
237
- overwrite_checkbox . grid ( row = 4 , column = 0 , columnspan = 2 , sticky = "w" )
229
+ ttk .Checkbutton (main_container ,
230
+ text = "Overwrite original" ,
231
+ variable = self .overwrite_original ,
232
+ onvalue = True ,
233
+ offvalue = False ,
234
+ command = self .toggle_save_as_dropdown ). grid (
235
+ row = 4 , column = 0 , columnspan = 2 , sticky = "w" )
238
236
239
237
# Export
240
- export_btn = ttk .Button (main_container , text = "Export" , command = self .export_button_handler )
241
- export_btn . grid ( row = 3 , column = 2 , rowspan = 2 , sticky = "nesw" , padx = 2 )
238
+ ttk .Button (main_container , text = "Export" , command = self .export_button_handler ). grid (
239
+ row = 3 , column = 2 , rowspan = 2 , sticky = "nesw" , padx = 2 )
242
240
243
241
# Copyright
244
- copyright_label = Label (main_container , text = "Copyright (c) 2016 dn0z | v0.1" , font = font_small )
245
- copyright_label . grid ( row = 5 , column = 0 , columnspan = 3 , sticky = "we" , pady = 20 )
242
+ Label (main_container , text = "Copyright (c) 2016 dn0z | v0.1" , font = font_small ). grid (
243
+ row = 5 , column = 0 , columnspan = 3 , sticky = "we" , pady = 20 )
246
244
247
245
def __init__ (self , parent = None ):
248
246
"""
0 commit comments