From 9e6e735c86d53008b96228f3c4dbee2b37910b45 Mon Sep 17 00:00:00 2001 From: Casper Boemann Date: Sat, 3 May 2008 19:41:10 +0000 Subject: [PATCH] save memery by drawing directly onto screen and use the helper routine to correctly draw gradient behind buttons svn path=/trunk/KDE/kdebase/workspace/; revision=803670 --- clients/oxygen/oxygenbutton.cpp | 3 +++ clients/oxygen/oxygenclient.cpp | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/clients/oxygen/oxygenbutton.cpp b/clients/oxygen/oxygenbutton.cpp index 9cf561d87c..8176788d4b 100644 --- a/clients/oxygen/oxygenbutton.cpp +++ b/clients/oxygen/oxygenbutton.cpp @@ -156,6 +156,9 @@ void OxygenButton::paintEvent(QPaintEvent *) QPainter painter(this); QPalette pal = palette(); // de-const-ify + + helper_.renderWindowBackground(&painter, this->rect(), this); + if (type_ == ButtonMenu) { // we paint the mini icon (which is 16 pixels high) int dx = (width() - 16) / 2; diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 675ae69332..ec330c8ce6 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -89,10 +89,6 @@ void OxygenClient::init() widget()->setAutoFillBackground(false); widget()->setAttribute(Qt::WA_OpaquePaintEvent); -#ifdef __GNUC__ -#warning This wastes quite a lot of memory. -#endif - widget()->setAttribute(Qt::WA_PaintOnScreen, false); } bool OxygenClient::decorationBehaviour(DecorationBehaviour behaviour) const