use a text color from plasma color scheme when the lineedit is not styled
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=764029
This commit is contained in:
parent
4b8a510837
commit
d3b203777c
@ -26,7 +26,10 @@
|
|||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
|
|
||||||
#include <KDebug>
|
#include <KDebug>
|
||||||
|
#include <KColorScheme>
|
||||||
|
#include <KApplication>
|
||||||
|
|
||||||
|
#include <plasma/theme.h>
|
||||||
#include "plasma/layouts/layout.h"
|
#include "plasma/layouts/layout.h"
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
@ -110,6 +113,15 @@ bool LineEdit::multiLine() const
|
|||||||
void LineEdit::setStyled(bool style)
|
void LineEdit::setStyled(bool style)
|
||||||
{
|
{
|
||||||
d->styled = style;
|
d->styled = style;
|
||||||
|
|
||||||
|
if (style) {
|
||||||
|
QColor textColor = KColorScheme(QPalette::Active, KColorScheme::Window,
|
||||||
|
Plasma::Theme::self()->colors()).foreground().color();
|
||||||
|
|
||||||
|
setDefaultTextColor(textColor);
|
||||||
|
} else {
|
||||||
|
setDefaultTextColor(kapp->palette().color(QPalette::Text));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LineEdit::styled() const
|
bool LineEdit::styled() const
|
||||||
|
Loading…
Reference in New Issue
Block a user