diff options
author | Bramastyo Harimukti <bramastyo.harimukti.santoso@pelagicore.com> | 2018-06-11 14:16:56 +0200 |
---|---|---|
committer | Lukáš Tinkl <ltinkl@luxoft.com> | 2018-06-11 14:45:29 +0000 |
commit | d8332614c2ef7ba3d26b3b4ce35b735d4c470b6d (patch) | |
tree | 4b34a432047a8ffec480a2caa577600ba6b123e2 | |
parent | dc1699ee8f4fb796a6bf4215ca01a55e1841d0e2 (diff) |
[mapapp] get the correct scaled background of the tool button
Task-number: AUTOSUITE-548
Change-Id: Iae21f9e6aa068f3e865e0595eb1c8a343b23c356
Reviewed-by: Lukáš Tinkl <ltinkl@luxoft.com>
-rw-r--r-- | apps/com.pelagicore.map/panels/MapBoxPanel.qml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/com.pelagicore.map/panels/MapBoxPanel.qml b/apps/com.pelagicore.map/panels/MapBoxPanel.qml index 9d10b9f9..4111b308 100644 --- a/apps/com.pelagicore.map/panels/MapBoxPanel.qml +++ b/apps/com.pelagicore.map/panels/MapBoxPanel.qml @@ -217,9 +217,10 @@ Item { Behavior on opacity { DefaultNumberAnimation {} } visible: opacity > 0 width: NeptuneStyle.dp(background.sourceSize.width) - height: width + height: NeptuneStyle.dp(background.sourceSize.height) background: Image { - fillMode: Image.PreserveAspectFit + width: NeptuneStyle.dp(sourceSize.width) + height: NeptuneStyle.dp(sourceSize.height) source: helper.localAsset("floating-button-bg", NeptuneStyle.theme) } icon.source: checked ? Qt.resolvedUrl("../assets/ic-3D_ON.png") : Qt.resolvedUrl("../assets/ic-3D_OFF.png") @@ -236,14 +237,16 @@ Item { Behavior on opacity { DefaultNumberAnimation {} } visible: opacity > 0 width: NeptuneStyle.dp(background.sourceSize.width) - height: width + height: NeptuneStyle.dp(background.sourceSize.height) background: Image { - fillMode: Image.PreserveAspectFit + width: NeptuneStyle.dp(sourceSize.width) + height: NeptuneStyle.dp(sourceSize.height) source: helper.localAsset("floating-button-bg", NeptuneStyle.theme) } enabled: !checked checked: mainMap.center === root.currentLocation - icon.source: checked ? Qt.resolvedUrl("../assets/ic-my-position_ON.png") : Qt.resolvedUrl("../assets/ic-my-position_OFF.png") + icon.source: checked ? Qt.resolvedUrl("../assets/ic-my-position_ON.png") + : Qt.resolvedUrl("../assets/ic-my-position_OFF.png") onToggled: mainMap.center = root.currentLocation; } |