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>
This commit is contained in:
parent
41743795ae
commit
18fd74c70d
@ -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();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user