|
[Amarok] fix bg painted by plasma, make applet's bg look go: msg#12762kde-commits
commit c9741815a7b4bf28feabad84c8a0a6c362002bbb Author: Riccardo Iaconelli <riccardo@xxxxxxx> AuthorDate: Mon Jul 27 20:40:26 2009 +0200 Commit: Riccardo Iaconelli <riccardo@xxxxxxx> CommitDate: Fri Jul 31 11:06:00 2009 +0200 fix bg painted by plasma, make applet's bg look good. The bg painted by plasma will actually be fixed with kdelibs of KDE >= 4.3. For older versions it will look better than now anyways. :-) Signed-off-by: Riccardo Iaconelli <riccardo@xxxxxxx> diff --git a/src/context/Applet.cpp b/src/context/Applet.cpp index 8fc2fa6..1f5e3f7 100644 --- a/src/context/Applet.cpp +++ b/src/context/Applet.cpp @@ -41,6 +41,7 @@ Context::Applet::Applet( QObject * parent, const QVariantList& args ) , m_standardPadding( 6.0 ) { connect ( Plasma::Animator::self(), SIGNAL(customAnimationFinished ( int ) ), this, SLOT( animateEnd( int ) ) ); + setBackgroundHints(NoBackground); } Context::Applet::~Applet( ) @@ -130,17 +131,19 @@ Context::Applet::addGradientToAppletBackground( QPainter* p ) // draw non-gradient backround. going for elegance and style p->save(); QPainterPath path; - path.addRoundedRect( boundingRect().adjusted( 0, 1, -1, -1 ), 3, 3 ); + path.addRoundedRect( boundingRect().adjusted( 1, 1, -2, -2 ), 6, 6 ); //p->fillPath( path, gradient ); QColor highlight = PaletteHandler::highlightColor( 0.4, 1.05 ); - highlight.setAlpha( 120 ); + highlight.setAlphaF( highlight.alphaF() * 0.5 ); p->fillPath( path, highlight ); p->restore(); p->save(); - QColor col = PaletteHandler::highlightColor( 0.3, .7 ); + p->translate( 0.5, 0.5 ); + QColor col = PaletteHandler::highlightColor( 0.3, 0.5 ); + col.setAlphaF( col.alphaF() * 0.7 ); p->setPen( col ); - p->drawRoundedRect( boundingRect().adjusted( 2, 2, -2, -2 ), 3, 3 ); + p->drawRoundedRect( boundingRect().adjusted( 1, 1, -2, -2 ), 6, 6 ); p->restore(); }
|
|
||||||||||||||||||||||||||
| News | Mail Home | sitemap | FAQ | advertise |