diff --git a/ScreenPlay/qml/Common/Util.js b/ScreenPlay/qml/Common/Util.js index 2b5c9484..1d552bb4 100644 --- a/ScreenPlay/qml/Common/Util.js +++ b/ScreenPlay/qml/Common/Util.js @@ -1,4 +1,3 @@ - function isWallpaper(type) { return type === InstalledType.VideoWallpaper || type === InstalledType.HTMLWallpaper @@ -9,6 +8,18 @@ function isWallpaper(type) { } function isWidget(type) { - return type === InstalledType.HTMLWidget - || type === InstalledType.QMLWidget + return type === InstalledType.HTMLWidget || type === InstalledType.QMLWidget } + +function isScene(type) { + return type === InstalledType.HTMLWallpaper + || type === InstalledType.QMLWallpaper + || type === InstalledType.WebsiteWallpaper + || type === InstalledType.GodotWallpaper +} + +function isVideo(type) { + return type === InstalledType.VideoWallpaper + || type === InstalledType.GifWallpaper +} + diff --git a/ScreenPlay/qml/Installed/ScreenPlayItem.qml b/ScreenPlay/qml/Installed/ScreenPlayItem.qml index 8877373a..3818de0a 100644 --- a/ScreenPlay/qml/Installed/ScreenPlayItem.qml +++ b/ScreenPlay/qml/Installed/ScreenPlayItem.qml @@ -16,7 +16,7 @@ Item { property string customTitle property string screenId property url absoluteStoragePath - property var type: InstalledType.Unknown + property int type: InstalledType.Unknown property var publishedFileID: 0 property int itemIndex property bool isScrolling: false @@ -24,10 +24,17 @@ Item { signal openContextMenu(point position) onTypeChanged: { - if (JSUtil.isWallpaper()) { + if (JSUtil.isWidget(type)) { icnType.source = "qrc:/assets/icons/icon_widgets.svg" - } else { + return + } + if (JSUtil.isScene(type)) { + icnType.source = "qrc:/assets/icons/icon_code.svg" + return + } + if (JSUtil.isVideo(type)) { icnType.source = "qrc:/assets/icons/icon_movie.svg" + return } } @@ -126,6 +133,7 @@ Item { text: root.customTitle font.family: ScreenPlay.settings.font font.pointSize: 16 + visible: !screenPlayItemImage.visible color: Material.primaryTextColor anchors.centerIn: parent horizontalAlignment: Text.AlignHCenter @@ -146,7 +154,7 @@ Item { id: icnType width: 20 height: 20 - opacity: 0 + opacity: 0.25 source: "qrc:/assets/icons/icon_movie.svg" sourceSize: Qt.size(20, 20) anchors { @@ -220,8 +228,8 @@ Item { OpacityAnimator { target: icnType duration: 80 - from: 0.5 - to: 1 + from: 0.25 + to: .8 } OpacityAnimator { target: effect @@ -249,8 +257,8 @@ Item { OpacityAnimator { target: icnType duration: 80 - from: 1 - to: 0.5 + from: .8 + to: 0.25 } OpacityAnimator { target: effect