Merge lp:~dpniel/ubuntu-filemanager-app/new-listitems into lp:ubuntu-filemanager-app

Proposed by Dan Chapman ξƒΏ on 2016-06-05
Status: Needs review
Proposed branch: lp:~dpniel/ubuntu-filemanager-app/new-listitems
Merge into: lp:ubuntu-filemanager-app
Prerequisite: lp:~dpniel/ubuntu-filemanager-app/new-page-header
Diff against target: 133 lines (+53/-27)
3 files modified
po/com.ubuntu.filemanager.pot (+1/-1)
src/app/qml/components/FolderListDelegate.qml (+27/-12)
src/app/qml/components/PlacesSidebar.qml (+25/-14)
To merge this branch: bzr merge lp:~dpniel/ubuntu-filemanager-app/new-listitems
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve on 2016-06-10
Alan Pope 🍺🐧🐱 πŸ¦„ 2016-06-05 Approve on 2016-06-09
Review via email: mp+296500@code.launchpad.net

Commit message

Migrate FolderListDelegate and Places delegate to new ListItem

Description of the change

Migrate FolderListDelegate and Places delegate to new ListItem

To post a comment you must log in.
review: Approve (continuous-integration)

LGTM! Thanks!

review: Approve

FAILED: Autolanding.
More details in the following jenkins job:
https://core-apps-jenkins.ubuntu.com/job/filemanager-app-autolanding/44/
Executed test runs:
    None: https://core-apps-jenkins.ubuntu.com/job/generic-land-mp/5756/console

review: Needs Fixing (continuous-integration)
Dan Chapman ξƒΏ (dpniel) wrote :

meh. pot file conflict. Probably from the updated page-header branch.

Doh, can you fix and we'll land it?

Dan Chapman ξƒΏ (dpniel) wrote :

forgot to push it last night. Doing it now :-D

544. By Dan Chapman ξƒΏ on 2016-06-10

Fix pot conflicts

review: Approve (continuous-integration)

Unmerged revisions

544. By Dan Chapman ξƒΏ on 2016-06-10

Fix pot conflicts

543. By Dan Chapman ξƒΏ on 2016-06-05

Migrate FolderListDelegate and Places delegate to new ListItem

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/com.ubuntu.filemanager.pot'
2--- po/com.ubuntu.filemanager.pot 2016-06-09 11:17:57 +0000
3+++ po/com.ubuntu.filemanager.pot 2016-06-10 13:37:51 +0000
4@@ -8,7 +8,7 @@
5 msgstr ""
6 "Project-Id-Version: \n"
7 "Report-Msgid-Bugs-To: \n"
8-"POT-Creation-Date: 2016-06-09 12:17+0100\n"
9+"POT-Creation-Date: 2016-06-10 14:34+0100\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13
14=== modified file 'src/app/qml/components/FolderListDelegate.qml'
15--- src/app/qml/components/FolderListDelegate.qml 2016-01-18 10:32:34 +0000
16+++ src/app/qml/components/FolderListDelegate.qml 2016-06-10 13:37:51 +0000
17@@ -17,23 +17,38 @@
18 */
19 import QtQuick 2.4
20 import Ubuntu.Components 1.3
21-import Ubuntu.Components.ListItems 1.3 as ListItem
22 import org.nemomobile.folderlistmodel 1.0
23
24-ListItem.Subtitled {
25+ListItem {
26 objectName: "folder" + index
27
28 property string fileName: model.fileName
29 property string filePath: path
30
31- text: model.fileName
32- subText: itemDateAndSize(model)
33-
34- property string path: fileView.folder + '/' + model.fileName
35- iconSource: fileIcon(path, model)
36-
37- progression: model.isBrowsable
38- iconFrame: false
39-
40- selected: model.isSelected
41+ height: layout.height
42+ // Because Flickable is used over ListView??
43+ // we cannot set the highlight component so
44+ // instead fudge it here with a rectangle.
45+ Rectangle {
46+ anchors.fill: parent
47+ color: UbuntuColors.silk
48+ visible: model.isSelected
49+ }
50+
51+ ListItemLayout {
52+ id: layout
53+ title.text: model.fileName
54+ subtitle.text: itemDateAndSize(model)
55+
56+ Icon {
57+ property string path: fileView.folder + '/' + model.fileName
58+ source: fileIcon(path, model)
59+ height: units.gu(5); width: height
60+ SlotsLayout.position: SlotsLayout.Leading
61+ }
62+
63+ ProgressionSlot{
64+ visible: model.isBrowsable
65+ }
66+ }
67 }
68
69=== modified file 'src/app/qml/components/PlacesSidebar.qml'
70--- src/app/qml/components/PlacesSidebar.qml 2016-04-07 17:27:53 +0000
71+++ src/app/qml/components/PlacesSidebar.qml 2016-06-10 13:37:51 +0000
72@@ -60,10 +60,21 @@
73
74 model: userplaces
75
76- delegate: Standard {
77+ delegate: ListItem {
78 objectName: "place" + folderDisplayName(path).replace(/ /g,'')
79- text: folderDisplayName(path)
80- __foregroundColor: "black"
81+ divider.visible: !collapsed
82+ height: layout.height
83+
84+ onClicked: {
85+ goTo(model.path)
86+ }
87+
88+ Rectangle {
89+ id: selectedHighlight
90+ anchors.fill: parent
91+ color: UbuntuColors.silk
92+ visible: folder === path
93+ }
94
95 Image {
96 anchors {
97@@ -75,25 +86,25 @@
98 width: height
99
100 source: Qt.resolvedUrl("../icons/arrow.png")
101- opacity: selected && collapsed ? 1 : 0
102+ opacity: selectedHighlight.visible && collapsed ? 1 : 0
103
104 Behavior on opacity {
105 UbuntuNumberAnimation {}
106 }
107 }
108
109- iconSource: model.icon || fileIcon(model.path) //using only path, model is null
110+ ListItemLayout {
111+ id: layout
112+ height: units.gu(5)
113+ title.text: folderDisplayName(path)
114
115- onClicked: {
116- goTo(model.path)
117+ Icon {
118+ height: units.gu(4)
119+ width: height
120+ source: model.icon || fileIcon(model.path)
121+ SlotsLayout.position: SlotsLayout.Leading
122+ }
123 }
124-
125- height: units.gu(5)
126- showDivider: !collapsed
127-
128- // This refers to a parent FolderListPage.folder
129- selected: folder === path
130- iconFrame: false
131 }
132 }
133 }

Subscribers

People subscribed via source and target branches