@@ -1,5 +1,5 @@
11/*
2− * Copyright 2013 Canonical Ltd.
2+ * Copyright 2013-2016 Canonical Ltd.
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU Lesser General Public License as published by
@@ -15,11 +15,11 @@
1515 *
1616 * Authors:
1717 * Renato Araujo Oliveira Filho <renato@canonical.com>
18+ * Marco Trevisan <marco.trevisan@canonical.com>
1819 */
1920
2021import QtQuick 2.4
2122import Ubuntu.Components 1.3
22−import Ubuntu.Components.ListItems 1.3 as ListItem
2323import Unity.Indicators 0.1 as Indicators
2424import "../.."
2525import "../../../Components"
@@ -28,7 +28,9 @@ Page {
2828 id: page
2929 anchors.fill: parent
3030 property string profile: ""
31− title: "Plugin list"
31+ header: PageHeader {
32+ title: "Indicators List"
33+ }
3234
3335 Indicators.IndicatorsModel {
3436 id: indicatorsModel
@@ -42,32 +44,24 @@ Page {
4244 anchors.fill: parent
4345 model: indicatorsModel
4446
45− delegate: Rectangle {
46− color: "#221e1c"
47−
48− anchors.left: parent.left
49− anchors.right: parent.right
50− height: menuItem.height
47+ delegate: ListItem {
48+ objectName: identifier
49+ height: menuItem.height + (divider.visible ? divider.height : 0)
5150
52− ListItem.Standard {
51+ ListItemLayout {
5352 id: menuItem
54− anchors.left: parent.left
55− anchors.right: parent.right
56− objectName: identifier
57−
58− text: identifier
59−
60− onClicked: {
61− var new_page = Qt.createComponent("IndicatorRepresentation.qml");
62− if (new_page.status !== Component.Ready) {
63− if (new_page.status === Component.Error)
64− console.error("Error: " + new_page.errorString());
53+ title.text: identifier
54+ }
6555
66− return;
67− }
56+ onClicked: {
57+ var new_page = Qt.createComponent("IndicatorRepresentation.qml");
58+ if (new_page.status !== Component.Ready) {
59+ if (new_page.status === Component.Error)
60+ console.error("Error: " + new_page.errorString());
6861
69− page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties });
62+ return;
7063 }
64+ page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties });
7165 }
7266 }
7367 }