diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 0cf7fb0462..62afd93f18 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -907,40 +907,43 @@ namespace Oxygen if( compositingActive() ) frame.adjust(-1,-1, 1, 1); // shadow and resize handles - if( !isMaximized() ) + if( true ) { - - if( configuration().frameBorder() >= OxygenConfiguration::BorderTiny ) + if( !isMaximized() ) { + if( configuration().frameBorder() >= OxygenConfiguration::BorderTiny ) + { + helper().drawFloatFrame( + &painter, frame, backgroundPalette( widget(), palette ).color( widget()->backgroundRole() ), + !compositingActive(), isActive() && configuration().useOxygenShadows(), + KDecoration::options()->color(ColorTitleBar) + ); + + } else { + + // for tiny borders, use a frame that matches the titlebar only + QRect local( frame.topLeft(), QSize( frame.width(), layoutMetric(LM_TitleHeight) + layoutMetric(LM_TitleEdgeTop) ) ); + helper().drawFloatFrame( + &painter, local, backgroundPalette( widget(), palette ).color( widget()->backgroundRole() ), + false, isActive() && configuration().useOxygenShadows(), + KDecoration::options()->color(ColorTitleBar) + ); + } + + } else if( isShade() ) { + + // for shaded maximized windows adjust frame and draw the bottom part of it helper().drawFloatFrame( - &painter, frame, backgroundPalette( widget(), palette ).color( widget()->backgroundRole() ), - !compositingActive(), isActive() && configuration().useOxygenShadows(), - KDecoration::options()->color(ColorTitleBar) - ); - - } else { - - QRect local( frame.topLeft(), QSize( frame.width(), layoutMetric(LM_TitleHeight) + layoutMetric(LM_TitleEdgeTop) ) ); - helper().drawFloatFrame( - &painter, local, backgroundPalette( widget(), palette ).color( widget()->backgroundRole() ), - false, isActive() && configuration().useOxygenShadows(), + &painter, frame.adjusted( -4, 0, 4, 0 ), backgroundPalette( widget(), palette ).color( widget()->backgroundRole() ), + !compositingActive(), isActive(), KDecoration::options()->color(ColorTitleBar), - TileSet::Top + TileSet::Bottom ); + } - } else if( isShade() ) { - - // for shaded maximized windows adjust frame and draw the bottom part of it - helper().drawFloatFrame( - &painter, frame.adjusted( -4, 0, 4, 0 ), backgroundPalette( widget(), palette ).color( widget()->backgroundRole() ), - !compositingActive(), isActive(), - KDecoration::options()->color(ColorTitleBar), - TileSet::Bottom - ); - } if( configuration().frameBorder() >= OxygenConfiguration::BorderTiny ) @@ -955,8 +958,9 @@ namespace Oxygen { // Draw the 3-dots resize handles - qreal cenY = h / 2 + x + 0.5; - qreal posX = w + y - 2.5; + qreal cenY = h / 2 + y + 0.5; + qreal posX = w + x - 2.5; + painter.setPen(Qt::NoPen); painter.setBrush(QColor(0, 0, 0, 66)); renderDot(&painter, QPointF(posX, cenY - 3), 1.8); diff --git a/clients/oxygen/oxygenshadowcache.cpp b/clients/oxygen/oxygenshadowcache.cpp index 2f7804dfc5..9ffa35900e 100644 --- a/clients/oxygen/oxygenshadowcache.cpp +++ b/clients/oxygen/oxygenshadowcache.cpp @@ -290,21 +290,9 @@ namespace Oxygen // draw the corner of the window - actually all 4 corners as one circle // this is all fixedSize. Does not scale with shadow size QLinearGradient lg = QLinearGradient(0.0, size-4.5, 0.0, size+4.5); - if( key.frameBorder < Key::BorderAny ) - { - - lg.setColorAt(0.52, oxygenHelper()->backgroundTopColor(color)); - lg.setColorAt(1.0, oxygenHelper()->backgroundBottomColor(color) ); - - } else { - - QColor light = oxygenHelper()->calcLightColor( oxygenHelper()->backgroundTopColor(color) ); - QColor dark = oxygenHelper()->calcDarkColor( oxygenHelper()->backgroundBottomColor(color)); - - lg.setColorAt(0.52, light); - lg.setColorAt(1.0, dark); - - } + lg.setColorAt(0.0, oxygenHelper()->calcLightColor( oxygenHelper()->backgroundTopColor(color) )); + lg.setColorAt(0.52, oxygenHelper()->backgroundTopColor(color) ); + lg.setColorAt(1.0, oxygenHelper()->backgroundBottomColor(color) ); // draw ellipse. // note: special tricks are needed to cope with some rounding issues when size is not an integer.