ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #09521
[Merge] lp:~dpniel/ubuntu-filemanager-app/new-listitems into lp:ubuntu-filemanager-app
Dan Chapman has proposed merging lp:~dpniel/ubuntu-filemanager-app/new-listitems into lp:ubuntu-filemanager-app with lp:~dpniel/ubuntu-filemanager-app/new-page-header as a prerequisite.
Commit message:
Migrate FolderListDelegate and Places delegate to new ListItem
Requested reviews:
Ubuntu File Manager Developers (ubuntu-filemanager-dev)
For more details, see:
https://code.launchpad.net/~dpniel/ubuntu-filemanager-app/new-listitems/+merge/296500
Migrate FolderListDelegate and Places delegate to new ListItem
--
Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~dpniel/ubuntu-filemanager-app/new-listitems into lp:ubuntu-filemanager-app.
=== modified file 'po/com.ubuntu.filemanager.pot'
--- po/com.ubuntu.filemanager.pot 2016-06-05 07:42:13 +0000
+++ po/com.ubuntu.filemanager.pot 2016-06-05 07:42:13 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-06-05 08:03+0100\n"
+"POT-Creation-Date: 2016-06-05 08:35+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
=== modified file 'src/app/qml/components/FolderListDelegate.qml'
--- src/app/qml/components/FolderListDelegate.qml 2016-01-18 10:32:34 +0000
+++ src/app/qml/components/FolderListDelegate.qml 2016-06-05 07:42:13 +0000
@@ -17,23 +17,38 @@
*/
import QtQuick 2.4
import Ubuntu.Components 1.3
-import Ubuntu.Components.ListItems 1.3 as ListItem
import org.nemomobile.folderlistmodel 1.0
-ListItem.Subtitled {
+ListItem {
objectName: "folder" + index
property string fileName: model.fileName
property string filePath: path
- text: model.fileName
- subText: itemDateAndSize(model)
-
- property string path: fileView.folder + '/' + model.fileName
- iconSource: fileIcon(path, model)
-
- progression: model.isBrowsable
- iconFrame: false
-
- selected: model.isSelected
+ height: layout.height
+ // Because Flickable is used over ListView??
+ // we cannot set the highlight component so
+ // instead fudge it here with a rectangle.
+ Rectangle {
+ anchors.fill: parent
+ color: UbuntuColors.silk
+ visible: model.isSelected
+ }
+
+ ListItemLayout {
+ id: layout
+ title.text: model.fileName
+ subtitle.text: itemDateAndSize(model)
+
+ Icon {
+ property string path: fileView.folder + '/' + model.fileName
+ source: fileIcon(path, model)
+ height: units.gu(5); width: height
+ SlotsLayout.position: SlotsLayout.Leading
+ }
+
+ ProgressionSlot{
+ visible: model.isBrowsable
+ }
+ }
}
=== modified file 'src/app/qml/components/PlacesSidebar.qml'
--- src/app/qml/components/PlacesSidebar.qml 2016-04-07 17:27:53 +0000
+++ src/app/qml/components/PlacesSidebar.qml 2016-06-05 07:42:13 +0000
@@ -60,10 +60,21 @@
model: userplaces
- delegate: Standard {
+ delegate: ListItem {
objectName: "place" + folderDisplayName(path).replace(/ /g,'')
- text: folderDisplayName(path)
- __foregroundColor: "black"
+ divider.visible: !collapsed
+ height: layout.height
+
+ onClicked: {
+ goTo(model.path)
+ }
+
+ Rectangle {
+ id: selectedHighlight
+ anchors.fill: parent
+ color: UbuntuColors.silk
+ visible: folder === path
+ }
Image {
anchors {
@@ -75,25 +86,25 @@
width: height
source: Qt.resolvedUrl("../icons/arrow.png")
- opacity: selected && collapsed ? 1 : 0
+ opacity: selectedHighlight.visible && collapsed ? 1 : 0
Behavior on opacity {
UbuntuNumberAnimation {}
}
}
- iconSource: model.icon || fileIcon(model.path) //using only path, model is null
+ ListItemLayout {
+ id: layout
+ height: units.gu(5)
+ title.text: folderDisplayName(path)
- onClicked: {
- goTo(model.path)
+ Icon {
+ height: units.gu(4)
+ width: height
+ source: model.icon || fileIcon(model.path)
+ SlotsLayout.position: SlotsLayout.Leading
+ }
}
-
- height: units.gu(5)
- showDivider: !collapsed
-
- // This refers to a parent FolderListPage.folder
- selected: folder === path
- iconFrame: false
}
}
}
Follow ups