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
dd078544
Commit
dd078544
authored
Mar 08, 2015
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1335 from dogmaphobic/toolBarTweaks
Tool bar tweaks
parents
af2d735d
5cf65f9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
QGCToolBarButton.qml
src/QmlControls/QGCToolBarButton.qml
+6
-3
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+9
-5
No files found.
src/QmlControls/QGCToolBarButton.qml
View file @
dd078544
...
...
@@ -3,12 +3,14 @@ import QtQuick.Controls 1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Controls
.
Private
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
Button
{
QGC
Button
{
id
:
button
property
bool
repaintChevron
:
false
property
var
__qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
property
bool
showHighlight
:
__showHighlight
style
:
ButtonStyle
{
background
:
Item
{
anchors.margins
:
3
...
...
@@ -21,6 +23,7 @@ Button {
onHoveredChanged
:
chevron
.
requestPaint
()
onPressedChanged
:
chevron
.
requestPaint
()
onCheckedChanged
:
chevron
.
requestPaint
()
onShowHighlightChanged
:
chevron
.
requestPaint
()
onRepaintChevronChanged
:
{
if
(
repaintChevron
)
{
chevron
.
requestPaint
()
...
...
@@ -42,7 +45,7 @@ Button {
context
.
lineTo
(
0
,
height
);
context
.
closePath
();
context
.
strokeStyle
=
__qgcPal
.
windowShade
context
.
fillStyle
=
(
button
.
hovered
&&
!
button
.
pressed
)
?
__qgcPal
.
buttonHighlight
:
(
button
.
checked
?
__qgcPal
.
buttonHighlight
:
__qgcPal
.
button
);
context
.
fillStyle
=
showHighlight
?
__qgcPal
.
buttonHighlight
:
(
button
.
checked
?
__qgcPal
.
buttonHighlight
:
__qgcPal
.
button
);
context
.
stroke
();
context
.
fill
();
}
...
...
@@ -52,7 +55,7 @@ Button {
text
:
button
.
text
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
color
:
(
button
.
hovered
&&
!
button
.
pressed
)
?
__qgcPal
.
buttonHighlightText
:
(
button
.
checked
?
__qgcPal
.
primaryButtonText
:
__qgcPal
.
buttonText
)
color
:
showHighlight
?
__qgcPal
.
buttonHighlightText
:
(
button
.
checked
?
__qgcPal
.
primaryButtonText
:
__qgcPal
.
buttonText
)
}
}
}
src/ui/toolbar/MainToolBar.qml
View file @
dd078544
...
...
@@ -46,11 +46,15 @@ Rectangle {
property
var
colorBlue
:
"
#1a6eaa
"
property
var
colorGreen
:
"
#079527
"
property
var
colorGreenText
:
"
#00d930
"
property
var
colorRed
:
"
#a81a1b
"
property
var
colorOrange
:
"
#a76f26
"
property
var
colorWhite
:
"
#f0f0f0
"
property
var
colorOrangeText
:
(
qgcPal
.
globalTheme
===
QGCPalette
.
Light
)
?
"
#b75711
"
:
"
#ea8225
"
property
var
colorRedText
:
(
qgcPal
.
globalTheme
===
QGCPalette
.
Light
)
?
"
#ee1112
"
:
"
#ef2526
"
property
var
colorGreenText
:
(
qgcPal
.
globalTheme
===
QGCPalette
.
Light
)
?
"
#046b1b
"
:
"
#00d930
"
property
var
colorWhiteText
:
(
qgcPal
.
globalTheme
===
QGCPalette
.
Light
)
?
"
#343333
"
:
"
#f0f0f0
"
id
:
toolBarHolder
color
:
qgcPal
.
windowShade
...
...
@@ -390,7 +394,7 @@ Rectangle {
font.pointSize
:
12
*
dpiFactor
font.weight
:
Font
.
DemiBold
anchors.centerIn
:
parent
color
:
(
mainToolBar
.
systemArmed
)
?
color
Red
:
colorGreen
color
:
(
mainToolBar
.
systemArmed
)
?
color
OrangeText
:
colorGreenText
}
}
...
...
@@ -409,7 +413,7 @@ Rectangle {
font.pointSize
:
12
*
dpiFactor
font.weight
:
Font
.
DemiBold
anchors.centerIn
:
parent
color
:
(
mainToolBar
.
currentState
===
"
STANDBY
"
)
?
colorGreen
:
colorRed
color
:
(
mainToolBar
.
currentState
===
"
STANDBY
"
)
?
colorGreen
Text
:
colorRedText
}
}
...
...
@@ -431,7 +435,7 @@ Rectangle {
font.weight
:
Font
.
DemiBold
anchors.horizontalCenter
:
parent
.
horizontalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
color
:
qgcPal
.
t
ext
color
:
colorWhiteT
ext
}
}
...
...
@@ -452,7 +456,7 @@ Rectangle {
font.weight
:
Font
.
DemiBold
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
color
:
colorRed
color
:
colorRed
Text
}
}
}
...
...
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