19 import Lomiri.Components 1.3
20 import QtQuick.Controls.Suru 2.2
25 property string iconName
26 property alias iconColor: icon.color
27 property bool showText:
false
28 property int verticalCenterOffset: 0
29 property int iconSize: units.gu(2)
30 property alias highlightColor: h.color
32 width: showText ? description.width : units.gu(5)
39 topMargin: units.gu(1)
40 bottomMargin: units.gu(1)
42 aspect: LomiriShape.Flat
44 color: Suru.neutralColor
45 visible: button.pressed
50 anchors.centerIn: parent
51 anchors.verticalCenterOffset: button.verticalCenterOffset
54 name: action && action.iconName ? action.iconName :
""
55 source: action && action.iconSource ? action.iconSource :
""
56 opacity: action ? (action.enabled ? 1.0 : 0.5) : 1.0
61 horizontalCenter: parent.horizontalCenter
64 text: action ? action.text :
""
67 horizontalAlignment: Text.AlignHCenter
68 elide: Text.ElideRight