Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
dcd33841
Commit
dcd33841
authored
Nov 25, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2284 from DonLakeFlyer/SetupButtons
Redesigned setup buttons to save space
parents
efab942f
98f7557b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
40 deletions
+23
-40
SubMenuButton.qml
src/QmlControls/SubMenuButton.qml
+16
-33
SetupView.qml
src/VehicleSetup/SetupView.qml
+7
-7
No files found.
src/QmlControls/SubMenuButton.qml
View file @
dcd33841
...
...
@@ -14,7 +14,7 @@ Button {
text
:
"
Button
"
///< Pass in your own button text
checkable
:
true
height
:
ScreenTools
.
defaultFontPixelHeight
*
5
height
:
ScreenTools
.
defaultFontPixelHeight
*
2.
5
style
:
ButtonStyle
{
id
:
buttonStyle
...
...
@@ -30,44 +30,27 @@ Button {
id
:
innerRect
color
:
showHighlight
?
qgcPal
.
buttonHighlight
:
qgcPal
.
windowShade
readonly
property
real
titleHeight
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
QGCColoredImage
{
id
:
image
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.verticalCenter
:
parent
.
verticalCenter
width
:
ScreenTools
.
defaultFontPixelHeight
*
2
height
:
ScreenTools
.
defaultFontPixelHeight
*
2
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
color
:
control
.
setupComplete
?
qgcPal
.
button
:
"
red
"
source
:
control
.
imageResource
}
QGCLabel
{
id
:
titleBar
width
:
parent
.
width
height
:
parent
.
titleHeight
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
image
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
verticalAlignment
:
TextEdit
.
AlignVCenter
horizontalAlignment
:
TextEdit
.
AlignHCenter
color
:
showHighlight
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
font.pixelSize
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelSize
*
0.75
:
ScreenTools
.
defaultFontPixelSize
text
:
control
.
text
Rectangle
{
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelWidth
/
3
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
width
:
ScreenTools
.
defaultFontPixelWidth
height
:
width
radius
:
width
/
2
color
:
control
.
setupComplete
?
"
#00d932
"
:
"
red
"
visible
:
control
.
setupIndicator
}
}
Rectangle
{
anchors.top
:
titleBar
.
bottom
anchors.bottom
:
parent
.
bottom
width
:
parent
.
width
color
:
qgcPal
.
windowShadeDark
QGCColoredImage
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
.
75
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectFit
smooth
:
true
color
:
showHighlight
?
qgcPal
.
buttonHighlight
:
qgcPal
.
button
source
:
control
.
imageResource
}
}
}
...
...
src/VehicleSetup/SetupView.qml
View file @
dcd33841
...
...
@@ -46,7 +46,7 @@ Rectangle {
readonly
property
real
_defaultTextHeight
:
ScreenTools
.
defaultFontPixelHeight
readonly
property
real
_defaultTextWidth
:
ScreenTools
.
defaultFontPixelWidth
readonly
property
real
_margin
:
_defaultTextHeight
/
2
readonly
property
real
_buttonWidth
:
_defaultTextWidth
*
1
7
readonly
property
real
_buttonWidth
:
_defaultTextWidth
*
1
8
readonly
property
string
_armedVehicleText
:
"
This operation cannot be performed while vehicle is armed.
"
property
string
_messagePanelText
:
"
missing message panel text
"
...
...
@@ -235,7 +235,7 @@ Rectangle {
setupIndicator
:
false
checked
:
true
exclusiveGroup
:
setupButtonGroup
text
:
"
S
UMMARY
"
text
:
"
S
ummary
"
onClicked
:
showSummaryPanel
()
}
...
...
@@ -247,7 +247,7 @@ Rectangle {
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
visible
:
!
ScreenTools
.
isMobile
text
:
"
F
IRMWARE
"
text
:
"
F
irmware
"
onClicked
:
showFirmwarePanel
()
}
...
...
@@ -258,7 +258,7 @@ Rectangle {
exclusiveGroup
:
setupButtonGroup
visible
:
_fullParameterVehicleAvailable
setupIndicator
:
false
text
:
"
PX4F
LOW
"
text
:
"
PX4F
low
"
onClicked
:
showPX4FlowPanel
()
}
...
...
@@ -269,7 +269,7 @@ Rectangle {
setupComplete
:
joystickManager
.
activeJoystick
?
joystickManager
.
activeJoystick
.
calibrated
:
false
exclusiveGroup
:
setupButtonGroup
visible
:
_fullParameterVehicleAvailable
&&
joystickManager
.
joysticks
.
length
!=
0
text
:
"
J
OYSTICK
"
text
:
"
J
oystick
"
onClicked
:
showJoystickPanel
()
}
...
...
@@ -283,7 +283,7 @@ Rectangle {
setupIndicator
:
modelData
.
requiresSetup
setupComplete
:
modelData
.
setupComplete
exclusiveGroup
:
setupButtonGroup
text
:
modelData
.
name
.
toUpperCase
()
text
:
modelData
.
name
onClicked
:
showVehicleComponentPanel
(
modelData
)
}
...
...
@@ -294,7 +294,7 @@ Rectangle {
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
visible
:
multiVehicleManager
.
parameterReadyVehicleAvailable
text
:
"
P
ARAMETERS
"
text
:
"
P
arameters
"
onClicked
:
showParametersPanel
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment