Changeset View
Changeset View
Standalone View
Standalone View
applets/kickoff/package/contents/ui/KickoffButton.qml
Show All 23 Lines | 23 | PlasmaComponents.TabButton { | |||
---|---|---|---|---|---|
24 | id: button | 24 | id: button | ||
25 | objectName: "KickoffButton" | 25 | objectName: "KickoffButton" | ||
26 | 26 | | |||
27 | property string iconSource | 27 | property string iconSource | ||
28 | property alias text: labelElement.text | 28 | property alias text: labelElement.text | ||
29 | 29 | | |||
30 | implicitHeight: iconElement.height + labelElement.implicitHeight + iconElement.anchors.topMargin + labelElement.anchors.topMargin + labelElement.anchors.bottomMargin | 30 | implicitHeight: iconElement.height + labelElement.implicitHeight + iconElement.anchors.topMargin + labelElement.anchors.topMargin + labelElement.anchors.bottomMargin | ||
31 | 31 | | |||
32 | MouseArea { | | |||
33 | enabled: root.switchTabsOnHover | | |||
34 | anchors.fill: parent | | |||
35 | hoverEnabled: root.switchTabsOnHover | | |||
36 | onEntered: { | | |||
37 | clickTimer.pendingButton = button | | |||
38 | clickTimer.restart() | | |||
39 | } | | |||
40 | onExited: clickTimer.running = false | | |||
41 | onClicked: button.clicked() | | |||
42 | } | | |||
43 | | ||||
44 | Item { | 32 | Item { | ||
45 | anchors { | 33 | anchors { | ||
46 | margins: units.smallSpacing | 34 | margins: units.smallSpacing | ||
47 | left: parent.left | 35 | left: parent.left | ||
48 | right: parent.right | 36 | right: parent.right | ||
49 | verticalCenter: parent.verticalCenter | 37 | verticalCenter: parent.verticalCenter | ||
50 | } | 38 | } | ||
51 | 39 | | |||
Show All 28 Lines |