Skip to content

Commit f66a143

Browse files
authored
Merge pull request #5427 from TomJGooding/fix-header-show-command-palette-tooltip-only-when-enabled
fix(header): show command palette tooltip only when enabled
2 parents 61f645c + 23ddeb7 commit f66a143

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## Unreleased - 2025
99

10-
### Changed
11-
12-
- Footer can now be scrolled horizontally without holding `shift` https://github.com/Textualize/textual/pull/5404
13-
- The content of an `Input` will now only be automatically selected when the widget is focused by the user, not when the app itself has regained focus (similar to web browsers). https://github.com/Textualize/textual/pull/5379
14-
- `Pilot.mouse_down` and `Pilot.mouse_up` now issue a prior `MouseMove` event, to more closely reflect real mouse actions. https://github.com/Textualize/textual/pull/5409
15-
- Snapshots tests now discard meta, which should reduce test breaking with no visual differences https://github.com/Textualize/textual/pull/5409
16-
1710
### Added
1811

1912
- Added `Select.type_to_search` which allows you to type to move the cursor to a matching option https://github.com/Textualize/textual/pull/5403
@@ -46,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
4639
- Fixed Log widget not refreshing on resize https://github.com/Textualize/textual/pull/5460
4740
- Fixed special case with calculating the height of a container where all children have dynamic heights https://github.com/Textualize/textual/pull/5463
4841
- Fixed scrollbars ignoring background opacity https://github.com/Textualize/textual/issues/5458
42+
- Fixed `Header` icon showing command palette tooltip when disabled https://github.com/Textualize/textual/pull/5427
4943

5044

5145
## [1.0.0] - 2024-12-12

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)