|
8 | 8 | from functools import partial |
9 | 9 |
|
10 | 10 | from core import SCRIPT_NAME, VERSION, MAXIMUM_SELLERS |
11 | | -from core import FunctResult |
12 | | -from core import init_logger |
13 | 11 | from core import create_credentials_file |
14 | 12 | from core import get_credentials_from_file |
15 | 13 | from core import check_credentials_validity |
@@ -77,7 +75,7 @@ def create_label(parent, text, font_style, bg_color): |
77 | 75 | return label |
78 | 76 |
|
79 | 77 | def create_button(parent, text, bg_color): |
80 | | - button = tkinter.Button(parent, font=GUI_FONT_STYLES['button'], background=bg_color, highlightbackground=bg_color) |
| 78 | + button = tkinter.Button(parent, font=GUI_FONT_STYLES['button']['font'], background=GUI_FONT_STYLES['button']['background-color'], highlightbackground=bg_color, foreground=GUI_FONT_STYLES['button']['font-color'], disabledforeground=GUI_FONT_STYLES['button']['disabled-font-color']) |
81 | 79 | if isinstance(text, tkinter.StringVar): |
82 | 80 | button.configure(textvariable=text) |
83 | 81 | else: |
@@ -127,7 +125,7 @@ def _populate_font_styles(): |
127 | 125 | GUI_FONT_STYLES['title'] = { 'font': (font_name, 22, tkinter.font.BOLD), 'font-color': '#FFFFFF' } |
128 | 126 | GUI_FONT_STYLES['description'] = { 'font': (font_name, 12), 'font-color': '#aaaaaa' } |
129 | 127 | GUI_FONT_STYLES['content'] = { 'font': (font_name, 12), 'font-color': '#FFFFFF' } |
130 | | - GUI_FONT_STYLES['button'] = { 'font': (font_name, 12), 'font-color': '#aaaaaa' } |
| 128 | + GUI_FONT_STYLES['button'] = { 'font': (font_name, 12), 'font-color': '#24201d', 'disabled-font-color': '#4a4542', 'background-color': '#feffff' } |
131 | 129 |
|
132 | 130 | def close_window(window): |
133 | 131 | window.root.destroy() |
@@ -275,11 +273,13 @@ def create_default_widgets(window): |
275 | 273 | window.button_next = create_button(frame_buttons, window.button_next_text, window.main_bg_color) |
276 | 274 | window.button_next.grid(column=1, row=0, sticky=tkinter.NE) |
277 | 275 |
|
278 | | -def set_window_description(window, message, is_error=False): |
| 276 | +def set_window_description(window, message, is_error=False, is_warn=False): |
279 | 277 | if is_error: |
280 | 278 | window.description_label.configure(foreground='red') |
| 279 | + elif is_warn: |
| 280 | + window.description_label.configure(foreground='yellow') |
281 | 281 | else: |
282 | | - window.description_label.configure(foreground= GUI_FONT_STYLES['description']['font-color']) |
| 282 | + window.description_label.configure(foreground=GUI_FONT_STYLES['description']['font-color']) |
283 | 283 |
|
284 | 284 | window.description.set(message) |
285 | 285 |
|
@@ -432,7 +432,7 @@ def window_wait_screen(window): |
432 | 432 | content_label.configure(wraplength=472) |
433 | 433 |
|
434 | 434 | # Step 3: Set texts according to the current step |
435 | | - set_window_description(window, 'Please wait until the process as finish.') |
| 435 | + set_window_description(window, 'Please wait for the process to finish.') |
436 | 436 | if window.step == 'request_credentials': |
437 | 437 | window.title.set('Checking credentials...') |
438 | 438 | content_msg.set('The program check if we can estasblish a connection to Cardmarket using your credentials, this can takes up to 1 minute.') |
|
0 commit comments