Commit 6dc07bb7 authored by Christoph Feck's avatar Christoph Feck

Respect button's iconSize() in KUrlNavigator buttons

The actual minimum size is 22x22, not 16x16, because
both buttons are used next to a line edit, which adds
at least 6 pixels to the font size due to the frame.

BUG: 307215
FIXED-IN: 4.9.2
parent 72150a3f
......@@ -154,7 +154,7 @@ void KUrlNavigatorPlacesSelector::paintEvent(QPaintEvent* event)
drawHoverBackground(&painter);
// draw icon
const QPixmap pixmap = icon().pixmap(QSize(22, 22), QIcon::Normal);
const QPixmap pixmap = icon().pixmap(QSize(22, 22).expandedTo(iconSize()), QIcon::Normal);
const int x = (width() - pixmap.width()) / 2;
const int y = (height() - pixmap.height()) / 2;
painter.drawPixmap(x, y, pixmap);
......
......@@ -38,7 +38,7 @@ KUrlNavigatorToggleButton::KUrlNavigatorToggleButton(QWidget* parent) :
this, SLOT(updateToolTip()));
connect(this, SIGNAL(clicked(bool)),
this, SLOT(updateCursor()));
m_pixmap = KIcon("dialog-ok").pixmap(16, 16);
m_pixmap = KIcon("dialog-ok").pixmap(QSize(22, 22).expandedTo(iconSize()));
updateToolTip();
}
......
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