diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-28 03:20:39 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-28 03:20:39 +0000 |
commit | 5194b175a4820c853f3669515eebab50dc088f20 (patch) | |
tree | 6b0db4dd2c768b00e0b665d6aa0e35a8784637bb /kdecore/kiconeffect.cpp | |
parent | 28042add4dfb7afb6559f8d890f56c22bfa632e5 (diff) | |
download | tdelibs-5194b175a4820c853f3669515eebab50dc088f20.tar.gz tdelibs-5194b175a4820c853f3669515eebab50dc088f20.zip |
Fix icon activation glich under Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1222999 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/kiconeffect.cpp')
-rw-r--r-- | kdecore/kiconeffect.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kdecore/kiconeffect.cpp b/kdecore/kiconeffect.cpp index 3d5833578..b34ca1e97 100644 --- a/kdecore/kiconeffect.cpp +++ b/kdecore/kiconeffect.cpp @@ -784,7 +784,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap) } uint actSpeed = KGlobalSettings::visualActivateSpeed(); - uint actCount = QMIN(rect.width(), rect.height()) / 4; + uint actCount = TQMIN(rect.width(), rect.height()) / 4; // Clip actCount to range 1..10. @@ -846,21 +846,23 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap) if ((widget->rect().width() <= maxRect.width()) || (widget->rect().height() <= maxRect.height())) { - p = new TQPainter(TQApplication::desktop()->screen( -1 ), TRUE); +// p = new TQPainter(TQApplication::desktop()->screen( -1 ), TRUE); // WARNING: This was done in Qt3. It only worked in this placement due to a glitch in Qt3; it has therefore been moved below grabWidget, where it should have been in the first place. pix = TQPixmap::grabWindow((TQApplication::desktop()->screen( -1 ))->winId(), maxRect.x(), maxRect.y(), maxRect.width(), maxRect.height()); + p = new TQPainter(TQApplication::desktop()->screen( -1 ), TRUE); } else { // not as ugly as drawing directly to the screen - p = new TQPainter(widget); +// p = new TQPainter(widget); // WARNING: This was done in Qt3. See above. pix = TQPixmap::grabWidget(widget, maxRect.x(), maxRect.y(), maxRect.width(), maxRect.height()); + p = new TQPainter(widget); } uchar deltaAlpha = 255 / (actCount * 1.2); |