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:
parent
fba82f41bc
commit
37be252250
@ -239,7 +239,7 @@ void NativeTabBar::paintEvent(QPaintEvent *event)
|
|||||||
// draw tab text
|
// draw tab text
|
||||||
if (i == currentIndex() && d->animProgress == 1) {
|
if (i == currentIndex() && d->animProgress == 1) {
|
||||||
//FIXME: theme will need a ButtonColor and ButtonTextColor
|
//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 {
|
} else {
|
||||||
QColor color(Plasma::Theme::defaultTheme()->color(Theme::TextColor));
|
QColor color(Plasma::Theme::defaultTheme()->color(Theme::TextColor));
|
||||||
if (!isTabEnabled(i)) {
|
if (!isTabEnabled(i)) {
|
||||||
|
4
theme.h
4
theme.h
@ -60,7 +60,9 @@ class PLASMA_EXPORT Theme : public QObject
|
|||||||
{
|
{
|
||||||
TextColor = 0 /**< the text color to be used by items resting on the background */,
|
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 */,
|
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
|
enum FontRole
|
||||||
|
@ -302,8 +302,8 @@ void PushButton::paint(QPainter *painter,
|
|||||||
d->background->paintPanel(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()) {
|
if (nativeWidget()->isDown()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user