style: Modify warning message display to keep text in red
This commit is contained in:
parent
1c03bef555
commit
6b84f1fc2b
10
gtm
10
gtm
|
|
@ -922,14 +922,14 @@ def draw_warning_message(stdscr, state: AppState, layout: StatusBarLayout):
|
|||
# Use red text with bold for warning
|
||||
warning_attr = curses.color_pair(8) | curses.A_BOLD
|
||||
|
||||
# Draw the warning message
|
||||
# Draw the warning message and dismiss instruction all in red
|
||||
warning_text = f" WARNING: {state.warning_message} "
|
||||
stdscr.addstr(layout.main_status_y, 0, warning_text, warning_attr)
|
||||
|
||||
# Add instruction to dismiss
|
||||
# Add instruction to dismiss, also in red
|
||||
dismiss_text = " (Press any key to dismiss) "
|
||||
if len(warning_text) + len(dismiss_text) < layout.screen_width:
|
||||
stdscr.addstr(layout.main_status_y, len(warning_text), dismiss_text, curses.A_REVERSE)
|
||||
stdscr.addstr(layout.main_status_y, len(warning_text), dismiss_text, warning_attr)
|
||||
except curses.error:
|
||||
pass # Silently fail if we can't draw the warning
|
||||
|
||||
|
|
@ -1302,10 +1302,6 @@ def handle_mouse_input(stdscr, state: AppState) -> AppState:
|
|||
_, mx, my, _, bstate = curses.getmouse()
|
||||
state = replace(state, last_bstate=bstate, mouse_x=mx, mouse_y=my)
|
||||
|
||||
# If there's a warning message, any mouse click dismisses it
|
||||
if state.warning_message:
|
||||
return replace(state, warning_message=None)
|
||||
|
||||
# Status bar position
|
||||
status_bar_start = state.height - state.status_bar_height
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue