Repository navigation
feat: Ribbon is a PopoverOwner and an Animator - #500
Merged
Merged
Conversation
Under a PopoverHost (the root of an application) the ribbon's menus, drop-down lists, folded groups, a collapsed ribbon's peeking body, tooltips and keytips are now drawn after the tree and receive the clicks that land on them, with no host code: PopoverOpen, PopoverBounds, DrawPopover (renamed from DrawPopup) and PopoverClick. A click elsewhere closes what is open and goes on. Tick is now the toolkit's Animator contract, Tick(dt seconds) plus Animating(), so TickTree drives the tooltip delay and a host that repaints only while something animates keeps painting until the tooltip shows. (Tick used to take milliseconds and return a bool; v0.334.0 shipped minutes ago.) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while reading how the go-slides playground hosts widgets: its root is a
PopoverHost, which drawsPopoverOwners after the tree and offers them clicks first. The Ribbon of #499 drew its menus from aDrawPopupthe host had to call and could not receive clicks below its bounds, so it did not work under aPopoverHost.RibbonimplementsPopoverOwner(PopoverOpen,PopoverBounds,DrawPopover- the formerDrawPopup,PopoverClick). Test: a ribbon in aVBoxunder aPopoverHost- the menu hangs over the content, the host draws it, a click on a row below the ribbon runs it, a click elsewhere closes it and passes through, a collapsed ribbon's body is clickable, keytips end on a click away.RibbonimplementsAnimator:Tick(dt seconds)andAnimating(), soTickTreedrives the tooltip delay. (Ticktook milliseconds and returned a bool in feat: Ribbon, an Office-style command ribbon #499, released minutes ago as v0.334.0; this is a breaking change below 1.0.0, so MINOR.)🤖 Generated with Claude Code