[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/multimedia/amarok/src/context/toolbar
From: Nikolaj Hald Nielsen <nhnFreespirit () gmail ! com>
Date: 2009-07-15 13:29:04
Message-ID: 1247664544.464231.19864.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 997175 by nhnielsen:
As pointed out by lfranchi, there are smarter ways to do this! :-)
M +4 -17 AppletToolbar.cpp
--- trunk/extragear/multimedia/amarok/src/context/toolbar/AppletToolbar.cpp \
#997174:997175 @@ -79,27 +79,14 @@
QPalette p;
painter->fillRect( boundingRect(), p.brush( QPalette::Window ) ); // remove \
white edges behind the toolbar QColor col = PaletteHandler::highlightColor();
- qreal radius = 6;
+ qreal radius = 6;
+
QPainterPath outline;
- outline.moveTo( radius, 0);
- outline.lineTo( boundingRect().width() - radius, 0 );
- outline.quadTo( boundingRect().width(), 0,
- boundingRect().width(), radius );
- outline.lineTo( boundingRect().width(), boundingRect().height() - radius );
- outline.quadTo( boundingRect().width(), boundingRect().height(),
- boundingRect().width() - radius, boundingRect().height() );
- outline.lineTo( radius, boundingRect().height() );
- outline.quadTo( 0, boundingRect().height() ,
- 0, boundingRect().height() - radius );
- outline.lineTo( 0, radius );
- outline.quadTo( 0, 0,
- radius, 0 );
+ outline.addRoundedRect( boundingRect(), 6, 6 );
+ painter->fillPath( outline, QBrush( col ) );
- painter->fillPath( outline, col );
-
painter->restore();
-
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic