Commit cac4b544 authored by Lucas Andrade's avatar Lucas Andrade Committed by Jan Blackquill
Browse files

Use semi-transparent menu separators

parent 303493a9
...@@ -3689,12 +3689,13 @@ namespace Breeze ...@@ -3689,12 +3689,13 @@ namespace Breeze
if( widget && !widget->isWindow() ) return true; if( widget && !widget->isWindow() ) return true;
const auto& palette( option->palette ); const auto& palette( option->palette );
const auto outline( _helper->frameOutlineColor( palette ) );
const bool hasAlpha( _helper->hasAlphaChannel( widget ) ); const bool hasAlpha( _helper->hasAlphaChannel( widget ) );
auto background( _helper->frameBackgroundColor( palette ) ); auto background( _helper->frameBackgroundColor( palette ) );
auto outline( _helper->frameOutlineColor( palette ) );
if ( hasAlpha ) { if ( hasAlpha ) {
background.setAlphaF(StyleConfigData::menuOpacity() / 100.0); background.setAlphaF(StyleConfigData::menuOpacity() / 100.0);
outline = _helper->alphaColor( palette.color( QPalette::WindowText ), 0.25 );
} }
_helper->renderMenuFrame( painter, option->rect, background, outline, hasAlpha ); _helper->renderMenuFrame( painter, option->rect, background, outline, hasAlpha );
...@@ -4704,9 +4705,18 @@ namespace Breeze ...@@ -4704,9 +4705,18 @@ namespace Breeze
// normal separator // normal separator
if( menuItemOption->text.isEmpty() && menuItemOption->icon.isNull() ) if( menuItemOption->text.isEmpty() && menuItemOption->icon.isNull() )
{ {
const auto color( _helper->separatorColor( palette ) ); auto color( _helper->separatorColor( palette ) );
_helper->renderSeparator( painter, rect, color ); QRect copy( rect );
if( StyleConfigData::menuOpacity() < 100 )
{
color = _helper->alphaColor( palette.color( QPalette::WindowText ), 0.25 ) ;
// don`t overlap with menu border
copy.adjust( 1, 0, -1, 0 );
}
_helper->renderSeparator( painter, copy, color );
return true; return true;
} else { } else {
......
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