Unverified Commit aad551c2 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6217 from DonLakeFlyer/TabletSizing

Fix compass rose sizing
parents 5f39c6ab 0d77a9cf
...@@ -440,16 +440,28 @@ Rectangle { ...@@ -440,16 +440,28 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
} }
ToolButton { Rectangle {
id: windRoseButton id: windRoseButton
anchors.verticalCenter: angleText.verticalCenter width: ScreenTools.implicitTextFieldHeight
iconSource: qgcPal.globalTheme === QGCPalette.Light ? "/res/wind-roseBlack.svg" : "/res/wind-rose.svg" height: width
visible: _vehicle.fixedWing color: qgcPal.button
visible: _vehicle.fixedWing
QGCColoredImage {
anchors.fill: parent
source: "/res/wind-rose.svg"
smooth: true
color: qgcPal.buttonText
}
onClicked: { QGCMouseArea {
windRosePie.angle = Number(gridAngleText.text) fillItem: parent
var cords = windRoseButton.mapToItem(_root, 0, 0)
windRosePie.popup(cords.x + windRoseButton.width / 2, cords.y + windRoseButton.height / 2) onClicked: {
windRosePie.angle = Number(gridAngleText.text)
var cords = windRoseButton.mapToItem(_root, 0, 0)
windRosePie.popup(cords.x + windRoseButton.width / 2, cords.y + windRoseButton.height / 2)
}
} }
} }
} }
...@@ -543,16 +555,28 @@ Rectangle { ...@@ -543,16 +555,28 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
} }
ToolButton { Rectangle {
id: manualWindRoseButton id: manualWindRoseButton
anchors.verticalCenter: manualAngleText.verticalCenter width: ScreenTools.implicitTextFieldHeight
Layout.columnSpan: 1 height: width
iconSource: qgcPal.globalTheme === QGCPalette.Light ? "/res/wind-roseBlack.svg" : "/res/wind-rose.svg" color: qgcPal.button
visible: _vehicle.fixedWing visible: _vehicle.fixedWing
onClicked: { QGCColoredImage {
var cords = manualWindRoseButton.mapToItem(_root, 0, 0) anchors.fill: parent
windRosePie.popup(cords.x + manualWindRoseButton.width / 2, cords.y + manualWindRoseButton.height / 2) source: "/res/wind-rose.svg"
smooth: true
color: qgcPal.buttonText
}
QGCMouseArea {
fillItem: parent
onClicked: {
windRosePie.angle = Number(gridAngleText.text)
var cords = manualWindRoseButton.mapToItem(_root, 0, 0)
windRosePie.popup(cords.x + manualWindRoseButton.width / 2, cords.y + manualWindRoseButton.height / 2)
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment