Shrink the icon correctly on mouse clicks with respect to the global single/double-click mouse settings.
REVIEW:103831
This commit is contained in:
parent
64f687dda0
commit
148002cee4
@ -1372,7 +1372,9 @@ void IconWidget::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
d->states |= IconWidgetPrivate::PressedState;
|
if (KGlobalSettings::singleClick() || (receivers(SIGNAL(clicked()))) > 0) {
|
||||||
|
d->states |= IconWidgetPrivate::PressedState;
|
||||||
|
}
|
||||||
d->clickStartPos = scenePos();
|
d->clickStartPos = scenePos();
|
||||||
|
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
@ -1451,10 +1453,14 @@ void IconWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
Q_UNUSED(event)
|
||||||
|
|
||||||
|
d->states |= IconWidgetPrivate::PressedState;
|
||||||
|
|
||||||
emit doubleClicked();
|
emit doubleClicked();
|
||||||
if (!KGlobalSettings::singleClick()) {
|
if (!KGlobalSettings::singleClick()) {
|
||||||
emit activated();
|
emit activated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IconWidget::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
void IconWidget::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user