From 7f2d0f025fdb493bb0109011116ead2c52c64ac0 Mon Sep 17 00:00:00 2001 From: Bramastyo Harimukti Date: Thu, 31 Jan 2019 15:54:12 +0100 Subject: [tuner] some clean-ups and bring back the tuner slider Change-Id: Idf301a18366c5e11052ac48e9d6c6e66a8550c79 Reviewed-by: Dominik Holland --- apps/com.pelagicore.tuner/Main.qml | 57 +++++++--------------- .../views/FullScreenBottomView.qml | 6 +++ 2 files changed, 24 insertions(+), 39 deletions(-) diff --git a/apps/com.pelagicore.tuner/Main.qml b/apps/com.pelagicore.tuner/Main.qml index 99b398e4..df178d8e 100644 --- a/apps/com.pelagicore.tuner/Main.qml +++ b/apps/com.pelagicore.tuner/Main.qml @@ -42,46 +42,25 @@ import "views" 1.0 import shared.Style 1.0 import shared.Sizes 1.0 -QtObject { - property var mainWindow: ApplicationCCWindow { - id: mainWindow +ApplicationCCWindow { + id: root - MultiPointTouchArea { - id: multiPoint - anchors.fill: parent - anchors.margins: 30 - touchPoints: [ TouchPoint { id: touchPoint1 } ] - - property int count: 0 - onReleased: { - count += 1; - mainWindow.setWindowProperty("activationCount", count); - } - } - - ScalableBorderImage { - - x: mainWindow.exposedRect.x - y: mainWindow.exposedRect.y - Sizes.dp(224) - width: mainWindow.exposedRect.width - height: tunerAppContent.fullscreenTopHeight + mainWindow.exposedRect.y - y - border.top: sourceSize.height - Sizes.dp(1) - - opacity: (mainWindow.neptuneState === "Maximized") ? 1.0 : 0.0 - Behavior on opacity { DefaultNumberAnimation {} } - visible: opacity > 0 - - source: Style.image("app-fullscreen-top-bg") - } + Image { + x: root.exposedRect.x + y: root.exposedRect.y - Sizes.dp(224) + width: root.exposedRect.width + height: tunerAppContent.fullscreenTopHeight + root.exposedRect.y - y + source: Style.image("app-fullscreen-top-bg") + asynchronous: true + } - TunerView { - id: tunerAppContent - x: mainWindow.exposedRect.x - y: mainWindow.exposedRect.y - width: mainWindow.exposedRect.width - height: mainWindow.exposedRect.height - rootItem: mainWindow.contentItem - store: TunerStore { } - } + TunerView { + id: tunerAppContent + x: root.exposedRect.x + y: root.exposedRect.y + width: root.exposedRect.width + height: root.exposedRect.height + rootItem: root.contentItem + store: TunerStore { } } } diff --git a/apps/com.pelagicore.tuner/views/FullScreenBottomView.qml b/apps/com.pelagicore.tuner/views/FullScreenBottomView.qml index 7a265c74..7290453c 100644 --- a/apps/com.pelagicore.tuner/views/FullScreenBottomView.qml +++ b/apps/com.pelagicore.tuner/views/FullScreenBottomView.qml @@ -64,6 +64,12 @@ Item { musicSourcesPopup.originItemX = pos.x; musicSourcesPopup.originItemY = pos.y; musicSourcesPopup.visible = true; + } else if (currentText === "FM 1 band") { + root.store.freqPresets = 1; + } else if (currentText === "FM 2 band") { + root.store.freqPresets = 2; + } else if (currentText === "AM band") { + root.store.freqPresets = 0; } } } -- cgit v1.2.3