From e086814b83a7283fd76f2b2840e22d428ffcbb37 Mon Sep 17 00:00:00 2001 From: pdxlocations Date: Sat, 25 Jan 2025 15:30:06 -0800 Subject: [PATCH] fix color fixes --- settings.py | 5 ++--- ui/curses_ui.py | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/settings.py b/settings.py index cb4a1fa..55d5a28 100644 --- a/settings.py +++ b/settings.py @@ -25,7 +25,6 @@ def display_menu(current_menu, menu_path, selected_index, show_save_option): # Create a new curses window with dynamic dimensions menu_win = curses.newwin(height, width, start_y, start_x) menu_win.clear() - menu_win.attrset((get_color("window_frame"))) menu_win.bkgd(get_color("background")) menu_win.attrset(get_color("window_frame")) menu_win.border() @@ -68,12 +67,12 @@ def move_highlight(old_idx, new_idx, options, show_save_option, menu_win): if show_save_option and old_idx == max_index: # special case un-highlight "Save" option menu_win.chgat(max_index + 4, (width - len(save_option)) // 2, len(save_option), get_color("settings_save")) else: - menu_win.chgat(old_idx + 3, 4, width - 8, get_color("settings_sensitive" if options[old_idx] in sensitive_settings else "settings_default")) + menu_win.chgat(old_idx + 3, 4, width - 8, get_color("settings_sensitive") if options[old_idx] in sensitive_settings else get_color("settings_default")) if show_save_option and new_idx == max_index: # special case highlight "Save" option menu_win.chgat(max_index + 4, (width - len(save_option)) // 2, len(save_option), get_color("settings_save", reverse = True)) else: - menu_win.chgat(new_idx + 3, 4, width - 8, get_color("settings_sensitive" if options[new_idx] in sensitive_settings else "settings_default", reverse = True)) + menu_win.chgat(new_idx + 3, 4, width - 8, get_color("settings_sensitive") if options[new_idx] in sensitive_settings else get_color("settings_default"), reverse = True) menu_win.refresh() diff --git a/ui/curses_ui.py b/ui/curses_ui.py index 52e30e7..4270581 100644 --- a/ui/curses_ui.py +++ b/ui/curses_ui.py @@ -91,6 +91,9 @@ def draw_splash(stdscr): curses.curs_set(0) stdscr.clear() + stdscr.attrset(get_color("window_frame")) + stdscr.bkgd(get_color("background")) + height, width = stdscr.getmaxyx() message_1 = "/ Λ" message_2 = "/ / \\" @@ -104,8 +107,6 @@ def draw_splash(stdscr): stdscr.addstr(start_y+1, start_x-1, message_2, get_color("splash_logo", bold=True)) stdscr.addstr(start_y+2, start_x-2, message_3, get_color("splash_logo", bold=True)) stdscr.addstr(start_y+4, start_x2, message_4, get_color("splash_text")) - stdscr.attrset(get_color("window_frame")) - stdscr.bkgd(get_color("background")) stdscr.box() stdscr.refresh() curses.napms(500)