diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2024-02-15 19:22:56 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2024-02-16 14:13:09 +0100 |
commit | 8eb599566ea983869298fe1f3362918bf0651f11 (patch) | |
tree | 0ff9aa4f5217b104b7e59b8bc0fb92d440350ac6 /src/widgets/widgets/qdockwidget.cpp | |
parent | 76a7057bf544e3b35a3b1d6e3cb3fc7be3c2036c (diff) |
QDockWidget: fix dock buttons size
The previous fix calculated an icon size of 12 instead 10 for the icon
size when SH_DockWidget_ButtonsHaveFrame is set. This lead to a too
large icon. It was also rendered blurry because there was no native png
with 12x12 pixels so it has to be scaled.
This amends 04f4b27774ba70ebba425394fa8a1ffdffb2483b
Pick-to: 6.7
Fixes: QTBUG-122214
Task-number: QTBUG-118643
Change-Id: Iaf332a21681e5b84222299d79d4b28d0c26b0cda
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src/widgets/widgets/qdockwidget.cpp')
-rw-r--r-- | src/widgets/widgets/qdockwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index bf33ab2a4a..8f027f7e3b 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -133,7 +133,7 @@ QSize QDockWidgetTitleButton::dockButtonIconSize() const if (m_iconSize < 0) { m_iconSize = style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, this); if (style()->styleHint(QStyle::SH_DockWidget_ButtonsHaveFrame, nullptr, this)) - m_iconSize = (m_iconSize * 3) / 4; + m_iconSize = (m_iconSize * 5) / 8; // 16 -> 10 } return QSize(m_iconSize, m_iconSize); } |