Fix icon activation glich under Qt4

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1222999 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 28042add4d
commit 5194b175a4

@ -785,7 +785,7 @@ void KNotify::restartedArtsd()
#ifndef WITHOUT_ARTS #ifndef WITHOUT_ARTS
delete d->audioManager; delete d->audioManager;
d->audioManager = new KAudioManagerPlay( soundServer ); d->audioManager = new KAudioManagerPlay( soundServer );
d->audioManager->setTitle( i18n( "KDE System Notifications" ) ); d->audioManager->setTitle( i18n( "Trinity System Notifications" ) );
d->audioManager->setAutoRestoreID( "KNotify Aman Play" ); d->audioManager->setAutoRestoreID( "KNotify Aman Play" );
#endif #endif
} }

@ -20,9 +20,20 @@
#include "config.h" #include "config.h"
// #ifdef QTRANSLATOR_H
// #error qtranslator.h was already included
// #endif // QTRANSLATOR_H
//
// #ifdef TQTRANSLATOR_H
// #error tqtranslator.h was already included
// #endif // TQTRANSLATOR_H
#undef QT_NO_TRANSLATION #undef QT_NO_TRANSLATION
#undef TQT_NO_TRANSLATION
#include <tqtranslator.h> #include <tqtranslator.h>
#include "kapplication.h"
#define QT_NO_TRANSLATION #define QT_NO_TRANSLATION
#define TQT_NO_TRANSLATION
#include <tqdir.h> #include <tqdir.h>
#include <tqptrcollection.h> #include <tqptrcollection.h>
#include <tqwidgetlist.h> #include <tqwidgetlist.h>
@ -46,9 +57,6 @@
#include <tqsqlpropertymap.h> #include <tqsqlpropertymap.h>
#endif #endif
#undef QT_NO_TRANSLATION
#include "kapplication.h"
#define QT_NO_TRANSLATION
#include <kglobal.h> #include <kglobal.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <kdebug.h> #include <kdebug.h>

@ -784,7 +784,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
} }
uint actSpeed = KGlobalSettings::visualActivateSpeed(); 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. // Clip actCount to range 1..10.
@ -846,21 +846,23 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
if ((widget->rect().width() <= maxRect.width()) if ((widget->rect().width() <= maxRect.width())
|| (widget->rect().height() <= maxRect.height())) || (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(), pix = TQPixmap::grabWindow((TQApplication::desktop()->screen( -1 ))->winId(),
maxRect.x(), maxRect.x(),
maxRect.y(), maxRect.y(),
maxRect.width(), maxRect.width(),
maxRect.height()); maxRect.height());
p = new TQPainter(TQApplication::desktop()->screen( -1 ), TRUE);
} else } else
{ {
// not as ugly as drawing directly to the screen // 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, pix = TQPixmap::grabWidget(widget,
maxRect.x(), maxRect.x(),
maxRect.y(), maxRect.y(),
maxRect.width(), maxRect.width(),
maxRect.height()); maxRect.height());
p = new TQPainter(widget);
} }
uchar deltaAlpha = 255 / (actCount * 1.2); uchar deltaAlpha = 255 / (actCount * 1.2);

Loading…
Cancel
Save