Skip to content

Restrict backdrop movement to titlebar only#3019

Draft
Copilot wants to merge 2 commits intodevelopfrom
copilot/restrict-backdrop-movement
Draft

Restrict backdrop movement to titlebar only#3019
Copilot wants to merge 2 commits intodevelopfrom
copilot/restrict-backdrop-movement

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

The backdrop's MouseArea covered the entire node area, capturing all mouse button presses — making it impossible to start a rubber-band rectangle selection from within the backdrop body.

Description

Restrict backdrop drag-to-move to the titlebar only. The backdrop body now passes mouse events through to the canvas, restoring standard rubber-band selection behavior over nodes contained within a backdrop.

Features list

  • Dragging a backdrop only works from its titlebar/header
  • Clicking and dragging on the backdrop body initiates rubber-band rectangle selection instead of moving the backdrop

Implementation remarks

  • Main mouseArea changed to acceptedButtons: Qt.NoButton (hover-only): button presses in the body propagate to the canvas background MouseArea
  • New headerMouseArea added inside the header Rectangle, taking over drag, click, and selection signal responsibilities
  • dragging property updated to reference headerMouseArea.drag.active
  • Header cursor uses Qt.OpenHandCursor at rest and Qt.ClosedHandCursor during drag to signal draggability
  • Resize handles and hover highlighting (selection border) are unaffected

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Change the backdrop's main MouseArea to hover-only (acceptedButtons: Qt.NoButton)
so that mouse button presses in the backdrop body propagate through to the canvas
background MouseArea, enabling rubber-band rectangle selection from within the backdrop.

Add a headerMouseArea inside the header Rectangle to handle drag, click, and
selection events — only the titlebar can now initiate backdrop movement.

Update the dragging property to reference headerMouseArea.drag.active.

Co-authored-by: fabiencastan <153585+fabiencastan@users.noreply.github.com>
Copilot AI changed the title [WIP] Restrict backdrop movement to titlebar only Restrict backdrop movement to titlebar only Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants