Warning, /graphics/krita/3rdparty/ext_qt/bug449118-QMdiSubWindow-Set-correct-ControlLabel-size.patch is written in an unsupported language. File is not indexed.
0001 From 5969788d6f2ef0a7b18377040c61515389be34da Mon Sep 17 00:00:00 2001 0002 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= <morten.sorvig@qt.io> 0003 Date: Wed, 17 Feb 2021 12:04:44 +0100 0004 Subject: [PATCH] QMdiSubWindow: Set correct ControlLabel size 0005 0006 The label pixmap may be a high-dpi pixmap. Set the ControlLabel 0007 fixed size to be the pixmap device independent size. 0008 0009 Fixes: QTBUG-87871 0010 Pick-to: 5.15 0011 Pick-to: 6.0 0012 Pick-to: 6.1 0013 Change-Id: Ib836e322d25599cb5e79011ea597e32ee1f8d093 0014 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> 0015 (cherry picked from commit 33ddacdd24523acbdafcda0f520dd2d73c879cfb) 0016 --- 0017 src/widgets/widgets/qmdisubwindow.cpp | 4 ++-- 0018 1 file changed, 2 insertions(+), 2 deletions(-) 0019 0020 diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp 0021 index e9511f944f..29a29ff5df 100644 0022 --- a/src/widgets/widgets/qmdisubwindow.cpp 0023 +++ b/src/widgets/widgets/qmdisubwindow.cpp 0024 @@ -399,7 +399,7 @@ ControlLabel::ControlLabel(QMdiSubWindow *subWindow, QWidget *parent) 0025 Q_UNUSED(subWindow); 0026 setFocusPolicy(Qt::NoFocus); 0027 updateWindowIcon(); 0028 - setFixedSize(label.size()); 0029 + setFixedSize(label.size() / label.devicePixelRatio()); 0030 } 0031 0032 /* 0033 @@ -407,7 +407,7 @@ ControlLabel::ControlLabel(QMdiSubWindow *subWindow, QWidget *parent) 0034 */ 0035 QSize ControlLabel::sizeHint() const 0036 { 0037 - return label.size(); 0038 + return label.size() / label.devicePixelRatio(); 0039 } 0040 0041 /* 0042 -- 0043 2.24.1.windows.2 0044