From 9c6358396e8a60a3043cc24c01027c29a888c73e Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Mon, 26 Nov 2007 22:06:07 +0000 Subject: [PATCH] SVN_SILENT: '.color()' -> get QColor not QBrush (Qt seems to do this implicitly, but let's be explicit), also use stored color instead of doing palette.window().color() many times, especially as we already stored it svn path=/trunk/KDE/kdebase/workspace/; revision=742003 --- clients/oxygen/oxygenclient.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 91c2867cd4..049ebc7100 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -250,7 +250,7 @@ void OxygenClient::paintEvent(QPaintEvent *e) int x,y,w,h; QRect frame = widget()->frameGeometry(); - QColor color = palette.window(); + QColor color = palette.window().color(); const int titleHeight = layoutMetric(LM_TitleHeight); const int titleTop = layoutMetric(LM_TitleEdgeTop) + frame.top(); @@ -300,8 +300,8 @@ void OxygenClient::paintEvent(QPaintEvent *e) frame.adjust(1,1,-1,-1); frame.getRect(&x, &y, &w, &h); - QColor light = helper_.calcLightColor(palette.window()); - QColor dark = helper_.calcDarkColor(palette.window()); + QColor light = helper_.calcLightColor(color); + QColor dark = helper_.calcDarkColor(color); dark.setAlpha(120); if(!isActive()) { @@ -335,8 +335,8 @@ void OxygenClient::paintEvent(QPaintEvent *e) if(maximized) return; - light = helper_.calcLightColor(helper_.backgroundTopColor(palette.window())); - dark = helper_.calcDarkColor(palette.window()); + light = helper_.calcLightColor(helper_.backgroundTopColor(color)); + dark = helper_.calcDarkColor(color); painter.setBrush(Qt::NoBrush); @@ -357,7 +357,7 @@ void OxygenClient::paintEvent(QPaintEvent *e) painter.drawLine(QPointF(x+4, y+0.6), QPointF(x+w-4, y+0.6)); lg = QLinearGradient(0.0, 1.5, 0.0, 4.5); lg.setColorAt(0, light); - light = helper_.calcLightColor(helper_.backgroundBottomColor(palette.window())); + light = helper_.calcLightColor(helper_.backgroundBottomColor(color)); lg.setColorAt(1, light); painter.setPen(QPen(lg, 1.2)); painter.drawArc(QRectF(x+0.6, y+0.6, 9, 9),90*16, 90*16);