ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #03846
[Merge] lp:~akiva/ubuntu-filemanager-app/img-thumbnail-support into lp:ubuntu-filemanager-app
Akiva has proposed merging lp:~akiva/ubuntu-filemanager-app/img-thumbnail-support into lp:ubuntu-filemanager-app.
Commit message:
State:
- Functional, but not tested extensively so abnormal situations could lead to instability.
- Needs testing on a phone
- My autopilot fails trunk on 10 tests, the same 10 tests fail on this.
Changelog:
- Added Thumbnail support for images, Gif, Png, JPG, and SVG.
- Increased width of labels in Icon View, to allow longer strings to not be condensed.
- Updated the ListView to ubuntu components, 1.2. This deprecated the .listview component, so it was reimplimented.
- As a result of the deprecation, the new list columns are now taller than before.
Todo:
- Investigate a strange bug, that causes the thumbnails to flicker when the window is made full screen. It doesn't happen in any other case. I would like to try this on Mir to see if the flicker remains.
- Test ram, as loading a pictures folder will increase the ram roughly by the contents within.
Requested reviews:
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot): continuous-integration
Ubuntu File Manager Developers (ubuntu-filemanager-dev)
Related bugs:
Bug #1466620 in Ubuntu File Manager App: "no jpeg preview in file manager application"
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1466620
For more details, see:
https://code.launchpad.net/~akiva/ubuntu-filemanager-app/img-thumbnail-support/+merge/265927
Thumbnail support for jpg gif png svg
--
Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~akiva/ubuntu-filemanager-app/img-thumbnail-support into lp:ubuntu-filemanager-app.
=== modified file 'po/com.ubuntu.filemanager.pot'
--- po/com.ubuntu.filemanager.pot 2015-06-03 11:54:36 +0000
+++ po/com.ubuntu.filemanager.pot 2015-07-27 06:37:31 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-03-12 21:23+0100\n"
+"POT-Creation-Date: 2015-07-09 02:05-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -27,7 +27,7 @@
msgstr[1] ""
#: ../src/app/qml/components/PathHistoryRow.qml:84
-#: ../src/app/qml/ui/FolderListPage.qml:830
+#: ../src/app/qml/ui/FolderListPage.qml:840
msgid "Device"
msgstr ""
@@ -311,32 +311,32 @@
msgid "Open with another app"
msgstr ""
-#: ../src/app/qml/ui/FolderListPage.qml:798
+#: ../src/app/qml/ui/FolderListPage.qml:808
msgid "~/Desktop"
msgstr ""
-#: ../src/app/qml/ui/FolderListPage.qml:808
+#: ../src/app/qml/ui/FolderListPage.qml:818
msgid "~/Public"
msgstr ""
-#: ../src/app/qml/ui/FolderListPage.qml:810
+#: ../src/app/qml/ui/FolderListPage.qml:820
msgid "~/Programs"
msgstr ""
-#: ../src/app/qml/ui/FolderListPage.qml:812
+#: ../src/app/qml/ui/FolderListPage.qml:822
msgid "~/Templates"
msgstr ""
-#: ../src/app/qml/ui/FolderListPage.qml:828
+#: ../src/app/qml/ui/FolderListPage.qml:838
msgid "Home"
msgstr ""
-#: ../src/app/qml/ui/FolderListPage.qml:898
+#: ../src/app/qml/ui/FolderListPage.qml:908
msgid "Folder not accessible"
msgstr ""
#. TRANSLATORS: this refers to a folder name
-#: ../src/app/qml/ui/FolderListPage.qml:900
+#: ../src/app/qml/ui/FolderListPage.qml:910
#, qt-format
msgid "Can not access %1"
msgstr ""
@@ -403,19 +403,23 @@
msgid "Filter"
msgstr ""
-#: ../src/plugin/folderlistmodel/dirmodel.cpp:418
+#: ../src/plugin/folderlistmodel/dirmodel.cpp:374
+msgid "unkown"
+msgstr ""
+
+#: ../src/plugin/folderlistmodel/dirmodel.cpp:470
msgid "path or url may not exist or cannot be read"
msgstr ""
-#: ../src/plugin/folderlistmodel/dirmodel.cpp:585
+#: ../src/plugin/folderlistmodel/dirmodel.cpp:638
msgid "Rename error"
msgstr ""
-#: ../src/plugin/folderlistmodel/dirmodel.cpp:610
+#: ../src/plugin/folderlistmodel/dirmodel.cpp:663
msgid "Error creating new folder"
msgstr ""
-#: ../src/plugin/folderlistmodel/dirmodel.cpp:1252
+#: ../src/plugin/folderlistmodel/dirmodel.cpp:1299
msgid "items"
msgstr ""
@@ -508,6 +512,14 @@
msgid "Could not remove the trash info file"
msgstr ""
+#: ../src/plugin/folderlistmodel/smb/qsambaclient/src/smbusershare.cpp:72
+msgid "net tool not found, check samba installation"
+msgstr ""
+
+#: ../src/plugin/folderlistmodel/smb/qsambaclient/src/smbusershare.cpp:80
+msgid "cannot write in "
+msgstr ""
+
#: com.ubuntu.filemanager.desktop.in.in.h:1
msgid "File Manager"
msgstr ""
=== modified file 'src/app/qml/components/FolderIconDelegate.qml'
--- src/app/qml/components/FolderIconDelegate.qml 2014-09-20 10:49:51 +0000
+++ src/app/qml/components/FolderIconDelegate.qml 2015-07-27 06:37:31 +0000
@@ -29,7 +29,7 @@
Rectangle {
anchors.centerIn: parent
- // anchors.verticalCenterOffset: units.gu(0.5)
+ // anchors.verticalCenterOffset: units.gu(0.5)
height: parent.height// + units.gu(1)
width: height
@@ -69,9 +69,10 @@
Image {
id: image
anchors.centerIn: parent
- width: units.gu(6)
- height: width
-
+ height: parent.height
+ width: height
+ fillMode: Image.PreserveAspectCrop
+ mipmap: true
source: delegate.icon
}
@@ -116,7 +117,7 @@
bottomMargin: units.gu(0.75)
}
- width: expand ? implicitWidth : (parent.width - units.gu(0.5))
+ width: expand ? implicitWidth : (parent.width + units.gu(1.5))
Behavior on width {
UbuntuNumberAnimation {}
=== modified file 'src/app/qml/components/FolderListDelegate.qml'
--- src/app/qml/components/FolderListDelegate.qml 2014-09-20 10:49:51 +0000
+++ src/app/qml/components/FolderListDelegate.qml 2015-07-27 06:37:31 +0000
@@ -16,24 +16,47 @@
* Authored by: Arto Jalkanen <ajalkane@xxxxxxxxx>
*/
import QtQuick 2.3
-import Ubuntu.Components 1.1
-import Ubuntu.Components.ListItems 1.0 as ListItem
+import Ubuntu.Components 1.2
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: Qt.formatDateTime(model.modifiedDate, Qt.DefaultLocaleShortDate) + (!model.isDir ? ", " + fileSize : "")
-
property string path: fileView.folder + '/' + model.fileName
- iconSource: fileIcon(path, model.isDir)
-
- progression: model.isDir
- iconFrame: false
selected: model.isSelected
+
+ Label { // Text
+ text: model.fileName
+ color: "white"
+ fontSize: "medium"
+ anchors.left: parent.left
+ anchors.leftMargin: units.gu(8)
+ anchors.top: parent.top
+ anchors.topMargin: units.gu(1)
+ }
+
+ Label { // Subtext
+ text: Qt.formatDateTime(model.modifiedDate, Qt.DefaultLocaleShortDate) + (!model.isDir ? ", " + fileSize : "")
+ color: "grey"
+ fontSize: "small"
+ anchors.left: parent.left
+ anchors.leftMargin: units.gu(8)
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: units.gu(1)
+ }
+
+ Image { // Icon
+ id: image
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.leftMargin: units.gu(1)
+ anchors.left: parent.left
+ height: parent.height - units.gu(1)
+ width: height
+ fillMode: Image.PreserveAspectCrop
+ mipmap: true
+ source: fileIcon(path, model.isDir)
+ }
}
=== modified file 'src/app/qml/ui/FolderListPage.qml'
--- src/app/qml/ui/FolderListPage.qml 2015-06-20 19:13:13 +0000
+++ src/app/qml/ui/FolderListPage.qml 2015-07-27 06:37:31 +0000
@@ -793,6 +793,16 @@
var iconPath = isDir ? "/usr/share/icons/Humanity/places/48/folder.svg"
: "/usr/share/icons/Humanity/mimes/48/empty.svg"
+ /* Check for Image Files, and create thumbnail */
+ if (!isDir &&
+ file.slice(-4) === ".jpg"
+ || file.slice(-4) === ".png"
+ || file.slice(-4) === ".gif"
+ || file.slice(-4) === ".svg") {
+ return file;
+ }
+
+
if (file === userplaces.locationHome) {
iconPath = "../icons/folder-home.svg"
} else if (file === i18n.tr("~/Desktop")) {
Follow ups