@@ -1,5 +1,5 @@
2− * Copyright 2013 Canonical Ltd.
2+ * Copyright 2013-2016 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -15,11 +15,11 @@
16 * Authors:
16 * Authors:
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
18+ * Marco Trevisan <marco.trevisan@canonical.com>
20import QtQuick 2.4
21import QtQuick 2.4
21import Ubuntu.Components 1.3
22import Ubuntu.Components 1.3
22−import Ubuntu.Components.ListItems 1.3 as ListItem
23import Unity.Indicators 0.1 as Indicators
23import Unity.Indicators 0.1 as Indicators
24import "../.."
24import "../.."
25import "../../../Components"
25import "../../../Components"
@@ -28,7 +28,9 @@ Page {
29 anchors.fill: parent
29 anchors.fill: parent
30 property string profile: ""
30 property string profile: ""
31− title: "Plugin list"
31+ header: PageHeader {
32+ title: "Indicators List"
33 Indicators.IndicatorsModel {
35 Indicators.IndicatorsModel {
34 id: indicatorsModel
36 id: indicatorsModel
@@ -42,32 +44,24 @@ Page {
42 anchors.fill: parent
44 anchors.fill: parent
43 model: indicatorsModel
45 model: indicatorsModel
45− delegate: Rectangle {
47+ delegate: ListItem {
46− color: "#221e1c"
48+ objectName: identifier
48− anchors.left: parent.left
49− anchors.right: parent.right
50− height: menuItem.height
49+ height: menuItem.height + (divider.visible ? divider.height : 0)
52− ListItem.Standard {
51+ ListItemLayout {
53 id: menuItem
52 id: menuItem
54− anchors.left: parent.left
55− anchors.right: parent.right
56− objectName: identifier
58− text: identifier
53+ title.text: identifier
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());
66− return;
56+ onClicked: {
67− }
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());
69− page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties });
62+ return;
64+ page.pageStack.push(new_page.createObject(pages), {"indicatorProperties" : model.indicatorProperties });