|
[Amarok] Fix indentation: msg#12761kde-commits
commit 9c40ebdb6a5b98046532d02ac1cdefced06e61f2 Author: Riccardo Iaconelli <riccardo@xxxxxxx> AuthorDate: Mon Jul 27 20:34:19 2009 +0200 Commit: Riccardo Iaconelli <riccardo@xxxxxxx> CommitDate: Fri Jul 31 11:06:00 2009 +0200 Fix indentation Signed-off-by: Riccardo Iaconelli <riccardo@xxxxxxx> diff --git a/src/context/Applet.cpp b/src/context/Applet.cpp index 3087885..8fc2fa6 100644 --- a/src/context/Applet.cpp +++ b/src/context/Applet.cpp @@ -92,35 +92,35 @@ Context::Applet::truncateTextToFit( QString text, const QFont& font, const QRect void Context::Applet::drawRoundedRectAroundText( QPainter* p, QGraphicsSimpleTextItem* t ) { - p->save(); - p->setRenderHint( QPainter::Antialiasing ); - - // Paint in integer coordinates, align to grid - QRectF rect = t->boundingRect(); - QPointF pos = t->pos(); - rect.setX( qRound( rect.x() ) ); - rect.setY( qRound( rect.y() ) ); - rect.setHeight( qRound( rect.height() ) ); - rect.setWidth( qRound( rect.width() ) ); - rect.moveTopLeft( t->pos() ); - pos.setX( qRound( pos.x() ) ); - pos.setY( qRound( pos.y() ) ); - rect.moveTopLeft( pos ); - rect.adjust( -5, -2, 5, 2 ); - - p->translate( 0.5, 0.5 ); - - QPainterPath path; - path.addRoundedRect( rect, 3, 3 ); - QColor col = PaletteHandler::highlightColor().lighter( 150 ); - col.setAlphaF( col.alphaF() * 0.7 ); - p->fillPath( path, col ); - - col = PaletteHandler::highlightColor( 0.3, 0.5 ); - col.setAlphaF( col.alphaF() * 0.7 ); - p->setPen( col ); - p->drawRoundedRect( rect, 3, 3 ); - p->restore(); + p->save(); + p->setRenderHint( QPainter::Antialiasing ); + + // Paint in integer coordinates, align to grid + QRectF rect = t->boundingRect(); + QPointF pos = t->pos(); + rect.setX( qRound( rect.x() ) ); + rect.setY( qRound( rect.y() ) ); + rect.setHeight( qRound( rect.height() ) ); + rect.setWidth( qRound( rect.width() ) ); + rect.moveTopLeft( t->pos() ); + pos.setX( qRound( pos.x() ) ); + pos.setY( qRound( pos.y() ) ); + rect.moveTopLeft( pos ); + rect.adjust( -5, -2, 5, 2 ); + + p->translate( 0.5, 0.5 ); + + QPainterPath path; + path.addRoundedRect( rect, 3, 3 ); + QColor col = PaletteHandler::highlightColor().lighter( 150 ); + col.setAlphaF( col.alphaF() * 0.7 ); + p->fillPath( path, col ); + + col = PaletteHandler::highlightColor( 0.3, 0.5 ); + col.setAlphaF( col.alphaF() * 0.7 ); + p->setPen( col ); + p->drawRoundedRect( rect, 3, 3 ); + p->restore(); } void
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |