forked from qt-creator/qt-creator
Wizard: Fix size calculation of outline titles
On macOS we now (with Qt 6.7) get nice, high resolution pixmaps from QIcon::fromTheme. That means that our wrong assumption that the pixmap size == UI size leads to huge layout sizes for the indicator of the current wizard page. We need to take devicePixelRatio into account for determining the UI size. Fixes: QTCREATORBUG-31015 Change-Id: I6e9c77cf2f37fce60735e75c1fa694e4b4208b98 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -45,7 +45,9 @@ public:
|
||||
m_indicatorPixmap(indicatorPixmap)
|
||||
{
|
||||
m_indicatorLabel = new QLabel(this);
|
||||
m_indicatorLabel->setFixedSize(m_indicatorPixmap.size());
|
||||
const QSizeF indicatorSize = m_indicatorPixmap.deviceIndependentSize();
|
||||
m_indicatorLabel->setFixedSize(
|
||||
{qCeil(indicatorSize.width()), qCeil(indicatorSize.height())});
|
||||
m_titleLabel = new QLabel(title, this);
|
||||
auto l = new QHBoxLayout(this);
|
||||
l->setContentsMargins(0, 0, 0, 0);
|
||||
|
Reference in New Issue
Block a user