From 066927ebfb2ce88ab54d0dc1d6ca2ed173775795 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Wed, 5 Oct 2011 19:56:00 +0200 Subject: [PATCH] More fine tuning of window borders in outline mode. --- clients/oxygen/oxygenclient.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 7a09794d89..d2fac8bffe 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -702,10 +702,14 @@ namespace Oxygen // adjustements to cope with shadow size and outline border. rect.adjust( -shadowSize, 0, shadowSize-1, 0 ); - if( configuration().frameBorder() > Configuration::BorderTiny && configuration().drawTitleOutline() && isActive() && !isMaximized() ) - { rect.adjust( HFRAMESIZE-1, 0, -HFRAMESIZE+1, 0 ); } + if( configuration().drawTitleOutline() && isActive() && !isMaximized() ) + { + if( configuration().frameBorder() == Configuration::BorderTiny ) rect.adjust( 1, 0, -1, 0 ); + else if( configuration().frameBorder() > Configuration::BorderTiny ) rect.adjust( HFRAMESIZE-1, 0, -HFRAMESIZE+1, 0 ); + } - helper().slab( color, 0, shadowSize )->render( rect, painter, TileSet::Top ); + if( rect.isValid() ) + { helper().slab( color, 0, shadowSize )->render( rect, painter, TileSet::Top ); } } @@ -735,7 +739,7 @@ namespace Oxygen const QColor shadow( helper().calcDarkColor( color ) ); painter->setPen( shadow ); - painter->drawLine( rect.bottomLeft()+QPoint(0,1), rect.bottomRight()+QPoint(0,1) ); + painter->drawLine( rect.bottomLeft()+QPoint(-1,1), rect.bottomRight()+QPoint(1,1) ); }