summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2021-02-17 12:04:44 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-19 14:39:25 +0000
commit18fd74c70d38579c1f40f884297df6ece584eeff (patch)
tree3c512ee6bd7831f72ecbf4d306d3b17bfdf5f02c /src
parent41743795aef547c9c0702c63a77653d9c8a4a4fd (diff)
QMdiSubWindow: Set correct ControlLabel size
The label pixmap may be a high-dpi pixmap. Set the ControlLabel fixed size to be the pixmap device independent size. Fixes: QTBUG-87871 Change-Id: Ib836e322d25599cb5e79011ea597e32ee1f8d093 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 33ddacdd24523acbdafcda0f520dd2d73c879cfb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/widgets/qmdisubwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp
index 1b61868868..89d77574f0 100644
--- a/src/widgets/widgets/qmdisubwindow.cpp
+++ b/src/widgets/widgets/qmdisubwindow.cpp
@@ -399,7 +399,7 @@ ControlLabel::ControlLabel(QMdiSubWindow *subWindow, QWidget *parent)
Q_UNUSED(subWindow);
setFocusPolicy(Qt::NoFocus);
updateWindowIcon();
- setFixedSize(label.size());
+ setFixedSize(label.size() / label.devicePixelRatio());
}
/*
@@ -407,7 +407,7 @@ ControlLabel::ControlLabel(QMdiSubWindow *subWindow, QWidget *parent)
*/
QSize ControlLabel::sizeHint() const
{
- return label.size();
+ return label.size() / label.devicePixelRatio();
}
/*