Skip to content

Commit

Permalink
small screen test & dynamic position
Browse files Browse the repository at this point in the history
  • Loading branch information
akhenakh committed Jul 26, 2018
1 parent 6994c30 commit 959e1fe
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
12 changes: 6 additions & 6 deletions CarMap.qml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Rectangle {
gesture.acceptedGestures: MapGestureArea.PanGesture | MapGestureArea.FlickGesture | MapGestureArea.PinchGesture | MapGestureArea.RotationGesture | MapGestureArea.TiltGesture
gesture.flickDeceleration: 3000
gesture.enabled: true
tilt: 45.0
//tilt: 45.0
copyrightsVisible: false
RouteQuery {
id: aQuery
Expand Down Expand Up @@ -131,7 +131,7 @@ Rectangle {

IconAwesome {
id: iconSun
x: 1024 - 70
x: parent.width - 70
y: 30
width: 40
height: 40
Expand All @@ -141,14 +141,14 @@ Rectangle {
MouseArea {
anchors.fill: parent
onClicked: {
if (carMap.activeMapType == carMap.supportedMapTypes[0]) { carMap.activeMapType = carMap.supportedMapTypes[1] } else { carMap.activeMapType = carMap.supportedMapTypes[0]}
if (carMap.activeMapType === carMap.supportedMapTypes[0]) { carMap.activeMapType = carMap.supportedMapTypes[1] } else { carMap.activeMapType = carMap.supportedMapTypes[0]}
}
}
}

IconAwesome {
id: iconSearch
x: 1024 - 70
x: parent.width - 70
y: 120
width: 40
height: 40
Expand All @@ -158,7 +158,7 @@ Rectangle {
MouseArea {
anchors.fill: parent
onClicked: {
if (carMap.activeMapType == carMap.supportedMapTypes[0]) { carMap.activeMapType = carMap.supportedMapTypes[1] } else { carMap.activeMapType = carMap.supportedMapTypes[0]}
if (carMap.activeMapType === carMap.supportedMapTypes[0]) { carMap.activeMapType = carMap.supportedMapTypes[1] } else { carMap.activeMapType = carMap.supportedMapTypes[0]}
}
}
}
Expand All @@ -176,7 +176,7 @@ Rectangle {

if (matched) {
console.log("matched", mlat, mlng, mheading)
var coord = QtPositioning.coordinate(mlat, mlng).atDistanceAndAzimuth(
coord = QtPositioning.coordinate(mlat, mlng).atDistanceAndAzimuth(
screenCenter.distanceTo(bottomCenter), mheading);
// do not update the heading if low speed
if (speed > 1) {
Expand Down
18 changes: 12 additions & 6 deletions PageInfoForm.ui.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ Item {
}

TextInput {
x: 866
text: "Test Input"
anchors.bottom: parent.bottom
anchors.bottomMargin: 340
anchors.left: parent.left
anchors.leftMargin: 20
anchors.top: parent.top
anchors.topMargin: 20
anchors.right: parent.right
anchors.rightMargin: 20
font.pointSize: 30
font.family: robotoLight.name
font.weight: Font.Light // this is necessary or else it'll look like Roboto-Bold
cursorVisible: false
color: "#ffffff"
y: 223
width: 150
height: 30
}
Expand Down Expand Up @@ -84,7 +85,12 @@ Item {
anchors.topMargin: 40
anchors.left: parent.left
anchors.leftMargin: 20
font.pixelSize: 30
font.pointSize: 30
}
}
}

/*##^## Designer {
D{i:3;anchors_y:118}
}
##^##*/
4 changes: 2 additions & 2 deletions main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import QtPositioning 5.11
ApplicationWindow {
id: window
visible: true
width: 1024
height: 600
width: 800
height: 480
title: qsTr("Tabs")

Material.theme: Material.Dark
Expand Down

0 comments on commit 959e1fe

Please sign in to comment.