Use small icon size from QStyle for dock widget tab icon.

This commit is contained in:
Nick D'Ademo 2019-08-22 21:04:02 +08:00
parent a2b07fd97f
commit 12b0182337

View File

@ -444,7 +444,7 @@ void CDockWidgetTab::setIcon(const QIcon& Icon)
d->Icon = Icon;
if (d->IconLabel)
{
d->IconLabel->setPixmap(Icon.pixmap(this->windowHandle(), QSize(16, 16)));
d->IconLabel->setPixmap(Icon.pixmap(style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, this)));
d->IconLabel->setVisible(true);
}
}