summaryrefslogtreecommitdiffstats
path: root/basicsuite/ebike-ui/StandaloneMain.qml
diff options
context:
space:
mode:
authorPasi Petäjäjärvi <pasi.petajajarvi@qt.io>2021-03-05 15:30:46 +0200
committerPasi Petäjäjärvi <pasi.petajajarvi@qt.io>2021-04-09 08:16:40 +0000
commitb209c46e68bee994c87366154d43737826494466 (patch)
treecbe3ef63f010a1aaa1ae12c8b9c9a11876380d2e /basicsuite/ebike-ui/StandaloneMain.qml
parentbc9b21b132c6459a4354e22d80e1db9bb447d1ea (diff)
perf: Improve performance on low end devices
Task-number: QTBUG-85573 Change-Id: I04168910f7b306e5e4a9287df496bb9af13b0159 Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Diffstat (limited to 'basicsuite/ebike-ui/StandaloneMain.qml')
-rw-r--r--basicsuite/ebike-ui/StandaloneMain.qml14
1 files changed, 14 insertions, 0 deletions
diff --git a/basicsuite/ebike-ui/StandaloneMain.qml b/basicsuite/ebike-ui/StandaloneMain.qml
index 40fb75f..ae83a75 100644
--- a/basicsuite/ebike-ui/StandaloneMain.qml
+++ b/basicsuite/ebike-ui/StandaloneMain.qml
@@ -48,6 +48,16 @@ Window {
id: window
visible: true
color: "#111520"
+
+ /* Updating Text properties dynamically can cause rebuild of whole SceneGraph node tree which is expensive.
+ Enabling this might help in that case to prevent full rebuild from happening.
+ More info see https://www.qt.io/blog/2017/01/19/shoot-foot-using-scene-graph-neat-optimization-trick-inside
+ */
+ readonly property bool clipDynamicText: false
+
+ /* SpeedView uses Canvas so it might be optimization when enabling layer for rendering it */
+ readonly property bool enableLayerForSpeedView: false
+
readonly property int portraitRotation: 90
property real rotation: Screen.orientation === Qt.PortraitOrientation ? portraitRotation : 0
property bool rotate: Screen.orientation === Qt.PortraitOrientation ? true : false
@@ -258,15 +268,18 @@ Window {
// List of pages
StatsPage {
+ visible: SwipeView.isCurrentItem
}
MainPage {
id: mainPage
+ visible: SwipeView.isCurrentItem
naviGuideArrowSource: naviPage.naviGuideArrowSource
naviGuideDistance: naviPage.naviGuideDistance
naviGuideAddress: naviPage.naviGuideAddress
}
NaviPage {
id: naviPage
+ visible: SwipeView.isCurrentItem
}
}
@@ -274,6 +287,7 @@ Window {
MusicPlayer {
id: musicPlayer
property string lastMusicPlayerState: "unknown"
+ visible: (musicPlayer.state == "hidden" ? false : true)
z: 1
}