Skip to content

Commit 5161cbc

Browse files
committed
fix(header): show command palette tooltip only when enabled
1 parent d34f4a4 commit 5161cbc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/textual/widgets/_header.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ class HeaderIcon(Widget):
3333
"""The character to use as the icon within the header."""
3434

3535
def on_mount(self) -> None:
36-
self.tooltip = "Open the command palette"
36+
if self.app.ENABLE_COMMAND_PALETTE:
37+
self.tooltip = "Open the command palette"
38+
else:
39+
self.disabled = True
3740

3841
async def on_click(self, event: Click) -> None:
3942
"""Launch the command palette when icon is clicked."""

0 commit comments

Comments
 (0)