Use hover background when something is dragged on the icon.
BUG: 110952 svn path=/trunk/KDE/kdelibs/; revision=948303
This commit is contained in:
parent
bb5a57bc26
commit
44d2194253
@ -1186,6 +1186,25 @@ void IconWidget::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
QGraphicsWidget::hoverLeaveEvent(event);
|
||||
}
|
||||
|
||||
|
||||
void IconWidget::dragEnterEvent(QGraphicsSceneDragDropEvent * event)
|
||||
{
|
||||
event->ignore();
|
||||
d->hoverEffect(true);
|
||||
update();
|
||||
|
||||
QGraphicsWidget::dragEnterEvent(event);
|
||||
}
|
||||
|
||||
void IconWidget::dragLeaveEvent(QGraphicsSceneDragDropEvent * event)
|
||||
{
|
||||
// d->states &= ~IconWidgetPrivate::HoverState; // Will be set once progress is zero again ...
|
||||
d->hoverEffect(false);
|
||||
update();
|
||||
|
||||
QGraphicsWidget::dragLeaveEvent(event);
|
||||
}
|
||||
|
||||
void IconWidget::setPressed(bool pressed)
|
||||
{
|
||||
if (pressed) {
|
||||
|
@ -283,6 +283,9 @@ protected:
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
|
||||
void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
|
||||
void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
|
||||
|
||||
public:
|
||||
/**
|
||||
* @internal
|
||||
|
Loading…
Reference in New Issue
Block a user