add button text and button background colors

accessible by the ButtonTextColor and ButtonBackgroundColor color roles

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=842203
This commit is contained in:
Marco Martin 2008-08-04 21:23:40 +00:00
parent fba82f41bc
commit 37be252250
3 changed files with 6 additions and 4 deletions

View File

@ -239,7 +239,7 @@ void NativeTabBar::paintEvent(QPaintEvent *event)
// draw tab text
if (i == currentIndex() && d->animProgress == 1) {
//FIXME: theme will need a ButtonColor and ButtonTextColor
painter.setPen(Plasma::Theme::defaultTheme()->color(Theme::BackgroundColor));
painter.setPen(Plasma::Theme::defaultTheme()->color(Theme::ButtonTextColor));
} else {
QColor color(Plasma::Theme::defaultTheme()->color(Theme::TextColor));
if (!isTabEnabled(i)) {

View File

@ -60,7 +60,9 @@ class PLASMA_EXPORT Theme : public QObject
{
TextColor = 0 /**< the text color to be used by items resting on the background */,
HighlightColor = 1 /**< the text higlight color to be used by items resting on the background */,
BackgroundColor = 2 /**< the default background color */
BackgroundColor = 2 /**< the default background color */,
ButtonTextColor = 4 /** text color for buttons */,
ButtonBackgroundColor = 8 /** background color for buttons*/
};
enum FontRole

View File

@ -302,8 +302,8 @@ void PushButton::paint(QPainter *painter,
d->background->paintPanel(painter);
}
//FIXME: theme will need a ButtonColor and ButtonTextColor
painter->setPen(Plasma::Theme::defaultTheme()->color(Theme::BackgroundColor));
painter->setPen(Plasma::Theme::defaultTheme()->color(Theme::ButtonTextColor));
if (nativeWidget()->isDown()) {