Skip to content

Scroll a cut-off menu label to its end while its row has the cursor - #19822

Open
onno-schuit wants to merge 2 commits into
omacom:quattrofrom
onno-schuit:menu-label-marquee
Open

onno-schuit wants to merge 2 commits into
omacom:quattrofrom
onno-schuit:menu-label-marquee

Conversation

@onno-schuit

@onno-schuit onno-schuit commented Nov 22, 2026 •

Copy link
Copy Markdown

What changes

A menu row whose label is too long for the card ends in dots, and nothing shows the rest. Hovering does nothing, and clicking runs the row. In the Super+K keybindings menu, which opens at a fixed 800 wide, that means a binding with a longer description can't be read at all: mine, "Sleep when all Claude Code sessions are done (arm / disarm)", showed as "Sleep when all Claude Code sessions ...".

With this change, the label of the highlighted row (what Menu.qml calls the cursor) scrolls to its end after a short pause (700 ms), waits there (1.5 s), and comes back. It doesn't matter whether hovering or the arrow keys highlighted the row. Moving the pointer off the row doesn't stop it: the highlight stays, and so does the scroll, until another row is highlighted or the menu closes. Labels that fit never move, a row that isn't highlighted stays elided as before, and with omarchy toggle animations off nothing scrolls (Style.reduceMotion). Right-to-left labels start at their right edge and scroll the other way.

All durations go through Style.duration(). The scroll itself is linear, because it's constant motion, and the way back eases out with Style.easeOut in 250 ms.

#15758 and #18320 widen menus to fit their widest row, up to 520, but both leave menus that set their own width (dmenu, omarchy-menu-select --width) as they are, so Super+K keeps cutting labels off with either of them. This change works alongside both. Related: #11212.

Verification

  • test/shell.d/menu-test.sh now also runs the real Menu.qml under Quickshell (fixture menu-marquee) with a select menu narrower than its first option. With the short row highlighted, the long label is cut off and still. With the long row highlighted, it scrolls to its end. With the short row highlighted again, it's at rest, and the short label, which fits, never moves. With the long row highlighted again and the menu closed, the long label is at rest too. The fixture holds Style.reduceMotion off, so a desktop with animations turned off doesn't fail it.
  • Against quattro without this change, that test fails with "the long row with the cursor does not scroll". With faults rigged into the change it fails each time: no reset when the highlight moves on, scrolling without the highlight, short labels scrolling too, and scrolling on after the menu closes ("the long label keeps scrolling after the menu closed").
  • On Hyprland the test passes in full. In a headless Weston, which doesn't size layer-shell surfaces, the card stays 90 wide, so there the last step (the short label fits) can't pass; the failing runs above were made there.
  • With a stand-in hyprctl that reports animations off, the fixture passes; without the hold on Style.reduceMotion it fails with "the long row with the cursor does not scroll".
  • test/shell.d/motion-test.sh passes, and test/shell.d/menu-test.sh passes in full.
  • The same label code, cut verbatim from Menu.qml, passes six behavior tests offscreen in qmltestrunner: elided at rest, scrolls to its end and back, resets when the highlight moves on, short label still, reduced motion still, right to left.
  • An earlier version of this change (the same scroll, without the reduced-motion and right-to-left handling) runs on my 4.5.0-3 desktop as a local patch. In the Super+K menu, the long description scrolls into view on hover.

Screenshots

Super+K, "sleep" typed, the row highlighted: the label scrolls to its end and back.

menu-label-marquee.mp4

A menu row too long for the card ends in dots, and nothing shows the rest:
the Super+K keybindings menu opens at a fixed 800 wide, so a longer
binding description cannot be read there at all. The label under the
cursor, from the pointer or the arrow keys, now scrolls to its end after
a short pause, waits, and comes back. Labels that fit never move, and
with animations turned off the row stays as it was.
@greptile-apps

greptile-apps Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; all three previous findings are addressed.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; all three previous findings are addressed.

Summary

Long labels scroll while their menu row is highlighted.

  • Selected menu labels scroll to reveal text cut off by the card.

All three previous findings are addressed. No new actionable issues were found.

Reviews (3) · Last reviewed commit: "Stop a menu label's scroll when the menu..." · Reviewed by Greptile

Comment thread test/shell.d/menu-marquee-test.sh Resolved
@omarchybot omarchybot added the enhancement New feature or request label Nov 22, 2026
Comment thread shell/plugins/menu/Menu.qml Resolved
The menu stays loaded when it closes and keeps its cursor, so the label
under the cursor went on scrolling in a menu nobody could see. The
marquee now also needs the menu open.

The fixture holds Style.reduceMotion off, so a desktop with animations
turned off no longer fails it, and it runs from menu-test.sh instead of
a file of its own.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants