aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigorii Zimin <gzimin@luxoft.com>2019-06-14 13:43:03 +0300
committerEgor Nemtsev <enemtsev@luxoft.com>2020-04-30 11:13:02 +0000
commitbfc35f5863bf6c9e497929fddc9ce155f0a285f0 (patch)
tree708fd4b038adb9de4ac26a5650c190bbb4cda4c2
parent80d22fd7ee87cc3deeba2d5228d2053f46c01e93 (diff)
remove sizes' bindings from IC and Hudv5.12.8_QtAS5.12
Change-Id: Ib6af5bf5dba421477cf70a682a5ed5f14ae28e46 Fixes: AUTOSUITE-1013 Fixes: AUTOSUITE-1581 Reviewed-by: Aleksei Korkov <akorkov@luxoft.com>
-rw-r--r--sysui/hud/HUDWindow.qml9
-rw-r--r--sysui/instrumentcluster/InstrumentClusterWindow.qml9
2 files changed, 14 insertions, 4 deletions
diff --git a/sysui/hud/HUDWindow.qml b/sysui/hud/HUDWindow.qml
index 5ed0ddb4..cf17aea5 100644
--- a/sysui/hud/HUDWindow.qml
+++ b/sysui/hud/HUDWindow.qml
@@ -44,8 +44,6 @@ Window {
property var hudAppInfo
property var hudStore
- width: Config.hudWidth
- height: Config.hudHeight
color: "black"
title: "Neptune 3 UI - HUD"
screen: root.hudStore.hudScreen
@@ -57,6 +55,13 @@ Window {
Component.onCompleted: {
// Would be better to use a regular property binding instead. But somehow, it doesn't work.
visible = true;
+
+ // Don't use bindings for setting up the initial size. Otherwise the binding is revaluated
+ // on every language change, which results in resetting the window size to it's initial state
+ // and might overwrite the size given by the OS or the user using the WindowManager
+ // It happens because QQmlEngine::retranslate() refreshes all the engine's bindings
+ width = Config.hudWidth
+ height = Config.hudHeight
}
Item {
diff --git a/sysui/instrumentcluster/InstrumentClusterWindow.qml b/sysui/instrumentcluster/InstrumentClusterWindow.qml
index 4a64b477..5817dac8 100644
--- a/sysui/instrumentcluster/InstrumentClusterWindow.qml
+++ b/sysui/instrumentcluster/InstrumentClusterWindow.qml
@@ -50,8 +50,6 @@ Window {
applicationICWindows.next();
}
- width: Config.instrumentClusterWidth
- height: Config.instrumentClusterHeight
color: "black"
title: root.clusterStore.clusterTitle
screen: root.clusterStore.clusterScreen
@@ -63,6 +61,13 @@ Window {
Component.onCompleted: {
// Would like to use a regular property binding instead. But it doesn't work and I don't know why
visible = true;
+
+ // Don't use bindings for setting up the initial size. Otherwise the binding is revaluated
+ // on every language change, which results in resetting the window size to it's initial state
+ // and might overwrite the size given by the OS or the user using the WindowManager
+ // It happens because QQmlEngine::retranslate() refreshes all the engine's bindings
+ width = Config.instrumentClusterWidth
+ height = Config.instrumentClusterHeight
}
Item {