Skip to content

A binding with no description but with a tooltip doesn't align correctly in the help panel #5436

@davep

Description

@davep

The issue can be seen with this code:

from textual.app import App
from textual.binding import Binding

class HelpLayoutApp(App[None]):

    BINDINGS = [
        Binding("f1", "gndn1", tooltip="This doesn't line up"),
        Binding("f2", "gndn2", description="Does stuff", tooltip="This is fine"),
    ]

    def on_mount(self) -> None:
        self.action_show_help_panel()

if __name__ == "__main__":
    HelpLayoutApp().run()

giving this:

Screenshot 2024-12-27 at 08 22 09

note the extra space before the tooltip for f1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions