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
19d9faea
Commit
19d9faea
authored
Apr 04, 2018
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the Message Indicator respect palette settings
parent
07805f16
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
20 deletions
+22
-20
PowerComponent.h
src/AutoPilotPlugins/PX4/PowerComponent.h
+1
-1
MainWindowInner.qml
src/ui/MainWindowInner.qml
+20
-18
MessageIndicator.qml
src/ui/toolbar/MessageIndicator.qml
+1
-1
No files found.
src/AutoPilotPlugins/PX4/PowerComponent.h
View file @
19d9faea
...
@@ -25,7 +25,7 @@ public:
...
@@ -25,7 +25,7 @@ public:
PowerComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
PowerComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
// Overrides from VehicleComponent
// Overrides from VehicleComponent
virtual
QStringList
setupCompleteChangedTriggerList
(
void
)
const
;
QStringList
setupCompleteChangedTriggerList
(
void
)
const
override
;
// Overrides from VehicleComponent
// Overrides from VehicleComponent
QString
name
(
void
)
const
override
;
QString
name
(
void
)
const
override
;
...
...
src/ui/MainWindowInner.qml
View file @
19d9faea
...
@@ -213,9 +213,9 @@ Item {
...
@@ -213,9 +213,9 @@ Item {
}
}
function
formatMessage
(
message
)
{
function
formatMessage
(
message
)
{
message
=
message
.
replace
(
new
RegExp
(
"
<#E>
"
,
"
g
"
),
"
color:
#f95e5e
; font:
"
+
(
ScreenTools
.
defaultFontPointSize
.
toFixed
(
0
)
-
1
)
+
"
pt monospace;
"
);
message
=
message
.
replace
(
new
RegExp
(
"
<#E>
"
,
"
g
"
),
"
color:
"
+
qgcPal
.
warningText
+
"
; font:
"
+
(
ScreenTools
.
defaultFontPointSize
.
toFixed
(
0
)
-
1
)
+
"
pt monospace;
"
);
message
=
message
.
replace
(
new
RegExp
(
"
<#I>
"
,
"
g
"
),
"
color:
#f9b55e
; font:
"
+
(
ScreenTools
.
defaultFontPointSize
.
toFixed
(
0
)
-
1
)
+
"
pt monospace;
"
);
message
=
message
.
replace
(
new
RegExp
(
"
<#I>
"
,
"
g
"
),
"
color:
"
+
qgcPal
.
warningText
+
"
; font:
"
+
(
ScreenTools
.
defaultFontPointSize
.
toFixed
(
0
)
-
1
)
+
"
pt monospace;
"
);
message
=
message
.
replace
(
new
RegExp
(
"
<#N>
"
,
"
g
"
),
"
color:
#ffffff
; font:
"
+
(
ScreenTools
.
defaultFontPointSize
.
toFixed
(
0
)
-
1
)
+
"
pt monospace;
"
);
message
=
message
.
replace
(
new
RegExp
(
"
<#N>
"
,
"
g
"
),
"
color:
"
+
qgcPal
.
text
+
"
; font:
"
+
(
ScreenTools
.
defaultFontPointSize
.
toFixed
(
0
)
-
1
)
+
"
pt monospace;
"
);
return
message
;
return
message
;
}
}
...
@@ -401,21 +401,21 @@ Item {
...
@@ -401,21 +401,21 @@ Item {
//-- System Message Area
//-- System Message Area
Rectangle
{
Rectangle
{
id
:
messageArea
id
:
messageArea
function
close
()
{
currentPopUp
=
null
messageText
.
text
=
""
messageArea
.
visible
=
false
}
width
:
mainWindow
.
width
*
0.5
width
:
mainWindow
.
width
*
0.5
height
:
mainWindow
.
height
*
0.5
height
:
mainWindow
.
height
*
0.5
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.8
)
visible
:
false
radius
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
border.color
:
"
#808080
"
border.width
:
2
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.topMargin
:
toolBar
.
height
+
ScreenTools
.
defaultFontPixelHeight
anchors.topMargin
:
toolBar
.
height
+
ScreenTools
.
defaultFontPixelHeight
radius
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
color
:
qgcPal
.
window
border.color
:
qgcPal
.
text
visible
:
false
function
close
()
{
currentPopUp
=
null
messageText
.
text
=
""
messageArea
.
visible
=
false
}
MouseArea
{
MouseArea
{
// This MouseArea prevents the Map below it from getting Mouse events. Without this
// This MouseArea prevents the Map below it from getting Mouse events. Without this
// things like mousewheel will scroll the Flickable and then scroll the map as well.
// things like mousewheel will scroll the Flickable and then scroll the map as well.
...
@@ -435,11 +435,11 @@ Item {
...
@@ -435,11 +435,11 @@ Item {
id
:
messageText
id
:
messageText
readOnly
:
true
readOnly
:
true
textFormat
:
TextEdit
.
RichText
textFormat
:
TextEdit
.
RichText
color
:
"
white
"
color
:
qgcPal
.
text
}
}
}
}
//-- Dismiss System Message
//-- Dismiss System Message
Image
{
QGCColored
Image
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
...
@@ -450,6 +450,7 @@ Item {
...
@@ -450,6 +450,7 @@ Item {
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
mipmap
:
true
smooth
:
true
smooth
:
true
color
:
qgcPal
.
text
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
anchors.margins
:
ScreenTools
.
isMobile
?
-
ScreenTools
.
defaultFontPixelHeight
:
0
anchors.margins
:
ScreenTools
.
isMobile
?
-
ScreenTools
.
defaultFontPixelHeight
:
0
...
@@ -459,7 +460,7 @@ Item {
...
@@ -459,7 +460,7 @@ Item {
}
}
}
}
//-- Clear Messages
//-- Clear Messages
Image
{
QGCColored
Image
{
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
...
@@ -470,6 +471,7 @@ Item {
...
@@ -470,6 +471,7 @@ Item {
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
mipmap
:
true
smooth
:
true
smooth
:
true
color
:
qgcPal
.
text
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
onClicked
:
{
onClicked
:
{
...
...
src/ui/toolbar/MessageIndicator.qml
View file @
19d9faea
...
@@ -19,7 +19,7 @@ import QGroundControl.ScreenTools 1.0
...
@@ -19,7 +19,7 @@ import QGroundControl.ScreenTools 1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//--
GPS
Indicator
//--
Message
Indicator
Item
{
Item
{
width
:
height
width
:
height
anchors.top
:
parent
.
top
anchors.top
:
parent
.
top
...
...
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