on xenial help sign in
Added default Header Components. Used in indicators.
c7da358Nick Dedekind
qml/Components/Header.qmlnew file+27
@@ -0,0 +1,27 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ */
16+
17+import Ubuntu.Components 1.1
18+import Ubuntu.Components.Themes.Ambiance 1.1
19+
20+PageHeadStyle {
21+ id: root
22+
23+ property var styledItem: root
24+ property string title
25+ property var config: PageHeadConfiguration {}
26+ property var contents: null
27+}
qml/Panel/MenuContent.qml+2−3
@@ -16,7 +16,7 @@
16
16
17import QtQuick 2.0
17import QtQuick 2.0
18import QtQuick.Layouts 1.1
18import QtQuick.Layouts 1.1
19−import Ubuntu.Components 0.1
19+import Ubuntu.Components 1.1
20import Unity.Indicators 0.1 as Indicators
20import Unity.Indicators 0.1 as Indicators
21import Utils 0.1
21import Utils 0.1
22import "../Components"
22import "../Components"
@@ -71,7 +71,7 @@ Rectangle {
71 boundsBehavior: Flickable.StopAtBounds
71 boundsBehavior: Flickable.StopAtBounds
72 cacheBuffer: 1073741823
72 cacheBuffer: 1073741823
73
73
74− delegate: PageHeader {
74+ delegate: Header {
75 width: ListView.view.width
75 width: ListView.view.width
76 height: implicitHeight
76 height: implicitHeight
77
77
@@ -79,7 +79,6 @@ Rectangle {
79
79
80 IndicatorDelegate {
80 IndicatorDelegate {
81 id: indicatorDelegate
81 id: indicatorDelegate
82−
83 Component.onCompleted: {
82 Component.onCompleted: {
84 for(var pName in indicatorProperties) {
83 for(var pName in indicatorProperties) {
85 if (indicatorDelegate.hasOwnProperty(pName)) {
84 if (indicatorDelegate.hasOwnProperty(pName)) {