Merge pull request #55 from duerr-ndt/use_qt_style_icon_size

Use small icon size from QStyle for dock widget tab icon.
This commit is contained in:
githubuser0xFFFF
2019-09-09 08:25:45 +02:00
committed by GitHub

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);
}
}