Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwindecoration/qml/ButtonGroup.qml
Show All 24 Lines | |||||
25 | 25 | | |||
26 | ListView { | 26 | ListView { | ||
27 | id: view | 27 | id: view | ||
28 | property string key | 28 | property string key | ||
29 | property bool dragging: false | 29 | property bool dragging: false | ||
30 | orientation: ListView.Horizontal | 30 | orientation: ListView.Horizontal | ||
31 | interactive: false | 31 | interactive: false | ||
32 | spacing: units.smallSpacing | 32 | spacing: units.smallSpacing | ||
33 | implicitHeight: units.iconSizes.small | ||||
34 | implicitWidth: count * (units.iconSizes.small + units.smallSpacing) - Math.min(1, count) * units.smallSpacing | ||||
33 | delegate: Item { | 35 | delegate: Item { | ||
34 | width: units.iconSizes.small | 36 | width: units.iconSizes.small | ||
35 | height: units.iconSizes.small | 37 | height: units.iconSizes.small | ||
36 | KDecoration.Button { | 38 | KDecoration.Button { | ||
37 | id: button | 39 | id: button | ||
38 | property int itemIndex: index | 40 | property int itemIndex: index | ||
39 | property var buttonsModel: parent.ListView.view.model | 41 | property var buttonsModel: parent.ListView.view.model | ||
40 | bridge: bridgeItem.bridge | 42 | bridge: bridgeItem.bridge | ||
Show All 24 Lines | |||||
65 | } | 67 | } | ||
66 | move: Transition { | 68 | move: Transition { | ||
67 | NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: units.longDuration/2 } | 69 | NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: units.longDuration/2 } | ||
68 | NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: units.longDuration/2 } | 70 | NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: units.longDuration/2 } | ||
69 | } | 71 | } | ||
70 | displaced: Transition { | 72 | displaced: Transition { | ||
71 | NumberAnimation { properties: "x,y"; duration: units.longDuration; easing.type: Easing.OutBounce } | 73 | NumberAnimation { properties: "x,y"; duration: units.longDuration; easing.type: Easing.OutBounce } | ||
72 | } | 74 | } | ||
73 | Layout.preferredWidth: count * (units.iconSizes.small + units.smallSpacing) - Math.min(1, count) * units.smallSpacing | | |||
74 | } | 75 | } |