From kde-commits Sat Jul 28 19:13:13 2012 From: Shantanu Tushar Date: Sat, 28 Jul 2012 19:13:13 +0000 To: kde-commits Subject: [plasma-mediacenter] components/mediabrowser: Add busy indicator, adjust to PA metadatamodel changes Message-Id: <20120728191313.44FD8A6094 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=134350307324321 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/65d5b94708051901a58df47799fcf33f7= d7b8764 diff --git a/components/mediabrowser/MediaItemDelegate.qml b/components/med= iabrowser/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.h= eight : 0 ); - anchors.centerIn: parent = function checkAndLoad() { @@ -72,17 +71,21 @@ Item { } = Component.onCompleted: checkAndLoad() + + PlasmaComponents.BusyIndicator { + anchors.centerIn: parent + running: workaroundForDecorationUpdate.text.length= =3D=3D 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.sc= ale 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 =3D=3D "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) =3D=3D "string") { - if (decoration.search('[a-z]+://') =3D=3D 0) { + if (decoration.search('/') =3D=3D 0) { loadImage(loader); } else { loadIcon(loader);