Commit 2985b4cb authored by Hugo Pereira Da Costa's avatar Hugo Pereira Da Costa
Browse files

use one pixel for focus frame instead of 2

parent 9aed8af8
......@@ -125,8 +125,6 @@ namespace Breeze
widget->installEventFilter( &_addEventFilter );
installShadow( widget, helper, ShadowAreaTop );
installShadow( widget, helper, ShadowAreaBottom );
installShadow( widget, helper, ShadowAreaLeft );
installShadow( widget, helper, ShadowAreaRight );
widget->removeEventFilter( &_addEventFilter );
}
......@@ -335,7 +333,7 @@ namespace Breeze
const QColor outline( _helper.frameOutlineColor( palette(), _mouseOver, _hasFocus, _opacity, _mode ) );
painter.setCompositionMode( QPainter::CompositionMode_SourceOver );
_helper.renderFrame( &painter, rect, QColor(), outline, _hasFocus );
_helper.renderFrame( &painter, rect, QColor(), outline );
return;
......
......@@ -379,7 +379,7 @@ namespace Breeze
//______________________________________________________________________________
void Helper::renderFrame(
QPainter* painter, const QRect& rect,
const QColor& color, const QColor& outline, bool hasFocus ) const
const QColor& color, const QColor& outline ) const
{
painter->setRenderHint( QPainter::Antialiasing );
......@@ -390,18 +390,9 @@ namespace Breeze
// set pen
if( outline.isValid() )
{
if( hasFocus )
{
painter->setPen( QPen( outline, 2 ) );
frameRect.adjust( 1, 1, -1, -1 );
} else {
painter->setPen( outline );
frameRect.adjust( 0.5, 0.5, -0.5, -0.5 );
}
painter->setPen( outline );
frameRect.adjust( 0.5, 0.5, -0.5, -0.5 );
radius -= 1.0;
} else {
......
......@@ -149,7 +149,7 @@ namespace Breeze
void renderFocusLine( QPainter*, const QRect&, const QColor& ) const;
//* generic frame
void renderFrame( QPainter*, const QRect&, const QColor& color, const QColor& outline = QColor(), bool focus = false ) const;
void renderFrame( QPainter*, const QRect&, const QColor& color, const QColor& outline = QColor() ) const;
//* menu frame
void renderMenuFrame( QPainter*, const QRect&, const QColor& color, const QColor& outline, bool roundCorners = true ) const;
......
......@@ -2606,7 +2606,7 @@ namespace Breeze
// render
const QColor background( isTitleWidget ? palette.color( widget->backgroundRole() ):QColor() );
const QColor outline( _helper->frameOutlineColor( palette, mouseOver, hasFocus, opacity, mode ) );
_helper->renderFrame( painter, rect, background, outline, hasFocus );
_helper->renderFrame( painter, rect, background, outline );
return true;
......@@ -2649,7 +2649,7 @@ namespace Breeze
// render
const QColor background( palette.color( QPalette::Base ) );
const QColor outline( _helper->frameOutlineColor( palette, mouseOver, hasFocus, opacity, mode ) );
_helper->renderFrame( painter, rect, background, outline, hasFocus );
_helper->renderFrame( painter, rect, background, outline );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment