From 8206c5cebbff640f64fae4dc593957213badaf9c Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Sat, 15 Jan 2022 12:48:37 +0800 Subject: [PATCH 1/2] breezestyle: Improve coding style GIT_SILENT --- kstyle/breezestyle.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index ae578bc6..fe699826 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -3885,7 +3885,7 @@ namespace Breeze _helper->renderMenuFrame( painter, option->rect, background, outline, hasAlpha, isTopMenu ); painter->restore(); - + return true; } @@ -4874,17 +4874,17 @@ namespace Breeze // normal separator if( menuItemOption->text.isEmpty() && menuItemOption->icon.isNull() ) { - + auto color( _helper->separatorColor( palette ) ); QRect copy( rect ); - - if( StyleConfigData::menuOpacity() < 100 ) + + 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; -- GitLab From 47a015cde2951af65fe17c20bdbe0034cb48359d Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Sat, 15 Jan 2022 12:49:29 +0800 Subject: [PATCH 2/2] breezestyle: Remove extra margin for InstantPopup Assigning a menu with instant popup mode to an action gives it excessive left padding. Removing the extra margin fixes it. BUG: 447288 --- kstyle/breezestyle.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index fe699826..567d21bc 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -6446,12 +6446,6 @@ namespace Breeze const auto button( qobject_cast( widget ) ); if( button->isChecked() || button->isDown() ) copy.state |= State_On; - } else if( !inTabBar && hasInlineIndicator ) { - - const int marginWidth( flat ? Metrics::ToolButton_MarginWidth : Metrics::Button_MarginWidth + Metrics::Frame_FrameWidth ); - contentsRect = insideMargin( contentsRect, marginWidth, 0 ); - contentsRect = visualRect( option, contentsRect ); - } copy.rect = contentsRect; -- GitLab