properly adjust menu icon size and positioning, to deal with button's offset in maximized

mode.
BUG: 343441
wilder-pre-rebase
Hugo Pereira Da Costa 11 years ago
parent a3dbcb3ea6
commit 69afdd3be0
  1. 7
      kdecoration/breezebutton.cpp

@ -90,8 +90,11 @@ namespace Breeze
if (type() == KDecoration2::DecorationButtonType::Menu)
{
const QPixmap pixmap = decoration()->client().data()->icon().pixmap(size().toSize());
painter->drawPixmap(geometry().center() - QPoint(pixmap.width()/2, pixmap.height()/2), pixmap);
const QSizeF iconSize( size().width()-m_offset.x(), size().height()-m_offset.y() );
const QRectF iconRect( geometry().topLeft(), iconSize );
const QPixmap pixmap = decoration()->client().data()->icon().pixmap( iconSize.toSize());
painter->drawPixmap(iconRect.center() - QPoint(pixmap.width()/2, pixmap.height()/2), pixmap);
} else {

Loading…
Cancel
Save