From 748d85362cc9e6831182cea6b48a43bdb6ea02bf Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 13 Jul 2010 21:32:07 +0000 Subject: [PATCH] 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 --- widgets/checkbox.cpp | 1 + widgets/combobox.cpp | 1 + widgets/groupbox.cpp | 2 ++ widgets/label.cpp | 1 + widgets/lineedit.cpp | 3 ++- widgets/pushbutton.cpp | 1 + widgets/radiobutton.cpp | 1 + widgets/scrollbar.cpp | 1 + widgets/slider.cpp | 1 + widgets/spinbox.cpp | 1 + widgets/textedit.cpp | 1 + widgets/toolbutton.cpp | 1 + widgets/treeview.cpp | 1 + widgets/videowidget.cpp | 1 + 14 files changed, 16 insertions(+), 1 deletion(-) diff --git a/widgets/checkbox.cpp b/widgets/checkbox.cpp index 308d0b0fd..ca53a687e 100644 --- a/widgets/checkbox.cpp +++ b/widgets/checkbox.cpp @@ -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())); diff --git a/widgets/combobox.cpp b/widgets/combobox.cpp index 2939dddbe..5436e9116 100644 --- a/widgets/combobox.cpp +++ b/widgets/combobox.cpp @@ -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()); diff --git a/widgets/groupbox.cpp b/widgets/groupbox.cpp index 2a77ac372..88b257565 100644 --- a/widgets/groupbox.cpp +++ b/widgets/groupbox.cpp @@ -21,6 +21,7 @@ #include #include +#include #include @@ -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())); } diff --git a/widgets/label.cpp b/widgets/label.cpp index 280d42c9f..ea6907202 100644 --- a/widgets/label.cpp +++ b/widgets/label.cpp @@ -125,6 +125,7 @@ Label::Label(QGraphicsWidget *parent) native->setAttribute(Qt::WA_NoSystemBackground); native->setWordWrap(true); setWidget(native); + native->setWindowIcon(QIcon()); d->setPalette(); } diff --git a/widgets/lineedit.cpp b/widgets/lineedit.cpp index 113824f27..935cbe4b1 100644 --- a/widgets/lineedit.cpp +++ b/widgets/lineedit.cpp @@ -20,7 +20,7 @@ #include "lineedit.h" #include - +#include #include #include @@ -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()); diff --git a/widgets/pushbutton.cpp b/widgets/pushbutton.cpp index 95452b815..c0b2a15f9 100644 --- a/widgets/pushbutton.cpp +++ b/widgets/pushbutton.cpp @@ -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); diff --git a/widgets/radiobutton.cpp b/widgets/radiobutton.cpp index b2114260c..1612700fb 100644 --- a/widgets/radiobutton.cpp +++ b/widgets/radiobutton.cpp @@ -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())); } diff --git a/widgets/scrollbar.cpp b/widgets/scrollbar.cpp index 44fb824c1..ed16bd1f2 100644 --- a/widgets/scrollbar.cpp +++ b/widgets/scrollbar.cpp @@ -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()); diff --git a/widgets/slider.cpp b/widgets/slider.cpp index 1b40d1450..2698e9e4b 100644 --- a/widgets/slider.cpp +++ b/widgets/slider.cpp @@ -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); diff --git a/widgets/spinbox.cpp b/widgets/spinbox.cpp index 3f9436f1e..9fbe3a795 100644 --- a/widgets/spinbox.cpp +++ b/widgets/spinbox.cpp @@ -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); diff --git a/widgets/textedit.cpp b/widgets/textedit.cpp index e7e6090ca..bd23fb72d 100644 --- a/widgets/textedit.cpp +++ b/widgets/textedit.cpp @@ -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); diff --git a/widgets/toolbutton.cpp b/widgets/toolbutton.cpp index 9dfcf4d08..0e4f74b18 100644 --- a/widgets/toolbutton.cpp +++ b/widgets/toolbutton.cpp @@ -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); diff --git a/widgets/treeview.cpp b/widgets/treeview.cpp index c509c2916..ca7706602 100644 --- a/widgets/treeview.cpp +++ b/widgets/treeview.cpp @@ -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); diff --git a/widgets/videowidget.cpp b/widgets/videowidget.cpp index b7d970297..fab169e16 100644 --- a/widgets/videowidget.cpp +++ b/widgets/videowidget.cpp @@ -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)));