diff options
author | Joni Poikelin <joni.poikelin@qt.io> | 2023-10-10 09:54:52 +0300 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-10-13 21:21:37 +0000 |
commit | 5cdbe7517586ee123ccea67db7638e3e617c2aea (patch) | |
tree | c7c2048fc4059041c1f9196adfdab78ade63e562 | |
parent | 91c940650396a93be94fa613ab79578fb5445e60 (diff) |
Fix icon positioning in textless Button in Material style
Fixes: QTBUG-117880
Change-Id: I679ecb1cfb74112c80ac8710776a29187adcd869
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 731bff8471fcd4167efb7284825555231e97c516)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e3d490a7f0a73279422572d975c9ebc35fea3f98)
-rw-r--r-- | src/quickcontrols/material/Button.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quickcontrols/material/Button.qml b/src/quickcontrols/material/Button.qml index e2bbb58687..45003898de 100644 --- a/src/quickcontrols/material/Button.qml +++ b/src/quickcontrols/material/Button.qml @@ -20,7 +20,7 @@ T.Button { verticalPadding: 14 // https://m3.material.io/components/buttons/specs#256326ad-f934-40e7-b05f-0bcb41aa4382 leftPadding: !flat ? (!hasIcon ? 24 : 16) : 12 - rightPadding: !flat ? 24 : (!hasIcon ? 12 : 16) + rightPadding: !flat ? (text === "" ? 16 : 24) : (!hasIcon ? 12 : (text === "" ? 12 : 16)) spacing: 8 icon.width: 24 |