[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-mediacenter] components/mediabrowser: Add busy indicator, adjust to PA metadatamodel changes
From:       Shantanu Tushar <shaan7in () gmail ! com>
Date:       2012-07-28 19:13:13
Message-ID: 20120728191313.44FD8A6094 () git ! kde ! org
[Download RAW message or body]

Git commit 65d5b94708051901a58df47799fcf33f7d7b8764 by Shantanu Tushar.
Committed on 28/07/2012 at 20:10.
Pushed by shantanu into branch 'master'.

Add busy indicator, adjust to PA metadatamodel changes

M  +8    -7    components/mediabrowser/MediaItemDelegate.qml
M  +1    -1    components/mediabrowser/MediaItemDelegateLogic.js

http://commits.kde.org/plasma-mediacenter/65d5b94708051901a58df47799fcf33f7d7b8764

diff --git a/components/mediabrowser/MediaItemDelegate.qml \
b/components/mediabrowser/MediaItemDelegate.qml index e7716f6..c41f207 100644
--- a/components/mediabrowser/MediaItemDelegate.qml
+++ b/components/mediabrowser/MediaItemDelegate.qml
@@ -62,9 +62,8 @@ Item {
 
                 Loader {
                     id: iconImageLoader
-                    width: parent.width * 0.95
+                    width: parent.width
                     height: parent.height - (itemText.visible ? itemText.height : 0 \
                );
-                    anchors.centerIn: parent
 
                     function checkAndLoad()
                     {
@@ -72,17 +71,21 @@ Item {
                     }
 
                     Component.onCompleted: checkAndLoad()
+
+                    PlasmaComponents.BusyIndicator {
+                        anchors.centerIn: parent
+                        running: workaroundForDecorationUpdate.text.length == 0
+                        visible: running
+                    }
                 }
 
                 Component {
                     id: delegateItemImageComponent
                     Image {
                         id: delegateItemImage
-                        width: parent.width
-                        height: parent.height
                         anchors.horizontalCenter: parent.horizontalCenter
                         fillMode: Image.PreserveAspectCrop
-                        sourceSize.width: width * 2
+                        sourceSize.width: width * mediaItemDelegateItem.scale
                         sourceSize.height: 0
                         asynchronous: true
                         source: rootColumn.source
@@ -93,8 +96,6 @@ Item {
                     id: delegateItemIconComponent
                     QtExtraComponents.QIconItem {
                         id: delegateItemIcon
-                        width: parent.width
-                        height: parent.height
                         anchors.horizontalCenter: parent.horizontalCenter
                         icon: {
                             if (typeof rootColumn.source == "string")
diff --git a/components/mediabrowser/MediaItemDelegateLogic.js \
b/components/mediabrowser/MediaItemDelegateLogic.js index 3b52c99..7e209d6 100644
--- a/components/mediabrowser/MediaItemDelegateLogic.js
+++ b/components/mediabrowser/MediaItemDelegateLogic.js
@@ -20,7 +20,7 @@
 function checkAndLoad(loader)
 {
     if (typeof(decoration) == "string") {
-        if (decoration.search('[a-z]+://') == 0) {
+        if (decoration.search('/') == 0) {
             loadImage(loader);
         } else {
             loadIcon(loader);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic