Allow dragging the floating window from the top and show resize cursors - #93
Open
robert-corlett wants to merge 1 commit into
Open
Allow dragging the floating window from the top and show resize cursors#93robert-corlett wants to merge 1 commit into
robert-corlett wants to merge 1 commit into
Conversation
The floating overlay is a borderless panel, so it has no title bar to drag by and no frame to provide resize cursors. Moving it meant catching the few points of window border, and the edges gave no indication they could be dragged. Add a grab bar across the top of the window that starts a window drag, styled after the resize handle already used by the pinned overlay, and an edge overlay that shows the standard frame resize cursors on the sides and bottom. The top edge is left to the drag bar. The cursors are driven by tracking areas rather than cursor rects: the overlay is a non-activating panel that never becomes key, and cursor rects only apply to the key window. The overlay declines hit testing, so the window continues to handle the resize itself and the content underneath stays interactive. Both are skipped in follow-cursor mode, where the panel ignores mouse events and positions itself.
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.
Adds floating window top drag bar and resize cursors on edge hover - #90
Issue also mentions persisting the size and position of a manually resized floating window - added this functionality in a seperate pull request #91
The floating overlay is a borderless panel, so it has no title bar to drag by and no frame to provide resize cursors. Moving it meant catching the few points of window border, and the edges gave no indication they could be dragged.
Add a grab bar across the top of the window that starts a window drag, styled after the resize handle already used by the pinned overlay, and an edge overlay that shows the standard frame resize cursors on the sides and bottom. The top edge is left to the drag bar.
The cursors are driven by tracking areas rather than cursor rects: the overlay is a non-activating panel that never becomes key, and cursor rects only apply to the key window. The overlay declines hit testing, so the window continues to handle the resize itself and the content underneath stays interactive.
Both are skipped in follow-cursor mode, where the panel ignores mouse events and positions itself.
Builds clean on current master (1b2f26d), Debug and Release, arm64.
Verified drag via top bar.
Verified resize cursors along bottom edge, bottom left+right corners, and left+right sides.