@@ -22,12 +22,11 @@ import "../../../qml/Components/ListItems" as ListItems
23 id: socialAttributes
23 id: socialAttributes
24 spacing: units.gu(0.5)
24 spacing: units.gu(0.5)
25− height: divider.height + spacing + grid.height
27 property alias model: repeater.model
26 property alias model: repeater.model
28 property color color: theme.palette.normal.baseText
27 property color color: theme.palette.normal.baseText
30− signal clicked(var result)
29+ signal clicked(var actionId)
32 ListItems.ThinDivider {
31 ListItems.ThinDivider {
33 id: divider
32 id: divider
@@ -35,32 +34,39 @@ Column {
35 anchors { left: parent.left; right: parent.right; }
34 anchors { left: parent.left; right: parent.right; }
38− GridLayout {
37+ Row {
41 left: parent.left
40 left: parent.left
42 right: parent.right
41 right: parent.right
43 leftMargin: units.gu(1)
42 leftMargin: units.gu(1)
44 rightMargin: units.gu(1)
43 rightMargin: units.gu(1)
46+ readonly property int visibleItems: {
46− columns: width > units.gu(12) ? 4 : 2
47+ if (width <= units.gu(12)) // small card
47− rowSpacing: units.gu(2)
48+ return 2;
49+ else if (width <= units.gu(21)) // medium card
51+ else // large or horizontal card
49 Repeater {
55 Repeater {
50 id: repeater
56 id: repeater
51− delegate: Row {
57+ delegate: Loader {
52− objectName: "delegate" + index
53− spacing: units.gu(0.5)
54 height: units.gu(2)
58 height: units.gu(2)
59+ active: index < row.visibleItems
55− AbstractButton {
60+ sourceComponent: AbstractButton {
61+ objectName: "delegate" + index
56 height: units.gu(2)
62 height: units.gu(2)
57 width: icon.width
63 width: icon.width
60 objectName: "icon"
66 objectName: "icon"
62− property url urlIcon: "icon" in modelData && modelData["icon"] || ""
68+ readonly property url urlIcon: "image://theme/ok"
63− property url urlTemporaryIcon: "temporaryIcon" in modelData && modelData["temporaryIcon"] || ""
69+ readonly property url urlTemporaryIcon: "temporaryIcon" in modelData && modelData["temporaryIcon"] || ""
65 height: units.gu(2)
71 height: units.gu(2)
66 // FIXME Workaround for bug https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1421293
72 // FIXME Workaround for bug https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1421293