Skip to content

Commit 6e6c151

Browse files
Merge pull request #55 from duerr-ndt/use_qt_style_icon_size
Use small icon size from QStyle for dock widget tab icon.
2 parents 8e0ea57 + 12b0182 commit 6e6c151

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DockWidgetTab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ void CDockWidgetTab::setIcon(const QIcon& Icon)
444444
d->Icon = Icon;
445445
if (d->IconLabel)
446446
{
447-
d->IconLabel->setPixmap(Icon.pixmap(this->windowHandle(), QSize(16, 16)));
447+
d->IconLabel->setPixmap(Icon.pixmap(style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, this)));
448448
d->IconLabel->setVisible(true);
449449
}
450450
}

0 commit comments

Comments
 (0)