From a21351b5a838962bceaf8e5e6985246f832c9269 Mon Sep 17 00:00:00 2001 From: Sandro Giessl Date: Sat, 25 Oct 2003 13:57:28 +0000 Subject: [PATCH] - Don't forget to update buttons on color changes... - Replaced repaint()s with update(). svn path=/trunk/kdeartwork/kwin-styles/plastik/; revision=261864 --- clients/plastik/plastikbutton.cpp | 2 +- clients/plastik/plastikclient.cpp | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/clients/plastik/plastikbutton.cpp b/clients/plastik/plastikbutton.cpp index 5dfeb3e13d..05bdfced45 100644 --- a/clients/plastik/plastikbutton.cpp +++ b/clients/plastik/plastikbutton.cpp @@ -156,7 +156,7 @@ void PlastikButton::setDeco() m_aDecoLight = recolorImage(&img, aDecoFgLight).smoothScale(width()-reduceW, height()-reduceH); m_iDecoLight = recolorImage(&img, iDecoFgLight).smoothScale(width()-reduceW, height()-reduceH); - this->repaint(); + this->update(); } void PlastikButton::setTipText(const QString &tip) { diff --git a/clients/plastik/plastikclient.cpp b/clients/plastik/plastikclient.cpp index f84d0ffcfe..9c04a4c34b 100644 --- a/clients/plastik/plastikclient.cpp +++ b/clients/plastik/plastikclient.cpp @@ -86,7 +86,7 @@ void PlastikClient::init() PlastikHandler::titleFontTool() : PlastikHandler::titleFont(); - createMainWidget(); + createMainWidget(WNoAutoErase); widget()->installEventFilter( this ); @@ -100,7 +100,7 @@ void PlastikClient::init() aCaptionBuffer = new QPixmap(); iCaptionBuffer = new QPixmap(); captionBufferDirty = true; - widget()->repaint(titleSpacer_->geometry(), false); + widget()->update(titleSpacer_->geometry()); } bool PlastikClient::isTool() @@ -113,7 +113,7 @@ bool PlastikClient::isTool() void PlastikClient::resizeEvent() { doShape(); - widget()->repaint(); + widget()->update(); } void PlastikClient::paintEvent(QPaintEvent*) @@ -407,14 +407,14 @@ void PlastikClient::paintEvent(QPaintEvent*) void PlastikClient::showEvent(QShowEvent *) { doShape(); - widget()->repaint(); + widget()->update(); } void PlastikClient::windowWrapperShowEvent(QShowEvent *) { doShape(); - widget()->repaint(); + widget()->update(); } void PlastikClient::mouseDoubleClickEvent(QMouseEvent *e) @@ -604,7 +604,7 @@ void PlastikClient::addButtons(QBoxLayout *layout, const QString& s, int buttonS void PlastikClient::captionChange() { captionBufferDirty = true; - widget()->repaint(titleSpacer_->geometry(), false); + widget()->update(titleSpacer_->geometry()); } void PlastikClient::reset( unsigned long changed ) @@ -615,7 +615,10 @@ void PlastikClient::reset( unsigned long changed ) delete_pixmaps(); create_pixmaps(); captionBufferDirty = true; - widget()->repaint(false); + widget()->update(); + for (int n=0; nupdate(); + } } else if (changed & SettingFont) { // font has changed -- update title height and font s_titleHeight = isTool() ? @@ -635,7 +638,7 @@ void PlastikClient::reset( unsigned long changed ) delete_pixmaps(); create_pixmaps(); captionBufferDirty = true; - widget()->repaint(false); + widget()->update(); } } @@ -699,15 +702,15 @@ void PlastikClient::iconChange() { if (m_button[MenuButton]) { - m_button[MenuButton]->repaint(false); + m_button[MenuButton]->update(); } } void PlastikClient::activeChange() { for (int n=0; nrepaint(false); - widget()->repaint(false); + if (m_button[n]) m_button[n]->update(); + widget()->update(); } void PlastikClient::maximizeChange()