From 12b0182337b29134d8c362e72401115166ea7140 Mon Sep 17 00:00:00 2001 From: Nick D'Ademo Date: Thu, 22 Aug 2019 21:04:02 +0800 Subject: [PATCH] Use small icon size from QStyle for dock widget tab icon. --- src/DockWidgetTab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DockWidgetTab.cpp b/src/DockWidgetTab.cpp index 92f6277..aaf4530 100644 --- a/src/DockWidgetTab.cpp +++ b/src/DockWidgetTab.cpp @@ -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); } }