diff options
author | Lukáš Tinkl <ltinkl@luxoft.com> | 2018-03-20 12:17:18 +0100 |
---|---|---|
committer | Daniel d'Andrada <daniel.dandrada@luxoft.com> | 2018-03-21 15:27:43 +0000 |
commit | 49f330a8d101dd44ee430c3107081e60099fa98b (patch) | |
tree | 46277f665467ce7a4d06dbdf4c3cb4bf95aea18d | |
parent | 2ec9cc8c5d9041bc5832bee83570762512376cad (diff) |
[maps] fix header and its erratic movement
- the header background now correctly spans the whole thing
- the search button is moved to the left a bit, in order not to covert
the "expand" button in the widget topright corner
- animations synched and cooled down to prevent motion sickness ;)
(esp. with 3D mode on)
Task-number: QTAUTO-925
Change-Id: Ie7ce83bc1a0aeb4174209671cc0347753d09d8af
Reviewed-by: Daniel d'Andrada <daniel.dandrada@luxoft.com>
-rw-r--r-- | apps/com.pelagicore.qtlocation/HeaderBackgroundWidget.qml | 2 | ||||
-rw-r--r-- | apps/com.pelagicore.qtlocation/MapHeader.qml | 2 | ||||
-rw-r--r-- | apps/com.pelagicore.qtlocation/MapView.qml | 11 |
3 files changed, 3 insertions, 12 deletions
diff --git a/apps/com.pelagicore.qtlocation/HeaderBackgroundWidget.qml b/apps/com.pelagicore.qtlocation/HeaderBackgroundWidget.qml index 84bc5570..9267d8f3 100644 --- a/apps/com.pelagicore.qtlocation/HeaderBackgroundWidget.qml +++ b/apps/com.pelagicore.qtlocation/HeaderBackgroundWidget.qml @@ -47,10 +47,8 @@ Item { anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top - anchors.topMargin: root.state === "Widget2Rows" ? -root.height/2 : 0 fillMode: Image.TileHorizontally source: Style.localAsset("navigation-widget-overlay-top", NeptuneStyle.theme) - Behavior on anchors.topMargin { DefaultNumberAnimation {} } Behavior on height { DefaultNumberAnimation {} } } } diff --git a/apps/com.pelagicore.qtlocation/MapHeader.qml b/apps/com.pelagicore.qtlocation/MapHeader.qml index a020899d..f5158404 100644 --- a/apps/com.pelagicore.qtlocation/MapHeader.qml +++ b/apps/com.pelagicore.qtlocation/MapHeader.qml @@ -106,7 +106,7 @@ Item { Loader { id: navigationSearchButtonsWidget - width: headerBackgroundWidget.width - Style.hspan(2) + width: headerBackgroundWidget.width - (184 * NeptuneStyle.scale) // compensate for the "expand" button in the widget corner height: headerBackgroundWidget.height active: headerBackgroundWidget.active anchors.top: headerBackgroundWidget.top diff --git a/apps/com.pelagicore.qtlocation/MapView.qml b/apps/com.pelagicore.qtlocation/MapView.qml index fb02f673..ca40b0d3 100644 --- a/apps/com.pelagicore.qtlocation/MapView.qml +++ b/apps/com.pelagicore.qtlocation/MapView.qml @@ -165,15 +165,8 @@ Item { anchors.rightMargin: guidanceMode ? Style.hspan(18) : 0 anchors.top: parent.top opacity: root.state !== "Widget1Row" && !offlineMapsEnabled ? 1 : 0 - Behavior on opacity { - SequentialAnimation { - PauseAnimation { duration: 180 } - DefaultNumberAnimation {} - } - } - Behavior on anchors.rightMargin { - DefaultNumberAnimation { } - } + Behavior on opacity { DefaultNumberAnimation {} } + Behavior on anchors.rightMargin { DefaultNumberAnimation {} } visible: opacity > 0 state: root.state |