Fixes the year toolbutton hover bug in Plasma::Calendar.
svn path=/trunk/KDE/kdelibs/; revision=1147175
This commit is contained in:
parent
b94b7b1d54
commit
3cf1e32282
@ -445,6 +445,17 @@ void ToolButton::changeEvent(QEvent *event)
|
||||
QGraphicsProxyWidget::changeEvent(event);
|
||||
}
|
||||
|
||||
QVariant ToolButton::itemChange(GraphicsItemChange change, const QVariant &value)
|
||||
{
|
||||
//If the widget is hidden while it's hovered and then we show it again
|
||||
//we have to disable the hover otherwise it will remain hovered.
|
||||
if (change == ItemVisibleHasChanged){
|
||||
d->underMouse = false;
|
||||
}
|
||||
|
||||
return QGraphicsProxyWidget::itemChange(change, value);
|
||||
}
|
||||
|
||||
QSizeF ToolButton::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
|
||||
{
|
||||
QSizeF hint = QGraphicsProxyWidget::sizeHint(which, constraint);
|
||||
|
@ -183,6 +183,7 @@ protected:
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
void changeEvent(QEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint) const;
|
||||
|
||||
private slots:
|
||||
|
Loading…
Reference in New Issue
Block a user