From 4f92e3f80441cfbfa15578c5625ae4deafadad23 Mon Sep 17 00:00:00 2001 From: Noah Davis Date: Fri, 16 Sep 2022 14:24:03 -0400 Subject: [PATCH] KStyle: re-add centering of toolbutton icons Wasn't a very noticeable change, but I forgot to keep this --- kstyle/breezestyle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index 81cbe2cf..7df6e46d 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -4659,7 +4659,7 @@ bool Style::drawToolButtonLabelControl(const QStyleOption *option, QPainter *pai } if (hasIcon && !hasText) { // icon only - iconRect = centerRect(contentsRect, iconSize); + iconRect = contentsRect; } else if (!hasIcon && hasText) { // text only textRect = contentsRect; textFlags |= Qt::AlignCenter; @@ -4712,6 +4712,7 @@ bool Style::drawToolButtonLabelControl(const QStyleOption *option, QPainter *pai // render arrow or icon if (hasIcon) { + iconRect = centerRect(iconRect, iconSize); if (hasArrow) { QStyleOptionToolButton copy(*toolButtonOption); copy.rect = iconRect;