don't animate pressed buttons, avoids flicker
svn path=/trunk/KDE/kdelibs/; revision=882058
This commit is contained in:
parent
271b20924e
commit
0c5a17b624
@ -355,6 +355,10 @@ void PushButton::paint(QPainter *painter,
|
|||||||
|
|
||||||
void PushButton::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
void PushButton::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||||
{
|
{
|
||||||
|
if (nativeWidget()->isDown()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const int FadeInDuration = 75;
|
const int FadeInDuration = 75;
|
||||||
|
|
||||||
if (d->animId != -1) {
|
if (d->animId != -1) {
|
||||||
@ -371,6 +375,10 @@ void PushButton::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
|||||||
|
|
||||||
void PushButton::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
void PushButton::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||||
{
|
{
|
||||||
|
if (nativeWidget()->isDown()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const int FadeOutDuration = 150;
|
const int FadeOutDuration = 150;
|
||||||
|
|
||||||
if (d->animId != -1) {
|
if (d->animId != -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user