Move the title setting "up" in the hierarchy
commit2cd58ee80276cb138aa1fd7ac036b60d132612a5
authorAlbert Astals <albert.astals@canonical.com>
dateThu 23 Oct 2014, 10:21 (12 years ago)
parent2abfc99
qml/Dash/ScopesList.qml+8
@@ -98,7 +98,15 @@ Item {
9898 width: root.width
9999 sourceComponent: ScopesListCategory {
100100 objectName: "scopesListCategory" + categoryId
101+
101102 model: results
103+
104+ title: {
105+ if (isFavoritesFeed) return i18n.tr("Home");
106+ else if (isOtherFeed) return i18n.tr("Others");
107+ else return name;
108+ }
109+
102110 editMode: root.state == "edit"
103111
104112 isFavoritesFeed: categoryId == "favorites"
qml/Dash/ScopesListCategory.qml+1−5
@@ -23,6 +23,7 @@ Item {
2323 id: root
2424
2525 property alias model: list.model
26+ property alias title: header.text
2627 property var scopeStyle
2728 property bool editMode: false
2829 property bool isFavoritesFeed: false
@@ -41,11 +42,6 @@ Item {
4142 id: header
4243 width: root.width
4344 height: units.gu(5)
44− text: {
45− if (isFavoritesFeed) return i18n.tr("Home");
46− else if (isOtherFeed) return i18n.tr("Others");
47− else return name;
48− }
4945 color: scopeStyle ? scopeStyle.foreground : Theme.palette.normal.baseText
5046 }
5147