aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-12-22 07:48:50 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-12-22 08:21:58 +0000
commit951cf6baf0d34a104b01b42de1454696c51f7177 (patch)
treef7e1839f9d774236a7b6e78137fdb3d5967208e8 /src
parent54352f1721b7f2c29529341a0c955a387d6706d5 (diff)
Material ToolButton: fix round ripple for square buttons
The condition for checking whether a tool button is square and thus, whether it should use a round ripple instead of a fill ripple, must be based on the size of the contents, not on the implicit size. This way, you get a round ripple for one-letter tool buttons but only if they are not stretched. Task-number: QTBUG-65052 Change-Id: I0d498dc65650f3b786b41e538748549d61f2b216 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/imports/controls/material/ToolButton.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/controls/material/ToolButton.qml b/src/imports/controls/material/ToolButton.qml
index eaff0b1c..b2186fd4 100644
--- a/src/imports/controls/material/ToolButton.qml
+++ b/src/imports/controls/material/ToolButton.qml
@@ -64,7 +64,7 @@ T.ToolButton {
implicitWidth: 48
implicitHeight: 48
- readonly property bool square: control.contentItem.implicitWidth <= control.contentItem.implicitHeight
+ readonly property bool square: control.contentItem.width <= control.contentItem.height
x: (parent.width - width) / 2
y: (parent.height - height) / 2