From 9fcd3ad674ce6c7c8b7accf1b14fb0ac923c003e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 5 Mar 2008 17:48:45 +0000 Subject: [PATCH] Fix shaping - KCommonDecoration has a function where to do it, and I don't see the point in resetting the shape every time in paintEvent(). Partially fixes resizing problems with Qt4.4. svn path=/trunk/KDE/kdebase/workspace/; revision=782673 --- clients/oxygen/oxygenclient.cpp | 4 +--- clients/oxygen/oxygenclient.h | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index f0329f5a88..8566f47115 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -260,8 +260,6 @@ void OxygenClient::paintEvent(QPaintEvent *e) Q_UNUSED(e) if (!OxygenFactory::initialized()) return; - doShape(); - QPalette palette = widget()->palette(); QPainter painter(widget()); @@ -380,7 +378,7 @@ void OxygenClient::paintEvent(QPaintEvent *e) renderDot(&painter, QPointF(6.5, 2.5), 1.8); } -void OxygenClient::doShape() +void OxygenClient::updateWindowShape() { bool maximized = maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows(); int w=widget()->width(); diff --git a/clients/oxygen/oxygenclient.h b/clients/oxygen/oxygenclient.h index f7b2f9cb80..c235753758 100644 --- a/clients/oxygen/oxygenclient.h +++ b/clients/oxygen/oxygenclient.h @@ -48,12 +48,11 @@ public: virtual KCommonDecorationButton *createButton(::ButtonType type); virtual bool decorationBehaviour(DecorationBehaviour behaviour) const; virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const; - + virtual void updateWindowShape(); virtual void init(); private: void paintEvent(QPaintEvent *e); - void doShape(); QColor titlebarTextColor(const QPalette &palette); bool colorCacheInvalid_; QColor cachedTitlebarTextColor_;