don't expand unless we actually cross the threshold; this prevents, e.g. expanding when closing a window or moving from a window title bar to the canvas when the title bar overlaps the toolbox

CCMAIL:panel-devel@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=781885
This commit is contained in:
Aaron J. Seigo 2008-03-03 19:53:13 +00:00
parent c1e480f20c
commit ddc2f0e6e5

View File

@ -159,6 +159,18 @@ void DesktopToolbox::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
QGraphicsItem::hoverEnterEvent(event); QGraphicsItem::hoverEnterEvent(event);
return; return;
} }
QPainterPath path;
int size = m_size + (int)m_animFrame - 5;
path.moveTo(m_size*2, 0);
path.arcTo(QRectF(m_size * 2 - size, -size, size*2, size*2), 180, 90);
path.lineTo(m_size*2, 0);
if (path.contains(event->pos())) {
QGraphicsItem::hoverEnterEvent(event);
return;
}
showToolbox(); showToolbox();
QGraphicsItem::hoverEnterEvent(event); QGraphicsItem::hoverEnterEvent(event);
} }