aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblasty <blasty@local>2026-07-25 16:13:55 +0200
committerblasty <blasty@local>2026-07-25 16:13:55 +0200
commit2cfdb1d6c63496f47e58413a1ccaaf88a97ff3c5 (patch)
tree38cc9dbd6e2d02e47129958629d191cf345ca906
parenthelp: lay the cheatsheet out as fluid columns of cards (diff)
downloadida-tui-2cfdb1d6c63496f47e58413a1ccaaf88a97ff3c5.tar.gz
ida-tui-2cfdb1d6c63496f47e58413a1ccaaf88a97ff3c5.tar.xz
ida-tui-2cfdb1d6c63496f47e58413a1ccaaf88a97ff3c5.zip
theme: stop inheriting Textual's neon orange; ship our own palette
Nobody picked that orange — it's #ffa62b from Textual's default textual-dark, which sets accent AND warning to the same value, so every border, title bar and the quit dialog were all the same neon. Meanwhile the code views already use a coherent muted palette (amber #b58900 for matches and the spinner, #6a9955 green for comments, #264f78 blue for the word highlight), so the chrome was the only thing shouting. Register an "idatui" theme in the same family: desaturated blue-greys for background/surface/panel, amber (#b58900 — the exact match highlight colour) as the accent, a burnt orange (#c9762f) for warning so it reads as care rather than as another accent, blue (#5aa0d6) reserved for focus, and the reds/greens we already used for failure and comments. Title bars were color:$text on the accent, which was passable on bright orange and muddy on amber; they're now dark-on-amber and bold, which reads as intentional. Suite 192/0, project UI 23/23.
-rw-r--r--idatui/app.py34
1 files changed, 29 insertions, 5 deletions
diff --git a/idatui/app.py b/idatui/app.py
index dbe86e0..44e9127 100644
--- a/idatui/app.py
+++ b/idatui/app.py
@@ -34,6 +34,7 @@ from textual.containers import Grid, Horizontal, Vertical, VerticalScroll
from textual.geometry import Region, Size
from textual.message import Message
from textual.reactive import reactive
+from textual.theme import Theme
from textual.screen import ModalScreen
from textual.scroll_view import ScrollView
from textual.strip import Strip
@@ -2937,6 +2938,27 @@ class StructEditor(ModalScreen):
# --------------------------------------------------------------------------- #
# The app
# --------------------------------------------------------------------------- #
+#: The app's own theme. Textual's default (textual-dark) paints every accent and
+#: border in #ffa62b, a neon orange that fights the muted VS Code/Solarized
+#: palette the code views already use (amber #b58900 for matches, #6a9955 green,
+#: #264f78 blue). This keeps the chrome in the same family as the content:
+#: desaturated blue-greys, amber for emphasis, blue reserved for focus.
+IDATUI_THEME = Theme(
+ name="idatui",
+ dark=True,
+ background="#12161c", # deep blue-black, softer than pure black
+ surface="#181d25", # views
+ panel="#212832", # dialogs, status bar, gutters
+ foreground="#d6d9de",
+ primary="#5aa0d6", # focus / links: the one cool accent
+ secondary="#2f5d82",
+ accent="#b58900", # same amber as search matches + the spinner
+ warning="#c9762f", # burnt orange — distinct from accent, reads as care
+ error="#ff5f5f", # already used for failure text
+ success="#6a9955", # already used for comments
+)
+
+
class IdaCommands(Provider):
"""Fills the Ctrl+P command palette with real ida-tui actions instead of the
stock Textual system commands (change theme / take screenshot / …).
@@ -3051,13 +3073,13 @@ class IdaTui(App):
}
QuitScreen { align: center middle; }
#quit-box { width: 64; height: auto; border: thick $warning; background: $panel; }
- #quit-title { dock: top; height: 1; background: $warning; color: $text; padding: 0 1; }
+ #quit-title { dock: top; height: 1; background: $warning; color: $background; text-style: bold; padding: 0 1; }
#quit-list { height: auto; padding: 1 2 0 2; }
#quit-help { height: 1; color: $text-muted; padding: 0 2; margin-top: 1; }
HelpScreen { align: center middle; }
#help-box { width: auto; max-width: 98%; height: auto; max-height: 90%;
border: thick $accent; background: $panel; }
- #help-title { dock: top; height: 1; background: $accent; color: $text; padding: 0 1; }
+ #help-title { dock: top; height: 1; background: $accent; color: $background; text-style: bold; padding: 0 1; }
#help-body { height: auto; max-height: 100%; width: auto; padding: 1 1; }
#help-cols { height: auto; width: auto; }
.help-col { height: auto; width: auto; margin-right: 1; }
@@ -3066,7 +3088,7 @@ class IdaTui(App):
#help-foot { dock: bottom; height: 1; color: $text-muted; padding: 0 2; }
XrefsScreen { align: center middle; }
#xref-box { width: 84; max-height: 70%; height: auto; border: thick $accent; background: $panel; }
- #xref-title { dock: top; height: 1; background: $accent; color: $text; padding: 0 1; }
+ #xref-title { dock: top; height: 1; background: $accent; color: $background; text-style: bold; padding: 0 1; }
#xref-list { height: auto; max-height: 100%; }
/* every #pal-box palette centres, not just the symbol one */
SymbolPalette, StringsPalette, ProjectPalette { align: center middle; }
@@ -3076,7 +3098,7 @@ class IdaTui(App):
CommandPalette #--results { width: 100%; }
#pal-box { width: 96; max-width: 92%; height: auto; max-height: 80%;
border: thick $accent; background: $panel; }
- #pal-title { dock: top; height: 1; background: $accent; color: $text; padding: 0 1; }
+ #pal-title { dock: top; height: 1; background: $accent; color: $background; text-style: bold; padding: 0 1; }
#pal-input { border: none; height: 1; margin: 0 1; background: $panel; color: $text; }
#pal-list { height: auto; max-height: 24; }
StructEditor { align: center middle; }
@@ -3084,7 +3106,7 @@ class IdaTui(App):
#se-panes { height: 1fr; }
#se-left { width: 38; border-right: solid $accent; }
#se-right { width: 1fr; }
- #se-title, #se-hint { height: 1; background: $accent; color: $text; padding: 0 1; }
+ #se-title, #se-hint { height: 1; background: $accent; color: $background; text-style: bold; padding: 0 1; }
#se-list { height: 1fr; }
#se-edit { height: 1fr; border: none; }
#se-status { height: 1; background: $panel-darken-2; color: $text-muted; padding: 0 1; }
@@ -3233,6 +3255,8 @@ class IdaTui(App):
yield Static("connecting\u2026", id="status", markup=False)
def on_mount(self) -> None:
+ self.register_theme(IDATUI_THEME)
+ self.theme = IDATUI_THEME.name
# Keep the hidden command input out of the focus chain until summoned.
inp = self.query_one("#func-filter", Input)
inp.can_focus = False