Browse Source

fix(tui): use theme.text for badge to stay visible on transparent backgrounds (#582)

Michael Henke 1 month ago
parent
commit
6691ab67f7
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/tui.ts

+ 4 - 1
src/tui.ts

@@ -177,7 +177,10 @@ function renderSidebar(
         [
           box(
             { paddingLeft: 1, paddingRight: 1, backgroundColor: theme.accent },
-            [text({ fg: theme.background }, ['OMO-Slim'])],
+            // Use theme.text, not theme.background: when the theme background is
+            // "none" (transparent) the foreground becomes RGBA(0,0,0,0) and the
+            // badge text vanishes. See #582.
+            [text({ fg: theme.text }, ['OMO-Slim'])],
           ),
           text({ fg: theme.textMuted }, [`v${version}`]),
         ],