diff options
Diffstat (limited to 'apps/com.pelagicore.map/panels/MapBoxPanel.qml')
-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; } |