diff options
| author | historia <historiavg@proton.me> | 2026-08-25 14:52:30 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-25 14:52:30 -0400 |
| commit | fca3431721a55277f139efc83df2438207917448 (patch) | |
| tree | 1d64aec465db7fa1d5098bc56c11ea70ab6b682d /app/ui | |
| parent | 061406b608c5a77b33259506648e0166367b2b9f (diff) | |
| download | tts-audiobook-generator-fca3431721a55277f139efc83df2438207917448.tar.gz | |
feat: clearer colors for buttons
Diffstat (limited to 'app/ui')
| -rw-r--r-- | app/ui/tui.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/ui/tui.py b/app/ui/tui.py index 34c9a3e..663df0a 100644 --- a/app/ui/tui.py +++ b/app/ui/tui.py @@ -178,7 +178,7 @@ def _ensure_theme(curses) -> dict: "input": curses.A_BOLD, "bar": curses.A_REVERSE, "btn_on": curses.A_REVERSE | curses.A_BOLD, - "btn_off": curses.A_DIM, + "btn_off": curses.A_BOLD, "check": curses.A_BOLD, "accent": curses.A_BOLD, } @@ -186,6 +186,7 @@ def _ensure_theme(curses) -> dict: try: curses.start_color() black = curses.COLOR_BLACK + gray = 236 if getattr(curses, "COLORS", 0) >= 256 else black pairs = { "desktop": (curses.COLOR_WHITE, black), "border": (curses.COLOR_CYAN, black), @@ -197,6 +198,7 @@ def _ensure_theme(curses) -> dict: "input": (curses.COLOR_WHITE, black), "bar": (curses.COLOR_BLACK, curses.COLOR_CYAN), "btn_on": (curses.COLOR_BLACK, curses.COLOR_GREEN), + "btn_off": (curses.COLOR_WHITE, gray), "check": (curses.COLOR_GREEN, black), "accent": (curses.COLOR_CYAN, black), } @@ -205,7 +207,7 @@ def _ensure_theme(curses) -> dict: theme[name] = curses.color_pair(number) theme["dim"] = curses.A_DIM | theme["desktop"] theme["body"] = theme["desktop"] - theme["btn_off"] = curses.A_DIM | theme["desktop"] + for name in ("title", "ok", "warn", "err", "check", "accent", "input"): theme[name] |= curses.A_BOLD @@ -450,7 +452,7 @@ class Frame: if selected: _addstr(scr, y, inner_x, " " * inner_w, theme["bar"]) if row["align"] == "left": - _addch(scr, y, inner_x + self.LIST_MARGIN - 1, + _addch(scr, y, inner_x + self.LIST_MARGIN - 2, self.curses.ACS_RARROW, theme["bar"]) if row["segments"] is not None: self._draw_segments_row(y, row, inner_x, inner_w, selected) |
