aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/ToolButton.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/ToolButton.qml')
-rw-r--r--src/imports/controls/ToolButton.qml17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/imports/controls/ToolButton.qml b/src/imports/controls/ToolButton.qml
index 314ce966..a610dc2b 100644
--- a/src/imports/controls/ToolButton.qml
+++ b/src/imports/controls/ToolButton.qml
@@ -41,20 +41,15 @@ T.ToolButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- label ? label.implicitWidth + leftPadding + rightPadding : 0)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- label ? label.implicitHeight + topPadding + bottomPadding : 0)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
- //! [label]
- label: Text {
- x: control.leftPadding
- y: control.topPadding
- width: control.availableWidth
- height: control.availableHeight
-
+ //! [contentItem]
+ contentItem: Text {
text: control.text
font: control.font
color: control.enabled ? "#26282a" : "#c2c2c2"
@@ -62,7 +57,7 @@ T.ToolButton {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- //! [label]
+ //! [contentItem]
//! [background]
background: Rectangle {