|
16 | 16 |
|
17 | 17 | THREAD_QUEUE = queue.Queue() |
18 | 18 |
|
19 | | -GUI_WINDOW_WIDTH = 500 |
| 19 | +GUI_WINDOW_WIDTH = 600 |
20 | 20 | GUI_WINDOW_HEIGHT = 300 |
21 | 21 |
|
| 22 | +GUI_ENTRY_BORDER_WIDTH = 2 |
22 | 23 | GUI_ENTRY_BORDER_CLR = '#645c53' |
23 | 24 |
|
24 | 25 | GUI_FONT_LIST = ['Trebuchet MS', 'Helvetica', 'Lucida Sans', 'Tahoma', 'Arial'] |
@@ -88,7 +89,7 @@ def validate_entry_is_integer(new_value): |
88 | 89 | return False |
89 | 90 |
|
90 | 91 | def create_entry(parent, variable, bg_color, password=False, width=0, int_only=False): |
91 | | - entry = tkinter.Entry(parent, textvariable=variable, background=bg_color, highlightcolor=GUI_ENTRY_BORDER_CLR, highlightbackground=GUI_ENTRY_BORDER_CLR) |
| 92 | + entry = tkinter.Entry(parent, textvariable=variable, background=bg_color, foreground=GUI_FONT_STYLES['content']['font-color'], insertbackground=GUI_FONT_STYLES['content']['font-color'], highlightcolor=GUI_ENTRY_BORDER_CLR, highlightbackground=GUI_ENTRY_BORDER_CLR, highlightthickness=GUI_ENTRY_BORDER_WIDTH) |
92 | 93 | if password: |
93 | 94 | entry.configure(show='*') |
94 | 95 | if width != 0: |
@@ -179,7 +180,7 @@ def credentials_validity_has_finished(params): |
179 | 180 |
|
180 | 181 | if not result.isValid(): |
181 | 182 | # Couldn't connect, display error message |
182 | | - window_request_credentials(params[0], 'Error: connection failed, ensure you enter the right credentials.') |
| 183 | + window_request_credentials(params[0], '\n'.join(result.getMessages(message_type='error'))) |
183 | 184 | return False |
184 | 185 |
|
185 | 186 | # Step 3: Store credentials dict in the window object |
@@ -313,12 +314,12 @@ def window_request_credentials(window, error_msg=None): |
313 | 314 | label_username = create_label(frame_credentials, 'Username', 'content', window.content_bg_color) |
314 | 315 | label_username.grid(row=0, column=0, pady=(0, 4), sticky=tkinter.E) |
315 | 316 | entry_username = create_entry(frame_credentials, username, window.content_bg_color) |
316 | | - entry_username.grid(row=0, column=1, pady=(0, 4), sticky=tkinter.NSEW) |
| 317 | + entry_username.grid(row=0, column=1, ipadx=4, padx=(4, 0), pady=(0, 4), sticky=tkinter.NSEW) |
317 | 318 |
|
318 | 319 | label_password = create_label(frame_credentials, 'Password', 'content', window.content_bg_color) |
319 | 320 | label_password.grid(row=1, column=0, sticky=tkinter.E) |
320 | 321 | entry_password = create_entry(frame_credentials, password, window.content_bg_color, password=True) |
321 | | - entry_password.grid(row=1, column=1, sticky=tkinter.NSEW) |
| 322 | + entry_password.grid(row=1, column=1, padx=(4, 0), sticky=tkinter.NSEW) |
322 | 323 |
|
323 | 324 | # Step 4: Add disclaimer message |
324 | 325 | text_disclaimer = 'Disclaimer: If you have 2FA activate on your account this script won\'t work.' |
|
0 commit comments