diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2016-10-13 13:01:51 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2016-10-13 11:15:16 +0000 |
commit | 105c1aa9d8d380275946d9cd8b3236e4c844969a (patch) | |
tree | 120797a6a918e71174163e1d51c2fe029514c046 /sysui | |
parent | 78e4a5a3a83f8156bd26341879c316823036d782 (diff) |
Performance improvement
The ListView of MenuScreen doesn't hide Item's which are currently not
on the screen. The logic has been improved to hide all Items which
are not on the Screen and are not needed for a transition.
In addition we make sure that the surface for the mapWidget is hidden
once the HomeScreen is not visible.
Change-Id: I1974ce997811366fe9f011612b5fa5d91aa7e76d
Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
Diffstat (limited to 'sysui')
-rw-r--r-- | sysui/Home/MapWidget.qml | 1 | ||||
-rw-r--r-- | sysui/MenuScreen.qml | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sysui/Home/MapWidget.qml b/sysui/Home/MapWidget.qml index fb81e18..9a419a3 100644 --- a/sysui/Home/MapWidget.qml +++ b/sysui/Home/MapWidget.qml @@ -67,6 +67,7 @@ UIPanel { ApplicationManagerInterface.mapWidget.width = Qt.binding(function () { return loader.width}) ApplicationManagerInterface.mapWidget.height = loader.height loader.children = ApplicationManagerInterface.mapWidget + ApplicationManagerInterface.mapWidget.visible = Qt.binding(function () { return root.visible}) } } } diff --git a/sysui/MenuScreen.qml b/sysui/MenuScreen.qml index aef4380..9abcb3e 100644 --- a/sysui/MenuScreen.qml +++ b/sysui/MenuScreen.qml @@ -60,24 +60,44 @@ PageSwipeScreen { MyCarPage { width: root.itemWidth height: root.height + visible: root.currentIndex === ObjectModel.index || + root.moving && + (root.currentIndex + 1 === ObjectModel.index || + root.currentIndex - 1 === ObjectModel.index) } FunctionsPage { width: root.itemWidth height: root.height + visible: root.currentIndex === ObjectModel.index || + root.moving && + (root.currentIndex + 1 === ObjectModel.index || + root.currentIndex - 1 === ObjectModel.index) } HomePage { width: root.itemWidth height: root.height + visible: root.currentIndex === ObjectModel.index || + root.moving && + (root.currentIndex + 1 === ObjectModel.index || + root.currentIndex - 1 === ObjectModel.index) } LauncherPage { id: launcher width: root.itemWidth height: root.height onUpdateApp: currentIndex = 3 + visible: root.currentIndex === ObjectModel.index || + root.moving && + (root.currentIndex + 1 === ObjectModel.index || + root.currentIndex - 1 === ObjectModel.index) } CloudPage { width: root.itemWidth height: root.height + visible: root.currentIndex === ObjectModel.index || + root.moving && + (root.currentIndex + 1 === ObjectModel.index || + root.currentIndex - 1 === ObjectModel.index) } } } |