Changeset View
Changeset View
Standalone View
Standalone View
dialer/package/contents/ui/Dialpad/DialerIconButton.qml
Show All 29 Lines | 26 | Item { | |||
---|---|---|---|---|---|
30 | Layout.fillHeight: true | 30 | Layout.fillHeight: true | ||
31 | 31 | | |||
32 | property var callback | 32 | property var callback | ||
33 | property var pressedCallback | 33 | property var pressedCallback | ||
34 | property var releasedCallback | 34 | property var releasedCallback | ||
35 | property string sub | 35 | property string sub | ||
36 | property alias source: icon.source | 36 | property alias source: icon.source | ||
37 | property alias text: label.text | 37 | property alias text: label.text | ||
38 | property int size | ||||
38 | 39 | | |||
39 | Rectangle { | 40 | Rectangle { | ||
40 | anchors.fill: parent | 41 | anchors.fill: parent | ||
41 | z: -1 | 42 | z: -1 | ||
42 | color: PlasmaCore.ColorScope.highlightColor | 43 | color: PlasmaCore.ColorScope.highlightColor | ||
43 | radius: units.smallSpacing | 44 | radius: units.smallSpacing | ||
44 | opacity: mouse.pressed ? 0.4 : 0 | 45 | opacity: mouse.pressed ? 0.4 : 0 | ||
45 | Behavior on opacity { | 46 | Behavior on opacity { | ||
46 | OpacityAnimator { | 47 | OpacityAnimator { | ||
47 | duration: units.longDuration | 48 | duration: units.longDuration | ||
48 | easing.type: Easing.InOutQuad | 49 | easing.type: Easing.InOutQuad | ||
49 | } | 50 | } | ||
50 | } | 51 | } | ||
51 | } | 52 | } | ||
52 | 53 | | |||
53 | Row { | 54 | Row { | ||
54 | anchors.centerIn: parent | 55 | anchors.centerIn: parent | ||
55 | PlasmaCore.IconItem { | 56 | PlasmaCore.IconItem { | ||
56 | id: icon | 57 | id: icon | ||
57 | anchors.verticalCenter: parent.verticalCenter | 58 | anchors.verticalCenter: parent.verticalCenter | ||
58 | width: height | 59 | width: height | ||
59 | height: units.gridUnit * 3.5 | 60 | height: buttonRoot.size || buttonRoot.height * 0.6 | ||
60 | } | 61 | } | ||
61 | PlasmaComponents.Label { | 62 | PlasmaComponents.Label { | ||
62 | id: label | 63 | id: label | ||
63 | height: buttonRoot.height | 64 | height: buttonRoot.height | ||
64 | anchors.verticalCenter: parent.verticalCenter | 65 | anchors.verticalCenter: parent.verticalCenter | ||
65 | font.pointSize: 1024 | | |||
66 | fontSizeMode: Text.VerticalFit | 66 | fontSizeMode: Text.VerticalFit | ||
67 | } | 67 | } | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | MouseArea { | 70 | MouseArea { | ||
71 | id: mouse | 71 | id: mouse | ||
72 | anchors.fill: parent | 72 | anchors.fill: parent | ||
73 | onClicked: { | 73 | onClicked: { | ||
Show All 23 Lines |