1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-24 01:39:42 +01:00

* Added new color roles for selection foreground / background.

This commit is contained in:
Christian Muehlhaeuser 2013-01-05 02:17:09 +01:00
parent 89a8869be8
commit b2ef2552f8
2 changed files with 10 additions and 4 deletions

View File

@ -200,11 +200,15 @@ drawBackgroundAndNumbers( QPainter* painter, const QString& text, const QRect& f
void
drawQueryBackground( QPainter* p, const QPalette& palette, const QRect& r, qreal lightnessFactor )
drawQueryBackground( QPainter* p, const QRect& r )
{
p->setPen( palette.highlight().color().lighter( lightnessFactor * 100 ) );
p->setBrush( palette.highlight().color().lighter( lightnessFactor * 100 ) );
p->save();
p->setPen( Colors::SELECTION_BACKGROUND );
p->setBrush( Colors::SELECTION_BACKGROUND );
p->drawRoundedRect( r, 4.0, 4.0 );
p->restore();
}

View File

@ -41,7 +41,7 @@ class QScrollBar;
namespace TomahawkUtils
{
DLLEXPORT void drawQueryBackground( QPainter* p, const QPalette& palette, const QRect& r, qreal lightnessFactor = 1 );
DLLEXPORT void drawQueryBackground( QPainter* p, const QRect& r );
DLLEXPORT QWidget* tomahawkWindow();
/// Platform-specific bringing tomahawk mainwindow to front, b/c qt's activate() and such don't seem to work well enough for us
DLLEXPORT void bringToFront();
@ -82,6 +82,8 @@ namespace TomahawkUtils
static const QColor GROUP_HEADER = QColor( "#637180" );
static const QColor NOW_PLAYING_ITEM = QColor( "#962c26" );
static const QColor NOW_PLAYING_ITEM_TEXT = QColor( "#ffffff" );
static const QColor SELECTION_BACKGROUND = QColor( "#962c26" );
static const QColor SELECTION_FOREGROUND = QColor( "#ffffff" );
}
static const int POPUP_ROUNDING_RADIUS = 6;