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:
Marco Martin 2010-07-13 21:32:07 +00:00
parent b2d37c0604
commit 748d85362c
14 changed files with 16 additions and 1 deletions

View File

@ -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()));

View File

@ -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());

View File

@ -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()));
}

View File

@ -125,6 +125,7 @@ Label::Label(QGraphicsWidget *parent)
native->setAttribute(Qt::WA_NoSystemBackground);
native->setWordWrap(true);
setWidget(native);
native->setWindowIcon(QIcon());
d->setPalette();
}

View File

@ -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());

View File

@ -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);

View File

@ -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()));
}

View File

@ -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());

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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)));