set null icons on the widgets after been put in a proxy.
would hopefully cause a bit less pixmap usage svn path=/trunk/KDE/kdelibs/; revision=1149631
This commit is contained in:
parent
b2d37c0604
commit
748d85362c
@ -103,6 +103,7 @@ CheckBox::CheckBox(QGraphicsWidget *parent)
|
||||
QCheckBox *native = new QCheckBox;
|
||||
connect(native, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool)));
|
||||
setWidget(native);
|
||||
native->setWindowIcon(QIcon());
|
||||
d->setPalette();
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
connect(Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(setPalette()));
|
||||
|
@ -161,6 +161,7 @@ void ComboBox::setNativeWidget(KComboBox *nativeWidget)
|
||||
this, SIGNAL(textChanged(const QString &)));
|
||||
|
||||
setWidget(nativeWidget);
|
||||
nativeWidget->setWindowIcon(QIcon());
|
||||
|
||||
nativeWidget->setAttribute(Qt::WA_NoSystemBackground);
|
||||
nativeWidget->setStyle(d->style.data());
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <QGroupBox>
|
||||
#include <QPainter>
|
||||
#include <QIcon>
|
||||
|
||||
#include <kmimetype.h>
|
||||
|
||||
@ -67,6 +68,7 @@ GroupBox::GroupBox(QGraphicsWidget *parent)
|
||||
{
|
||||
QGroupBox *native = new QGroupBox;
|
||||
setWidget(native);
|
||||
native->setWindowIcon(QIcon());
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
connect(Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(setPalette()));
|
||||
}
|
||||
|
@ -125,6 +125,7 @@ Label::Label(QGraphicsWidget *parent)
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
native->setWordWrap(true);
|
||||
setWidget(native);
|
||||
native->setWindowIcon(QIcon());
|
||||
d->setPalette();
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "lineedit.h"
|
||||
|
||||
#include <QPainter>
|
||||
|
||||
#include <QIcon>
|
||||
#include <QGraphicsSceneResizeEvent>
|
||||
|
||||
#include <klineedit.h>
|
||||
@ -146,6 +146,7 @@ void LineEdit::setNativeWidget(KLineEdit *nativeWidget)
|
||||
|
||||
nativeWidget->setWindowFlags(nativeWidget->windowFlags()|Qt::BypassGraphicsProxyWidget);
|
||||
setWidget(nativeWidget);
|
||||
nativeWidget->setWindowIcon(QIcon());
|
||||
|
||||
nativeWidget->setAttribute(Qt::WA_NoSystemBackground);
|
||||
nativeWidget->setStyle(d->style.data());
|
||||
|
@ -179,6 +179,7 @@ PushButton::PushButton(QGraphicsWidget *parent)
|
||||
connect(native, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool)));
|
||||
setWidget(native);
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
native->setWindowIcon(QIcon());
|
||||
|
||||
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
|
||||
|
@ -96,6 +96,7 @@ RadioButton::RadioButton(QGraphicsWidget *parent)
|
||||
QRadioButton *native = new QRadioButton;
|
||||
connect(native, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool)));
|
||||
setWidget(native);
|
||||
native->setWindowIcon(QIcon());
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
connect(Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(setPalette()));
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ ScrollBar::ScrollBar(QGraphicsWidget *parent)
|
||||
scrollbar->setWindowFlags(scrollbar->windowFlags()|Qt::BypassGraphicsProxyWidget);
|
||||
scrollbar->setAttribute(Qt::WA_NoSystemBackground);
|
||||
setWidget(scrollbar);
|
||||
scrollbar->setWindowIcon(QIcon());
|
||||
d->style = Plasma::Style::sharedStyle();
|
||||
scrollbar->setStyle(d->style.data());
|
||||
|
||||
|
@ -63,6 +63,7 @@ Slider::Slider(QGraphicsWidget *parent)
|
||||
d->focusIndicator = new FocusIndicator(this, "widgets/slider");
|
||||
|
||||
setWidget(native);
|
||||
native->setWindowIcon(QIcon());
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
|
||||
d->background = new Plasma::FrameSvg(this);
|
||||
|
@ -88,6 +88,7 @@ SpinBox::SpinBox(QGraphicsWidget *parent)
|
||||
d->focusIndicator = new FocusIndicator(this, "widgets/lineedit");
|
||||
|
||||
setWidget(native);
|
||||
native->setWindowIcon(QIcon());
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
native->setAutoFillBackground(false);
|
||||
|
||||
|
@ -130,6 +130,7 @@ void TextEdit::setNativeWidget(KTextEdit *nativeWidget)
|
||||
connect(nativeWidget, SIGNAL(textChanged()), this, SIGNAL(textChanged()));
|
||||
|
||||
setWidget(nativeWidget);
|
||||
nativeWidget->setWindowIcon(QIcon());
|
||||
|
||||
nativeWidget->setAttribute(Qt::WA_NoSystemBackground);
|
||||
nativeWidget->setFrameShape(QFrame::NoFrame);
|
||||
|
@ -173,6 +173,7 @@ ToolButton::ToolButton(QGraphicsWidget *parent)
|
||||
connect(native, SIGNAL(pressed()), this, SIGNAL(pressed()));
|
||||
connect(native, SIGNAL(released()), this, SIGNAL(released()));
|
||||
setWidget(native);
|
||||
native->setWindowIcon(QIcon());
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
native->setAutoRaise(true);
|
||||
|
||||
|
@ -42,6 +42,7 @@ TreeView::TreeView(QGraphicsWidget *parent)
|
||||
{
|
||||
QTreeView *native = new QTreeView;
|
||||
setWidget(native);
|
||||
native->setWindowIcon(QIcon());
|
||||
native->setAttribute(Qt::WA_NoSystemBackground);
|
||||
native->setFrameStyle(QFrame::NoFrame);
|
||||
|
||||
|
@ -246,6 +246,7 @@ VideoWidget::VideoWidget(QGraphicsWidget *parent)
|
||||
|
||||
|
||||
setWidget(d->videoWidget);
|
||||
d->videoWidget->setWindowIcon(QIcon());
|
||||
setAcceptHoverEvents(true);
|
||||
|
||||
connect(d->media, SIGNAL(tick(qint64)), this, SIGNAL(tick(qint64)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user