mirror of
https://github.com/pdxlocations/contact.git
synced 2026-05-02 11:32:14 +02:00
fix color fixes
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user