Browse Source

Merge pull request #711 from mhenke/fix/582-badge-transparent-bg

fix(tui): use theme.text for badge to stay visible on transparent backgrounds (#582)
Alvin 3 weeks ago
parent
commit
2a45226eee
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}`]),
         ],