diff --git a/ClusterAndHUD.qml b/ClusterAndHUD.qml index af8b7ea..394764d 100644 --- a/ClusterAndHUD.qml +++ b/ClusterAndHUD.qml @@ -30,6 +30,7 @@ import QtQuick 2.1 import QtQuick.Window 2.1 +import io.qt.ApplicationManager 1.0 import utils 1.0 import "sysui/Cluster" @@ -37,6 +38,7 @@ Main { id: root Window { + id: cluster title: "CSD" height: 720 width: 1920 @@ -45,5 +47,8 @@ Main { Cluster {} } - Component.onCompleted: Style.withCluster = true + Component.onCompleted: { + WindowManager.registerOutputWindow(cluster) + Style.withCluster = true + } } diff --git a/apps/com.pelagicore.music/ClusterWidget.qml b/apps/com.pelagicore.music/ClusterWidget.qml index 9261b36..19cbc8d 100644 --- a/apps/com.pelagicore.music/ClusterWidget.qml +++ b/apps/com.pelagicore.music/ClusterWidget.qml @@ -35,7 +35,7 @@ import controls 1.0 import "." Item { - width: 800 + width: 1300 height: parent.height ListView { @@ -44,7 +44,7 @@ Item { height: parent.height anchors.centerIn: parent clip: true - model: MusicProvider.model + model: MusicProvider.nowPlaying.model currentIndex: MusicProvider.currentIndex highlight: Rectangle { color: Style.colorWhite; opacity: 0.25 diff --git a/apps/com.pelagicore.music/Music.qml b/apps/com.pelagicore.music/Music.qml index 583814f..e2e77ad 100644 --- a/apps/com.pelagicore.music/Music.qml +++ b/apps/com.pelagicore.music/Music.qml @@ -39,10 +39,10 @@ AppUIScreen { onClusterKeyPressed: { if (key === Qt.Key_Down) { - MusicProvider.currentIndex-- + MusicProvider.next() } else if (key === Qt.Key_Up) { - MusicProvider.currentIndex++ + MusicProvider.previous() } } @@ -50,7 +50,7 @@ AppUIScreen { MusicProvider.initialize() } - //cluster: ClusterWidget {} + cluster: ClusterWidget {} AppStackView { id: stack diff --git a/modules/utils/AppUIScreen.qml b/modules/utils/AppUIScreen.qml index 5b22b80..9552c07 100644 --- a/modules/utils/AppUIScreen.qml +++ b/modules/utils/AppUIScreen.qml @@ -122,13 +122,14 @@ ApplicationManagerWindow { ApplicationManagerWindow { id: cluster - width: parent ? parent.width : 0 - height: parent ? parent.height : 0 + width: parent ? parent.width : Style.cellWidth * 24 + height: parent ? parent.height : Style.cellHeight * 24 visible: false Item { id: clusterContainer anchors.fill: parent } + color: "transparent" Component.onCompleted: { if (pelagicoreWindow._clusterSet) { diff --git a/sysui/Cluster/Middle.qml b/sysui/Cluster/Middle.qml index e14b6c3..26e2dd7 100644 --- a/sysui/Cluster/Middle.qml +++ b/sysui/Cluster/Middle.qml @@ -67,8 +67,6 @@ Item { width: stack.width height: stack.height title: "NAVIGATOR" - - Tracer {} } WidgetContainer { id: musicContainer @@ -94,23 +92,26 @@ Item { Connections { target: AppsService onClusterWidgetReady: { -// if (category === "media") { -// musicContainer.content = item -// stack.currentIndex = 1 -// } - if (category === "navigation") { - navContainer.content = item + var container; + if (category === "media") { + container = musicContainer + stack.currentIndex = 1 + } else if (category === "navigation") { + container = navContainer stack.currentIndex = 0 + } else { + container = otherContainer + stack.currentIndex = 2 } -// else { -// otherContainer.content = item -// stack.currentIndex = 2 -// } + + item.parent = container + container.content = item + item.width = container.width + item.height = container.height } } Keys.onPressed: { - //print("key pressed", Qt.Key_Plus, event.key) if (event.key === Qt.Key_Right) { if (stack.currentIndex < stack.count) stack.currentIndex++ diff --git a/sysui/Cluster/WidgetContainer.qml b/sysui/Cluster/WidgetContainer.qml index ce51c59..6f460e5 100644 --- a/sysui/Cluster/WidgetContainer.qml +++ b/sysui/Cluster/WidgetContainer.qml @@ -41,8 +41,10 @@ Item { default property alias content: container.children Keys.onPressed: { - if (container.children[0]) + if (container.children[0]) { WindowManager.setSurfaceWindowProperty(container.children[0], "keyPressed", event.key) + WindowManager.setSurfaceWindowProperty(container.children[0], "keyPressed", 0) + } } Item {