style: Update pane color pairs for black-on-white active pane
This commit is contained in:
parent
cb06745430
commit
27b5047704
5
gtm2.py
5
gtm2.py
|
|
@ -364,6 +364,7 @@ def draw_status_bars(stdscr, state):
|
||||||
left_status += mouse_status
|
left_status += mouse_status
|
||||||
|
|
||||||
# Draw original status bars for left and right panes
|
# Draw original status bars for left and right panes
|
||||||
|
# Both active and inactive panes now use their respective color pairs
|
||||||
left_attr = curses.color_pair(1) if state.focus == "left" else curses.color_pair(2)
|
left_attr = curses.color_pair(1) if state.focus == "left" else curses.color_pair(2)
|
||||||
right_attr = curses.color_pair(1) if state.focus == "right" else curses.color_pair(2)
|
right_attr = curses.color_pair(1) if state.focus == "right" else curses.color_pair(2)
|
||||||
|
|
||||||
|
|
@ -606,9 +607,9 @@ def main(stdscr, filename, show_diff, show_add, show_del, mouse):
|
||||||
|
|
||||||
if curses.has_colors():
|
if curses.has_colors():
|
||||||
curses.use_default_colors()
|
curses.use_default_colors()
|
||||||
curses.init_pair(1, 5, 7)
|
|
||||||
# Use a safe background color (7 or less) to avoid "Color number is greater than COLORS-1" error
|
# Use a safe background color (7 or less) to avoid "Color number is greater than COLORS-1" error
|
||||||
curses.init_pair(2, curses.COLOR_WHITE, 0) # Use black (0) instead of 8
|
curses.init_pair(1, curses.COLOR_BLACK, 7) # Active pane: black on white
|
||||||
|
curses.init_pair(2, curses.COLOR_WHITE, 0) # Inactive pane: white on black
|
||||||
curses.init_pair(3, curses.COLOR_GREEN, -1)
|
curses.init_pair(3, curses.COLOR_GREEN, -1)
|
||||||
curses.init_pair(4, curses.COLOR_RED, -1)
|
curses.init_pair(4, curses.COLOR_RED, -1)
|
||||||
curses.init_pair(5, curses.COLOR_BLACK, 7) # Status bar color (white background)
|
curses.init_pair(5, curses.COLOR_BLACK, 7) # Status bar color (white background)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue