KStyle: re-add centering of toolbutton icons

Wasn't a very noticeable change, but I forgot to keep this
wilder-reb-27
Noah Davis 4 years ago
parent 45680953bb
commit 4f92e3f804
  1. 3
      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;

Loading…
Cancel
Save