this is not a Plasma::Widget. now styling is back. looks as nasty as ever, though.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=773813
This commit is contained in:
parent
c7fe098480
commit
22c8b77b34
@ -64,14 +64,14 @@ LineEdit::~LineEdit()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void LineEdit::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
void LineEdit::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
{
|
||||
QStyleOptionFrameV2 panel;
|
||||
panel.initFrom(widget);
|
||||
panel.state = option->state;
|
||||
panel.rect = boundingRect().toRect();
|
||||
if (d->styled && widget) {
|
||||
QStyleOptionFrameV2 panel;
|
||||
panel.initFrom(widget);
|
||||
panel.state = option->state;
|
||||
panel.rect = boundingRect().toRect();
|
||||
|
||||
if(d->styled) {
|
||||
widget->style()->drawPrimitive(QStyle::PE_PanelLineEdit, &panel, painter, widget);
|
||||
widget->style()->drawPrimitive(QStyle::PE_FrameLineEdit, &panel, painter, widget);
|
||||
}
|
||||
@ -115,12 +115,9 @@ void LineEdit::setStyled(bool 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));
|
||||
} else {
|
||||
setDefaultTextColor(Plasma::Theme::self()->textColor());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ class PLASMA_EXPORT LineEdit : public QGraphicsTextItem, public LayoutItem
|
||||
explicit LineEdit(QGraphicsItem *parent = 0);
|
||||
~LineEdit();
|
||||
|
||||
void paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
|
||||
|
||||
Qt::Orientations expandingDirections() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user