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
if( widget && !widget->isWindow() ) return true;
const auto& palette( option->palette );
const auto outline( _helper->frameOutlineColor( palette ) );
const bool hasAlpha( _helper->hasAlphaChannel( widget ) );
auto background( _helper->frameBackgroundColor( palette ) );
auto outline( _helper->frameOutlineColor( palette ) );
if ( hasAlpha ) {
background.setAlphaF(StyleConfigData::menuOpacity() / 100.0);
outline = _helper->alphaColor( palette.color( QPalette::WindowText ), 0.25 );
}
_helper->renderMenuFrame( painter, option->rect, background, outline, hasAlpha );
......@@ -4705,8 +4706,17 @@ namespace Breeze
if( menuItemOption->text.isEmpty() && menuItemOption->icon.isNull() )
{
const auto color( _helper->separatorColor( palette ) );
_helper->renderSeparator( painter, rect, color );
auto color( _helper->separatorColor( palette ) );
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;
} 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