diff options
author | Bramastyo Harimukti <bramastyo.harimukti.santoso@pelagicore.com> | 2018-01-29 12:21:08 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2018-02-01 10:50:59 +0000 |
commit | dedb15175d6efc9489b6b9894757b4d7cc260e0e (patch) | |
tree | 522c9640b1df24aa79c78999871a1a32547458f0 | |
parent | 644c1e15abebe0e2cc71bfc2f36253c0cb0f4b61 (diff) |
Fix some found bugs on Neptune
- add feature to cancel edit mode while swipe the UI screen or
touch the launcher background
- fix some layout issues
Change-Id: I28e8d8473b89d199c24a0e79c435688cf87c773d
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
-rw-r--r-- | Main.qml | 6 | ||||
-rw-r--r-- | apps/com.pelagicore.movies/MoviePlayer.qml | 14 | ||||
-rw-r--r-- | apps/com.pelagicore.movies/MovieTracks.qml | 4 | ||||
-rw-r--r-- | apps/com.pelagicore.music/CurrentTrackScreen.qml | 21 | ||||
-rw-r--r-- | apps/com.pelagicore.music/Library.qml | 25 | ||||
-rw-r--r-- | apps/com.pelagicore.music/LibraryList.qml | 4 | ||||
-rw-r--r-- | apps/com.pelagicore.music/Music.qml | 2 | ||||
-rw-r--r-- | neptune-ui.pro | 1 | ||||
-rw-r--r-- | sysui/cloud/AppGridItemDelegate.qml | 12 | ||||
-rw-r--r-- | sysui/cloud/AppStoreController.qml | 13 | ||||
-rw-r--r-- | sysui/display/LauncherPage.qml | 7 | ||||
-rw-r--r-- | sysui/display/MenuScreen.qml | 14 |
12 files changed, 70 insertions, 53 deletions
@@ -42,15 +42,17 @@ BackgroundPane { objectName: "MainContent" property bool showClusterIfPossible: ApplicationManager.systemProperties.showCluster - && Style.withCluster && ScreenManager.screenCount() > 1 + Component.onCompleted: { + Style.withCluster = root.showClusterIfPossible; + } + property var cluster width: Style.screenWidth height: Style.screenHeight padding: 0 - //Forwards the keys to the custer to handle it without being the active window Keys.forwardTo: clusterLoader.item ? clusterLoader.item.cluster : (displayLoader.item ? displayLoader.item : null) diff --git a/apps/com.pelagicore.movies/MoviePlayer.qml b/apps/com.pelagicore.movies/MoviePlayer.qml index 4833c8c..6976bbd 100644 --- a/apps/com.pelagicore.movies/MoviePlayer.qml +++ b/apps/com.pelagicore.movies/MoviePlayer.qml @@ -82,6 +82,7 @@ UIScreen { anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: Style.vspan(4) + height: Style.vspan(8) spacing: 0 opacity: root.hideControls?0.0:1.0 Behavior on opacity { @@ -91,14 +92,20 @@ UIScreen { anchors.horizontalCenter: parent.horizontalCenter spacing: Style.hspan(2) Tool { + Layout.preferredHeight: Style.vspan(1.5) + Layout.preferredWidth: Style.hspan(2) symbol: 'prev' onClicked: MovieModel.previous() } Tool { + Layout.preferredHeight: Style.vspan(1.5) + Layout.preferredWidth: Style.hspan(2) symbol: video.running?'pause':'play' onClicked: video.togglePlay() } Tool { + Layout.preferredHeight: Style.vspan(1.5) + Layout.preferredWidth: Style.hspan(2) symbol: 'next' onClicked: MovieModel.next() } @@ -108,7 +115,8 @@ UIScreen { value: video.position from: 0.00 to: video.duration - height: Style.vspan(1) + Layout.preferredWidth: Style.hspan(8) + Layout.preferredHeight: Style.vspan(1.5) function valueToString() { return Math.floor(value/60000) + ':' + Math.floor((value/1000)%60) } @@ -126,8 +134,8 @@ UIScreen { name: 'speaker' } VolumeSlider { - width: Style.hspan(8) - height: Style.vspan(2) + Layout.preferredWidth: Style.hspan(8) + Layout.preferredHeight: Style.vspan(2) anchors.horizontalCenter: parent.horizontalCenter value: video.volume onValueChanged: { diff --git a/apps/com.pelagicore.movies/MovieTracks.qml b/apps/com.pelagicore.movies/MovieTracks.qml index 367f63c..4f32121 100644 --- a/apps/com.pelagicore.movies/MovieTracks.qml +++ b/apps/com.pelagicore.movies/MovieTracks.qml @@ -63,7 +63,7 @@ UIScreen { spacing: 0 Spacer { Layout.preferredWidth: Style.hspan(8) - Layout.preferredHeight: Style.vspan(8) + Layout.preferredHeight: Style.vspan(6) } Item { Layout.preferredWidth: Style.hspan(4) @@ -125,7 +125,7 @@ UIScreen { anchors.horizontalCenter: parent.horizontalCenter orientation: Qt.Horizontal width: Style.hspan(22) - height: Style.vspan(8) + height: Style.vspan(9) currentIndex: MovieModel.currentIndex highlightMoveDuration: 150 delegate: MovieCoverDelegate { diff --git a/apps/com.pelagicore.music/CurrentTrackScreen.qml b/apps/com.pelagicore.music/CurrentTrackScreen.qml index dbbb119..01dbb8d 100644 --- a/apps/com.pelagicore.music/CurrentTrackScreen.qml +++ b/apps/com.pelagicore.music/CurrentTrackScreen.qml @@ -52,13 +52,17 @@ UIScreen { ColumnLayout { id: musicControl width: Style.hspan(12) - height: Style.vspan(16) - anchors.centerIn: parent - spacing: Style.isPotrait ? Style.vspan(1) : 0 + height: Style.vspan(17) + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: Style.vspan(1.4) + spacing: Style.isPotrait ? Style.vspan(1) : Style.vspan(0.6) + RowLayout { anchors.horizontalCenter: parent.horizontalCenter spacing: 0 Tool { + Layout.preferredHeight: Style.vspan(1.5) Layout.preferredWidth: Style.hspan(2) symbol: 'prev' onClicked: { MusicModel.previous() } @@ -68,7 +72,7 @@ UIScreen { contentWidth: Style.hspan(6) Layout.preferredWidth: Style.hspan(6) - Layout.preferredHeight: Style.isPotrait ? Style.vspan(5) : Style.vspan(10) + Layout.preferredHeight: Style.isPotrait ? Style.vspan(5) : Style.vspan(11) model: MusicModel.nowPlaying currentIndex: MusicModel.currentIndex @@ -86,6 +90,7 @@ UIScreen { } Tool { + Layout.preferredHeight: Style.vspan(1.5) Layout.preferredWidth: Style.hspan(2) symbol: 'next' onClicked: { MusicModel.next() } @@ -104,10 +109,11 @@ UIScreen { Slider { id: slider Layout.preferredWidth: Style.hspan(9) + Layout.preferredHeight: Style.vspan(1) value: MusicModel.position from: 0.00 to: MusicModel.duration - Layout.preferredHeight: Style.vspan(1) + function valueToString() { return Math.floor(value/60000) + ':' + Math.floor((value/1000)%60) } @@ -127,7 +133,7 @@ UIScreen { anchors.horizontalCenter: parent.horizontalCenter spacing: 0 Tool { - Layout.preferredWidth: Style.hspan(2) + Layout.preferredWidth: Style.hspan(1.5) symbol: 'shuffle' checked: MusicModel.shuffleOn onClicked: MusicModel.toggleShuffle() @@ -136,12 +142,13 @@ UIScreen { Spacer { Layout.preferredWidth: Style.hspan(2) } Tool { Layout.preferredWidth: Style.hspan(2) + Layout.preferredHeight: Style.vspan(1.8) symbol: MusicModel.playing?'pause':'play' onClicked: MusicModel.togglePlay() } Spacer { Layout.preferredWidth: Style.hspan(2) } Tool { - Layout.preferredWidth: Style.hspan(2) + Layout.preferredWidth: Style.hspan(1.5) symbol: 'loop' checked: MusicModel.repeatOn onClicked: MusicModel.toggleRepeat() diff --git a/apps/com.pelagicore.music/Library.qml b/apps/com.pelagicore.music/Library.qml index 754d8f1..98ab958 100644 --- a/apps/com.pelagicore.music/Library.qml +++ b/apps/com.pelagicore.music/Library.qml @@ -49,19 +49,6 @@ Control { color: "black" } - Tool { - id: closeButton - height: Style.vspan(1) - width: Style.hspan(1) - - anchors.right: parent.right - anchors.top: parent.top - anchors.topMargin: Style.vspan(2) - symbol: 'close' - size: Style.symbolSizeS - onClicked: root.close() - } - TabView { id: tabView width: root.width @@ -94,6 +81,18 @@ Control { nowPlaying: true } + // Close Button: used to close music library popup + Tool { + height: Style.vspan(1.5) + width: Style.hspan(1) + anchors.right: parent.right + anchors.top: parent.top + anchors.topMargin: Style.vspan(1.75) + symbol: 'close' + size: Style.symbolSizeS + onClicked: root.close() + } + Component { id: library LibraryList { diff --git a/apps/com.pelagicore.music/LibraryList.qml b/apps/com.pelagicore.music/LibraryList.qml index 37d02b1..ebecee9 100644 --- a/apps/com.pelagicore.music/LibraryList.qml +++ b/apps/com.pelagicore.music/LibraryList.qml @@ -134,8 +134,9 @@ Control { padding: Style.padding spacing: 0 Icon { + anchors.verticalCenter: parent.verticalCenter width: height - height: Style.vspan(3) + height: Style.vspan(2.8) fit: true source: model.item.coverArtUrl ? model.item.coverArtUrl : model.item.data.coverArtUrl } @@ -162,6 +163,7 @@ Control { Tool { width: Style.hspan(1) height: Style.vspan(3) + anchors.verticalCenter: parent.verticalCenter size: Style.symbolSizeS symbol: "close" visible: root.nowPlaying diff --git a/apps/com.pelagicore.music/Music.qml b/apps/com.pelagicore.music/Music.qml index 008a93f..2bee11c 100644 --- a/apps/com.pelagicore.music/Music.qml +++ b/apps/com.pelagicore.music/Music.qml @@ -49,7 +49,7 @@ AppUIScreen { } } - cluster: ClusterWidget {} + cluster: ClusterWidget { visible: Style.withCluster } AppStackView { diff --git a/neptune-ui.pro b/neptune-ui.pro index 917eebb..829a962 100644 --- a/neptune-ui.pro +++ b/neptune-ui.pro @@ -7,6 +7,7 @@ include(config.pri) SUBDIRS += plugins SUBDIRS += doc +QML_IMPORT_PATH += imports/shared imports/system sysui copydata.file = copydata.pro copydata.depends = plugins diff --git a/sysui/cloud/AppGridItemDelegate.qml b/sysui/cloud/AppGridItemDelegate.qml index a9ffc44..cf1c9e6 100644 --- a/sysui/cloud/AppGridItemDelegate.qml +++ b/sysui/cloud/AppGridItemDelegate.qml @@ -40,7 +40,7 @@ import utils 1.0 Control { id: root - property string icon + property alias icon: iconImage.source property alias titleText: titleLabel.text property alias subtitleText: subtitleLabel.text @@ -56,18 +56,12 @@ Control { Column { anchors.fill: parent anchors.bottomMargin: Style.padding - spacing: Style.paddingXL Image { id: iconImage - anchors.horizontalCenter: parent.horizontalCenter - width: Style.hspan(2) - - source: root.icon //Style.icon(root.icon) - fillMode: Image.PreserveAspectFit asynchronous: true } @@ -78,11 +72,9 @@ Control { Label { id: titleLabel - anchors.left: parent.left; anchors.right: parent.right anchors.margins: Style.padding font.capitalization: Font.AllUppercase - horizontalAlignment: Text.AlignHCenter font.pixelSize: Style.fontSizeS color: Style.colorWhite @@ -91,11 +83,9 @@ Control { Label { id: subtitleLabel - anchors.left: parent.left; anchors.right: parent.right anchors.margins: Style.padding font.capitalization: Font.AllUppercase - horizontalAlignment: Text.AlignHCenter font.pixelSize: Style.fontSizeXXS color: Style.colorGrey diff --git a/sysui/cloud/AppStoreController.qml b/sysui/cloud/AppStoreController.qml index eaf212d..b7b4eb1 100644 --- a/sysui/cloud/AppStoreController.qml +++ b/sysui/cloud/AppStoreController.qml @@ -104,28 +104,31 @@ Item { ListView { id: categoryView - clip: true Layout.fillHeight: true Layout.preferredWidth: Style.hspan(4) model: categoryModel header: Label { + height: Style.vspan(1.5) text: "CATEGORY" font.pixelSize: Style.fontSizeM } delegate: Button { - width: ListView.view.width + id: delegatedButton + width: categoryView.width + height: Style.vspan(1) text: model.name - highlighted: ListView.isCurrentItem + highlighted: categoryView.currentIndex === index onClicked: { - ListView.view.currentIndex = index; + categoryView.currentIndex = index; root.selectCategory(index); } } ScrollBar.vertical: ScrollBar { } } + AppGridView { id: appGrid // The graphics for the category list is not align to the grid, have to specify hardcoded values. @@ -135,9 +138,7 @@ Item { serverUrl: appstore.server cellWidth: Style.hspan(3) cellHeight: Style.vspan(5) - model: appModel - onRequestDownload: { root.download(appId); } diff --git a/sysui/display/LauncherPage.qml b/sysui/display/LauncherPage.qml index 57456f1..699ac81 100644 --- a/sysui/display/LauncherPage.qml +++ b/sysui/display/LauncherPage.qml @@ -41,6 +41,7 @@ import QtApplicationManager 1.0 UIPage { id: root + property alias editMode: view.editMode signal updateApp(int index) header: AppInfoPanel { @@ -117,5 +118,11 @@ UIPage { onPressAndHold: view.editMode = true } } + + MouseArea { + anchors.fill: parent + enabled: view.editMode + onClicked: view.editMode = false; + } } } diff --git a/sysui/display/MenuScreen.qml b/sysui/display/MenuScreen.qml index 1f795f7..3a63f8d 100644 --- a/sysui/display/MenuScreen.qml +++ b/sysui/display/MenuScreen.qml @@ -54,15 +54,16 @@ UIScreen { anchors.fill: parent interactive: !SettingsModel.settingsPageVisible currentIndex: SystemModel.currentPageIndex - onCurrentIndexChanged: SystemModel.currentPageIndex = currentIndex + onCurrentIndexChanged: { + launcher.editMode = false; + SystemModel.currentPageIndex = currentIndex; + } onCountChanged: SystemModel.pageCount = view.count - MyCarPage { - } + MyCarPage { } - FunctionsPage { - } + FunctionsPage { } Item { id: homePageContainer @@ -78,7 +79,6 @@ UIScreen { } } - CloudPage { - } + CloudPage { } } } |