Skip to content

UI: Increase hitboxes and interaction areas for core elements#1995

Open
edumeneses wants to merge 1 commit intomasterfrom
feat/improve-hitboxes
Open

UI: Increase hitboxes and interaction areas for core elements#1995
edumeneses wants to merge 1 commit intomasterfrom
feat/improve-hitboxes

Conversation

@edumeneses
Copy link
Contributor

Closes #1994

Increased hitboxes and interaction areas for various UI components to improve selection and drag-and-drop usability:

  • Cables: Increased stroke width from 7 to 14.
  • Intervals: Added a 5-pixel margin and increased drop threshold to 12.
  • Conditions: Increased stroke width from 1 to 10.
  • Events: Widened bounding box from 6 to 12.
  • States: Enlarged visual radii (full: 6->8, point: 3.5->5).
  • Ports: Expanded interaction area to 20x20.
  • Slot Headers: Widened drag area and increased drop threshold between slots.

Increased hitboxes and interaction areas for various UI components to improve selection and drag-and-drop usability:
- Cables: Increased stroke width from 7 to 14.
- Intervals: Added a 5-pixel margin and increased drop threshold to 12.
- Conditions: Increased stroke width from 1 to 10.
- Events: Widened bounding box from 6 to 12.
- States: Enlarged visual radii (full: 6->8, point: 3.5->5).
- Ports: Expanded interaction area to 20x20.
- Slot Headers: Widened drag area and increased drop threshold between slots.
@jcelerier
Copy link
Member

works here! but for me it seems to make it harder to select the cross to create new objects in the timeline: basically only the lower-right or upper-left corner triggers the "creation" yellow or red plus signs now :/

ossia-.2.mp4

@jcelerier
Copy link
Member

jcelerier commented Mar 22, 2026

the correct thing to do here in addition to this change is: in src/plugins/score-plugin-scenario/Scenario/Document/State/StateView.hpp, we should implement the following virtual methods for QGraphicsItem, so that it knows that the item does not only have a square shape:

virtual QPainterPath opaqueArea() const;
virtual bool contains(const QPointF &point) const;
virtual QPainterPath shape() const;

an example is in src/plugins/score-plugin-curve/Curve/Segment/CurveSegmentView.hpp.

Generally most items should implement these virtual methods, it's more work but also means that if you click outside of the visible area it will be correct

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.

[Feature request] Enlarge hitboxes (2.5.2) Displacement/stiching: process upper left corner basic actions hard to perform

2 participants