@@ -330,78 +330,85 @@ Item {
330 id: comboButton
330 id: comboButton
332 width: parent.width
332 width: parent.width
333− visible: notification.type == Notification.SnapDecision && actionRepeater.count > 4
333+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3
334 gradient: darkgreyGradient
334 gradient: darkgreyGradient
335 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
335 onClicked: notification.notification.invokeAction(comboRepeater.itemAt(2).actionId)
336 expanded: false
336 expanded: false
337− expandedHeight: (comboRepeater.count) * units.gu(5)
337+ expandedHeight: (comboRepeater.count - 2) * units.gu(4) + units.gu(.5)
338− comboList: Column {
338+ comboList: Flickable {
339+ // this has to be wrapped inside a flickable
340+ // to work around a feature/bug? of the
341+ // ComboButton SDK-element, making a regular
342+ // unwrapped Column item flickable
339− Repeater {
345+ Repeater {
340− id: comboRepeater
346+ id: comboRepeater
342− Component.onCompleted: {
348+ Component.onCompleted: {
343− // an assignment is ok here, since this
349+ // an assignment is ok here, since this
344− // label is static and does not change
350+ // label is static and does not change
345− comboButton.text = comboRepeater.itemAt(2).actionLabel
351+ comboButton.text = comboRepeater.itemAt(2).actionLabel
348− model: notification.actions
354+ model: notification.actions
349− delegate: Loader {
355+ delegate: Loader {
350− id: comboLoader
356+ id: comboLoader
352− asynchronous: true
358+ asynchronous: true
353− visible: status == Loader.Ready
359+ visible: status == Loader.Ready
354− property string actionId: id
360+ property string actionId: id
355− property string actionLabel: label
361+ property string actionLabel: label
356− Component {
362+ Component {
357− id: comboEntry
363+ id: comboEntry
359− MouseArea {
365+ MouseArea {
360− id: comboInputArea
366+ id: comboInputArea
362− width: comboButton.width
368+ width: comboButton.width
363− height: comboIcon.height + units.gu(2)
369+ height: comboIcon.height + units.gu(2)
365− onClicked: {
371+ onClicked: {
366− notification.notification.invokeAction(actionId)
372+ notification.notification.invokeAction(actionId)
369− ListItem.ThinDivider {
373− Icon {
375+ ListItem.ThinDivider {
374− id: comboIcon
376+ visible: index > 3
376− anchors {
382+ anchors {
377− left: parent.left
383+ left: parent.left
378− leftMargin: units.gu(.5)
384+ leftMargin: units.gu(.5)
379− top: parent.top
385+ top: parent.top
380− topMargin: units.gu(1)
386+ topMargin: units.gu(1)
381− bottom: parent.bottom
387+ bottom: parent.bottom
382− bottomMargin: units.gu(1)
388+ bottomMargin: units.gu(1)
391− id: comboLabel
397+ id: comboLabel
393− anchors.left: comboIcon.right
399+ anchors.left: comboIcon.right
394− anchors.leftMargin: units.gu(1)
400+ anchors.leftMargin: units.gu(1)
395− anchors.verticalCenter: comboIcon.verticalCenter
401+ anchors.verticalCenter: comboIcon.verticalCenter
396− verticalAlignment: Text.AlignVCenter
402+ verticalAlignment: Text.AlignVCenter
397− height: comboIcon.height
403+ height: comboIcon.height
398− fontSize: "small"
404+ fontSize: "small"
399− color: "white"
405+ color: "white"
400− text: actionLabel
406+ text: actionLabel
410+ sourceComponent: (index > 2) ? comboEntry : undefined
404− sourceComponent: (index > 2) ? comboEntry : undefined