Commit 360bc1df authored by Nate Graham's avatar Nate Graham 🔩
Browse files

Show grabby hand cursors when hovering and dragging draggable widgets

Summary:
Same idea as D25998, but for desktop widgets and done on the C++ side to avoid weird
interactions between a MouseArea and a MultiPointTouchArea on the QML side.

Test Plan: {F7819381}

Reviewers: #vdg, #plasma, mart, apol

Reviewed By: #vdg, #plasma, mart, apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26015
parent e7af306a
......@@ -529,6 +529,7 @@ void ItemContainer::mousePressEvent(QMouseEvent *event)
if (m_editMode) {
grabMouse();
setCursor(Qt::ClosedHandCursor);
m_dragActive = true;
emit dragActiveChanged();
} else if (m_editModeCondition == AfterPressAndHold) {
......@@ -562,6 +563,7 @@ void ItemContainer::mouseReleaseEvent(QMouseEvent *event)
m_dragActive = false;
if (m_editMode) {
emit dragActiveChanged();
setCursor(Qt::OpenHandCursor);
}
event->accept();
}
......@@ -637,6 +639,7 @@ void ItemContainer::hoverEnterEvent(QHoverEvent *event)
}
if (m_layout->editMode()) {
setCursor(Qt::OpenHandCursor);
setEditMode(true);
} else {
m_editModeTimer->start(QGuiApplication::styleHints()->mousePressAndHoldInterval());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment