From a56276f00d98c0951319029042ba9f05afc52b5a Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Wed, 2 Jan 2008 22:09:12 +0000 Subject: [PATCH] Review toolbar tweaks. svn path=/trunk/KDE/kdegraphics/okular/; revision=756192 --- ui/pageviewutils.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/pageviewutils.cpp b/ui/pageviewutils.cpp index 16792eaff..0a30c2ece 100644 --- a/ui/pageviewutils.cpp +++ b/ui/pageviewutils.cpp @@ -636,18 +636,19 @@ void ToolBarPrivate::buildToolBar() q->resize( myWidth + 1, myHeight + 1 ); // 4. create and set transparency mask // 4. draw background - QPainter maskPainter( &mask); + QPainter maskPainter( &mask); mask.fill( Qt::white ); maskPainter.setBrush( Qt::black ); if ( vertical ) - maskPainter.drawRoundRect( topLeft ? -10 : 0, 0, myWidth + 10, myHeight, 2000 / (myWidth + 10), 2000 / myHeight ); + maskPainter.drawRoundRect( topLeft ? -10 : 0, 0, myWidth + 11, myHeight, 2000 / (myWidth + 10), 2000 / myHeight ); else - maskPainter.drawRoundRect( 0, topLeft ? -10 : 0, myWidth, myHeight + 10, 2000 / myWidth, 2000 / (myHeight + 10) ); + maskPainter.drawRoundRect( 0, topLeft ? -10 : 0, myWidth, myHeight + 11, 2000 / myWidth, 2000 / (myHeight + 10) ); maskPainter.end(); q->setMask( mask ); // 5. draw background QPainter bufferPainter( &backgroundPixmap ); + bufferPainter.translate( 0.5, 0.5 ); QPalette pal = q->palette(); // 5.1. draw horizontal/vertical gradient QLinearGradient grad; @@ -670,13 +671,14 @@ void ToolBarPrivate::buildToolBar() grad.setColorAt( 1, pal.color( QPalette::Active, QPalette::Light ) ); bufferPainter.setBrush( QBrush( grad ) ); // 5.2. draw rounded border - bufferPainter.setPen( pal.color( QPalette::Active, QPalette::Dark ) ); + bufferPainter.setPen( pal.color( QPalette::Active, QPalette::Dark ).lighter( 140 ) ); bufferPainter.setRenderHints( QPainter::Antialiasing ); if ( vertical ) bufferPainter.drawRoundRect( topLeft ? -10 : 0, 0, myWidth + 10, myHeight, 2000 / (myWidth + 10), 2000 / myHeight ); else bufferPainter.drawRoundRect( 0, topLeft ? -10 : 0, myWidth, myHeight + 10, 2000 / myWidth, 2000 / (myHeight + 10) ); // 5.3. draw handle + bufferPainter.translate( -0.5, -0.5 ); bufferPainter.setPen( pal.color( QPalette::Active, QPalette::Mid ) ); if ( vertical ) {