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
This commit is contained in:
parent
6c5accc2ea
commit
9e6e735c86
2 changed files with 3 additions and 4 deletions
|
@ -156,6 +156,9 @@ void OxygenButton::paintEvent(QPaintEvent *)
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
QPalette pal = palette(); // de-const-ify
|
QPalette pal = palette(); // de-const-ify
|
||||||
|
|
||||||
|
|
||||||
|
helper_.renderWindowBackground(&painter, this->rect(), this);
|
||||||
|
|
||||||
if (type_ == ButtonMenu) {
|
if (type_ == ButtonMenu) {
|
||||||
// we paint the mini icon (which is 16 pixels high)
|
// we paint the mini icon (which is 16 pixels high)
|
||||||
int dx = (width() - 16) / 2;
|
int dx = (width() - 16) / 2;
|
||||||
|
|
|
@ -89,10 +89,6 @@ void OxygenClient::init()
|
||||||
|
|
||||||
widget()->setAutoFillBackground(false);
|
widget()->setAutoFillBackground(false);
|
||||||
widget()->setAttribute(Qt::WA_OpaquePaintEvent);
|
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
|
bool OxygenClient::decorationBehaviour(DecorationBehaviour behaviour) const
|
||||||
|
|
Loading…
Reference in a new issue