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
commit 6e6c1512a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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