From 4798c5e3a8050a26fd443d3efa74eaa6242116ab Mon Sep 17 00:00:00 2001 From: Andre Duffeck Date: Sun, 22 Jul 2007 11:37:21 +0000 Subject: [PATCH] Center flashed pixmap. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=690856 --- widgets/flash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/flash.cpp b/widgets/flash.cpp index 6ce73dcee..2ce96fa17 100644 --- a/widgets/flash.cpp +++ b/widgets/flash.cpp @@ -172,7 +172,7 @@ QPixmap Flash::renderPixmap() painter.setFont( d->font ); painter.drawText( QRect( 0, 0, pm.width(), pm.height() ), d->text, Qt::AlignHCenter | Qt::AlignVCenter); } else if( d->type == Private::Pixmap ) { - painter.drawPixmap( QPoint( 0, 0 ), d->pixmap ); + painter.drawPixmap( QPoint( (pm.width() - d->pixmap.width())/2, (pm.height() - d->pixmap.height())/2 ), d->pixmap ); } return pm; }