How to remove the icon from the header? #4909
-
I can't figure out how to remove the icon from the header. I tried |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I believe you need to disable the command palette. https://textual.textualize.io/guide/command_palette/#disabling-the-command-palette |
Beta Was this translation helpful? Give feedback.
-
The from textual.app import App, ComposeResult
from textual.widgets import Header
class ExampleApp(App):
def compose(self) -> ComposeResult:
yield Header()
def on_mount(self) -> None:
self.query_one("HeaderIcon").visible = False
if __name__ == "__main__":
app = ExampleApp()
app.run() Or hide it using CSS like this: HeaderIcon {
visibility: hidden;
} |
Beta Was this translation helpful? Give feedback.
-
Untested, but this CSS should hide the icon: HeaderIcon {
display: none;
} |
Beta Was this translation helpful? Give feedback.
The
Header
doesn't provide an option to remove the icon, but you could do something like this:Or hide it using CSS like this: