Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
5dcee981
Commit
5dcee981
authored
Jan 17, 2018
by
Gus Grubba
Browse files
UI Tweak
parent
33946ff3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/AutoPilotPlugins/Common/SetupPage.qml
View file @
5dcee981
...
...
@@ -35,6 +35,8 @@ QGCView {
property
bool
_shouldDisableWhenArmed
:
_vehicleArmed
?
(
vehicleComponent
?
!
vehicleComponent
.
allowSetupWhileArmed
:
false
)
:
false
property
real
_margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
property
string
_pageTitle
:
qsTr
(
"
%1 Setup
"
).
arg
(
pageName
)
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
setupPanel
.
enabled
}
...
...
@@ -55,7 +57,7 @@ QGCView {
QGCLabel
{
font.pointSize
:
ScreenTools
.
largeFontPointSize
text
:
qsTr
(
"
%1 Setup
"
).
arg
(
pageName
)
text
:
_shouldDisableWhenArmed
?
_pageTitle
+
"
<font color=
\"
red
\"
>
"
+
qsTr
(
"
(Disabled while the vehicle is armed)
"
)
+
"
</font>
"
:
_pageTitle
visible
:
!
ScreenTools
.
isShortScreen
}
...
...
@@ -73,30 +75,14 @@ QGCView {
anchors.topMargin
:
_margins
anchors.top
:
headingColumn
.
bottom
}
// Overlay to display when vehicle is armed and this setup page needs
// to be disabled
Rectangle
{
visible
:
_shouldDisableWhenArmed
anchors.fill
:
pageLoader
color
:
"
black
"
opacity
:
0.5
}
}
}
// Overlay to display when vehicle is armed and this setup page needs
// to be disabled
Item
{
visible
:
_shouldDisableWhenArmed
anchors.fill
:
parent
z
:
9999
Rectangle
{
anchors.fill
:
parent
color
:
"
black
"
opacity
:
0.5
}
QGCLabel
{
anchors.margins
:
defaultTextWidth
*
2
anchors.fill
:
parent
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
largeFontPointSize
color
:
"
red
"
text
:
qsTr
(
"
Setup disabled while the vehicle is armed
"
)
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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