on xenial help sign in
Use PreviewActionButton in PreviewActionCombo

And other minor stuff

commit889ebbd2cee37075a27e49739de140cba218e367 authorAlbert Astals <albert.astals@canonical.com> dateThu 6 Feb 2014, 16:08 (13 years ago) parent37d3e2b
2 files changed+6−9
qml/Dash/Previews/PreviewActionCombo.qml+3−6 tests/qmltests/Dash/Previews/tst_PreviewActions.qml+3−3
qml/Dash/Previews/PreviewActionCombo.qml+3−6
@@ -35,7 +35,7 @@ Item {
3535 text: !expanded ? i18n.tr("More...") : i18n.tr("Less...")
3636 gradient: UbuntuColors.orangeGradient
3737 onClicked: expanded = !expanded
38− width: c.maxWidth
38+ width: column.maxWidth
3939 }
4040
4141 Column {
@@ -50,11 +50,8 @@ Item {
5050 Repeater {
5151 id: actionRepeater
5252
53− delegate: Button {
54− objectName: "button" + modelData.id
55− text: modelData.label || ""
56− iconSource: modelData.icon || ""
57− gradient: UbuntuColors.orangeGradient
53+ delegate: PreviewActionButton {
54+ data: modelData
5855 height: moreButton.expanded ? implicitHeight : 0
5956 width: implicitWidth < parent.width ? parent.width : implicitWidth
6057 visible: height > 0
tests/qmltests/Dash/Previews/tst_PreviewActions.qml+3−3
@@ -57,21 +57,21 @@ Rectangle {
5757 id: oneAction
5858 widgetId: "button"
5959 widgetData: actionDataOneAction
60− onTriggered: console.log("triggered", widgetId, actionId, data);
60+ onTriggered: console.log("triggered", widgetId, actionId);
6161 }
6262
6363 PreviewActions {
6464 id: buttonAndCombo
6565 widgetId: "buttonAndCombo"
6666 widgetData: actionDataFiveActions
67− onTriggered: console.log("triggered", widgetId, actionId, data);
67+ onTriggered: console.log("triggered", widgetId, actionId);
6868 }
6969
7070 PreviewActions {
7171 id: twoActions
7272 widgetId: "2buttons"
7373 widgetData: actionDataTwoActions
74− onTriggered: console.log("triggered", widgetId, actionId, data);
74+ onTriggered: console.log("triggered", widgetId, actionId);
7575 }
7676 }
7777