Reduce dock separator's oversized hit-margin - #226
Conversation
DockSeparator.qml's resize-handle MouseArea extends 5px beyond the separator's own ~1px-thin visual bounds for easier grabbing. That invisible catch-zone can silently overlap adjacent interactive content (e.g. a toolbar button sitting right above a separator), stealing clicks meant for it before they ever reach the button's own MouseArea. Shrinking the margin to 2px keeps the separator comfortably grabbable while greatly reducing the chance of it overlapping neighboring controls. Fixes musescore/MuseScore#34603
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Dock separator Merge Risk: ⚪ Minimal · up to The change narrowly reduces the separator's invisible click-capture area while preserving resize behavior, with no actionable merge-blocking risk remaining after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| MouseArea { | ||
| anchors.fill: parent | ||
| anchors.margins: -5 //! NOTE: extra space for user convenience | ||
| anchors.margins: -2 //! NOTE: extra space for user convenience |
There was a problem hiding this comment.
Good catch, done — applied the same -5 → -2 margin fix to dockwindow_v2/qml/Muse/Dock/DockSeparator.qml in 5c1bd77c6.
Same rationale as dockwindow: -5px oversized MouseArea margin can silently steal clicks from overlapping neighboring content. Addresses review comment on PR musescore#226.
|
/build |
|
Build dispatched: https://github.com/musescore/muse_framework/actions/runs/32228670927 |
Summary
DockSeparator.qml's resize-handleMouseAreaextends 5px beyond the separator's own ~1px-thin visual bounds, for easier grabbing when resizing docks.MouseArea.-5to-2keeps the separator comfortably grabbable while greatly reducing the chance of overlapping neighboring controls. Validated manually: the original click-loss is very hard to reproduce anymore, and the resize-grab ergonomics (getting the resize cursor, dragging) feel unchanged from stock 4.7.4.Fixes musescore/MuseScore#34603
Note on scope / trade-off
This is a minimal, low-risk mitigation (one-line diff), not a structural fix — an even smaller invisible catch-zone still has some residual chance of overlapping content in an unusually tight layout. A more thorough fix would have the separator's hit-region conditionally yield only where it actually overlaps interactive content (rather than shrinking the margin universally), but that requires new runtime hit-testing logic in a widely-shared component. Happy to discuss if maintainers would prefer that direction instead.
Test plan