diff options
author | Daniel d'Andrada <daniel.dandrada@luxoft.com> | 2018-11-29 13:41:12 +0100 |
---|---|---|
committer | Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com> | 2018-11-29 13:03:07 +0000 |
commit | 1beb5e2fb784f97a23d34452d90205ee9b8cc3ed (patch) | |
tree | abb8980d185a0af685b8b8a08e20b798fc5c9b82 /apps | |
parent | 0fc9cc70b3e0612d8d6b8bc08196b7cc5441984a (diff) |
[climate] Fix popup dimensions and coordinates
Change-Id: I433f88e3070438572fa491ab1183f67caa24c625
Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/com.pelagicore.climate/views/ClimateView.qml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/com.pelagicore.climate/views/ClimateView.qml b/apps/com.pelagicore.climate/views/ClimateView.qml index aee34934..eea2d163 100644 --- a/apps/com.pelagicore.climate/views/ClimateView.qml +++ b/apps/com.pelagicore.climate/views/ClimateView.qml @@ -64,8 +64,13 @@ Item { ClimatePopup { id: climatePopup - originItemX: Math.round(Config.centerConsoleWidth / 2); - originItemY: Config.centerConsoleHeight - Math.round(root.height / 2); + + // have to forward scale from root item as ClimatePopup is a Window, not an Item, + // so value propagation doesn't quite apply + Sizes.scale: root.Sizes.scale + + originItemX: Sizes.dp(Config.centerConsoleWidth / 2); + originItemY: Sizes.dp(Config.centerConsoleHeight) - Math.round(root.height / 2); popupY: Sizes.dp(Config.centerConsoleHeight) - climatePopup.height - Sizes.dp(90); } } |