Browse Source

Rework setup button to fit in lower resolution displays

QGC4.4
Don Gagne 10 years ago
parent
commit
503f9aa934
  1. 6
      src/QmlControls/SetupButton.qml
  2. 4
      src/VehicleSetup/SetupView.ui
  3. 2
      src/VehicleSetup/SetupViewButtons.qml

6
src/QmlControls/SetupButton.qml

@ -7,7 +7,7 @@ import QGroundControl.Palette 1.0
Button { Button {
checkable: true checkable: true
height: 80 height: 60
text: "Button" text: "Button"
property bool setupComplete: true property bool setupComplete: true
@ -22,7 +22,7 @@ Button {
background: Rectangle { background: Rectangle {
id: innerRect id: innerRect
readonly property real titleHeight: 30 readonly property real titleHeight: 20
border.color: control.checked ? "#eee333" : "#676767" border.color: control.checked ? "#eee333" : "#676767"
radius: 10 radius: 10
@ -45,7 +45,7 @@ Button {
Rectangle { Rectangle {
id: setupIndicator id: setupIndicator
readonly property real indicatorRadius: 6 readonly property real indicatorRadius: 4
x: parent.width - (indicatorRadius * 2) - 5 x: parent.width - (indicatorRadius * 2) - 5
y: (parent.height - (indicatorRadius * 2)) / 2 y: (parent.height - (indicatorRadius * 2)) / 2

4
src/VehicleSetup/SetupView.ui

@ -24,13 +24,13 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>160</width> <width>120</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>160</width> <width>120</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>

2
src/VehicleSetup/SetupViewButtons.qml

@ -46,7 +46,7 @@ Rectangle {
SetupButton { SetupButton {
id: summaryButton; objectName: "summaryButton" id: summaryButton; objectName: "summaryButton"
width: parent.width width: parent.width
text: "VEHICLE SUMMARY" text: "SUMMARY"
setupIndicator: false setupIndicator: false
exclusiveGroup: setupButtonGroup exclusiveGroup: setupButtonGroup
onClicked: topLevel.summaryButtonClicked() onClicked: topLevel.summaryButtonClicked()

Loading…
Cancel
Save