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
96f845d3
Commit
96f845d3
authored
Oct 20, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better light palette for mobile
Plus lots of other tweaks to ui for visuals
parent
904518b6
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
491 additions
and
210 deletions
+491
-210
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
RadioComponent.qml
src/AutoPilotPlugins/PX4/RadioComponent.qml
+13
-8
SensorsComponent.qml
src/AutoPilotPlugins/PX4/SensorsComponent.qml
+1
-0
QGCApplication.cc
src/QGCApplication.cc
+4
-0
QGCPalette.cc
src/QGCPalette.cc
+21
-16
QGCPalette.h
src/QGCPalette.h
+67
-64
ClickableColor.qml
src/QmlControls/ClickableColor.qml
+30
-0
DropButton.qml
src/QmlControls/DropButton.qml
+1
-1
IndicatorButton.qml
src/QmlControls/IndicatorButton.qml
+2
-0
ModeSwitchDisplay.qml
src/QmlControls/ModeSwitchDisplay.qml
+1
-1
QGCButton.qml
src/QmlControls/QGCButton.qml
+9
-6
QGroundControl.Controls.qmldir
src/QmlControls/QGroundControl.Controls.qmldir
+3
-1
QmlTest.qml
src/QmlControls/QmlTest.qml
+286
-94
QmlTestWidget.cc
src/QmlControls/QmlTestWidget.cc
+19
-0
QmlTestWidget.h
src/QmlControls/QmlTestWidget.h
+6
-0
RoundButton.qml
src/QmlControls/RoundButton.qml
+2
-1
ScreenToolsController.cc
src/QmlControls/ScreenToolsController.cc
+2
-0
SubMenuButton.qml
src/QmlControls/SubMenuButton.qml
+2
-2
SetupView.qml
src/VehicleSetup/SetupView.qml
+10
-7
VehicleSummary.qml
src/VehicleSetup/VehicleSummary.qml
+2
-2
MainWindow.qml
src/ui/MainWindow.qml
+1
-2
MainToolBar.qml
src/ui/toolbar/MainToolBar.qml
+6
-3
MainToolBarActiveVehicleComponent.qml
src/ui/toolbar/MainToolBarActiveVehicleComponent.qml
+2
-2
No files found.
qgroundcontrol.qrc
View file @
96f845d3
...
@@ -120,6 +120,7 @@
...
@@ -120,6 +120,7 @@
<file alias="QGroundControl/Controls/RoundButton.qml">src/QmlControls/RoundButton.qml</file>
<file alias="QGroundControl/Controls/RoundButton.qml">src/QmlControls/RoundButton.qml</file>
<file alias="QGroundControl/Controls/QGCCanvas.qml">src/QmlControls/QGCCanvas.qml</file>
<file alias="QGroundControl/Controls/QGCCanvas.qml">src/QmlControls/QGCCanvas.qml</file>
<file alias="QGroundControl/Controls/ExclusiveGroupItem.qml">src/QmlControls/ExclusiveGroupItem.qml</file>
<file alias="QGroundControl/Controls/ExclusiveGroupItem.qml">src/QmlControls/ExclusiveGroupItem.qml</file>
<file alias="QGroundControl/Controls/ClickableColor.qml">src/QmlControls/ClickableColor.qml</file>
<!-- Main Window -->
<!-- Main Window -->
<file alias="MainWindow.qml">src/ui/MainWindow.qml</file>
<file alias="MainWindow.qml">src/ui/MainWindow.qml</file>
...
...
src/AutoPilotPlugins/PX4/RadioComponent.qml
View file @
96f845d3
...
@@ -410,15 +410,17 @@ QGCView {
...
@@ -410,15 +410,17 @@ QGCView {
spacing
:
10
spacing
:
10
QGCButton
{
QGCButton
{
id
:
skipButton
id
:
skipButton
text
:
"
Skip
"
showBorder
:
true
text
:
"
Skip
"
onClicked
:
controller
.
skipButtonClicked
()
onClicked
:
controller
.
skipButtonClicked
()
}
}
QGCButton
{
QGCButton
{
id
:
cancelButton
id
:
cancelButton
text
:
"
Cancel
"
showBorder
:
true
text
:
"
Cancel
"
onClicked
:
controller
.
cancelButtonClicked
()
onClicked
:
controller
.
cancelButtonClicked
()
}
}
...
@@ -426,6 +428,7 @@ QGCView {
...
@@ -426,6 +428,7 @@ QGCView {
QGCButton
{
QGCButton
{
id
:
nextButton
id
:
nextButton
primary
:
true
primary
:
true
showBorder
:
true
text
:
"
Calibrate
"
text
:
"
Calibrate
"
onClicked
:
{
onClicked
:
{
...
@@ -468,16 +471,18 @@ QGCView {
...
@@ -468,16 +471,18 @@ QGCView {
}
}
QGCButton
{
QGCButton
{
id
:
bindButton
id
:
bindButton
text
:
"
Spektrum Bind
"
showBorder
:
true
text
:
"
Spektrum Bind
"
onClicked
:
showDialog
(
spektrumBindDialogComponent
,
dialogTitle
,
50
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
onClicked
:
showDialog
(
spektrumBindDialogComponent
,
dialogTitle
,
50
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
}
}
QGCButton
{
QGCButton
{
text
:
"
Copy Trims
"
showBorder
:
true
onClicked
:
showDialog
(
copyTrimsDialogComponent
,
dialogTitle
,
50
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
text
:
"
Copy Trims
"
onClicked
:
showDialog
(
copyTrimsDialogComponent
,
dialogTitle
,
50
,
StandardButton
.
Ok
|
StandardButton
.
Cancel
)
}
}
}
// Column - Left Column
}
// Column - Left Column
...
...
src/AutoPilotPlugins/PX4/SensorsComponent.qml
View file @
96f845d3
...
@@ -354,6 +354,7 @@ QGCView {
...
@@ -354,6 +354,7 @@ QGCView {
QGCButton
{
QGCButton
{
id
:
cancelButton
id
:
cancelButton
showBorder
:
true
text
:
"
Cancel
"
text
:
"
Cancel
"
enabled
:
false
enabled
:
false
onClicked
:
controller
.
cancelCalibration
()
onClicked
:
controller
.
cancelCalibration
()
...
...
src/QGCApplication.cc
View file @
96f845d3
...
@@ -434,7 +434,11 @@ bool QGCApplication::_initForNormalAppBoot(void)
...
@@ -434,7 +434,11 @@ bool QGCApplication::_initForNormalAppBoot(void)
_createSingletons
();
_createSingletons
();
#ifdef __mobile__
_styleIsDark
=
false
;
#else
_styleIsDark
=
settings
.
value
(
_styleKey
,
_styleIsDark
).
toBool
();
_styleIsDark
=
settings
.
value
(
_styleKey
,
_styleIsDark
).
toBool
();
#endif
_loadCurrentStyle
();
_loadCurrentStyle
();
// Exit main application when last window is closed
// Exit main application when last window is closed
...
...
src/QGCPalette.cc
View file @
96f845d3
...
@@ -34,22 +34,22 @@ QList<QGCPalette*> QGCPalette::_paletteObjects;
...
@@ -34,22 +34,22 @@ QList<QGCPalette*> QGCPalette::_paletteObjects;
QGCPalette
::
Theme
QGCPalette
::
_theme
=
QGCPalette
::
Dark
;
QGCPalette
::
Theme
QGCPalette
::
_theme
=
QGCPalette
::
Dark
;
QColor
QGCPalette
::
_window
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_window
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
0xDD
,
0xDD
,
0xDD
),
QColor
(
0xDD
,
0xDD
,
0xDD
)
},
{
QColor
(
"#ffffff"
),
QColor
(
"#ffffff"
)
},
{
QColor
(
0x22
,
0x22
,
0x22
),
QColor
(
0x22
,
0x22
,
0x22
)
}
{
QColor
(
0x22
,
0x22
,
0x22
),
QColor
(
0x22
,
0x22
,
0x22
)
}
};
};
QColor
QGCPalette
::
_windowShade
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_windowShade
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
204
,
204
,
204
),
QColor
(
204
,
204
,
204
)
},
{
QColor
(
"#d9d9d9"
),
QColor
(
"#d9d9d9"
)
},
{
QColor
(
51
,
51
,
51
),
QColor
(
51
,
51
,
51
)
}
{
QColor
(
51
,
51
,
51
),
QColor
(
51
,
51
,
51
)
}
};
};
QColor
QGCPalette
::
_windowShadeDark
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_windowShadeDark
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
216
,
216
,
216
),
QColor
(
216
,
216
,
216
)
},
{
QColor
(
"#bdbdbd"
),
QColor
(
"#bdbdbd"
)
},
{
QColor
(
40
,
40
,
40
),
QColor
(
40
,
40
,
40
)
}
{
QColor
(
40
,
40
,
40
),
QColor
(
40
,
40
,
40
)
}
};
};
QColor
QGCPalette
::
_text
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_text
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0
,
0
,
0
)
},
{
QColor
(
"#cccccc"
),
QColor
(
"#000000"
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0xFF
,
0xFF
,
0xFF
)
}
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0xFF
,
0xFF
,
0xFF
)
}
};
};
...
@@ -59,17 +59,17 @@ QColor QGCPalette::_warningText[QGCPalette::_cThemes][QGCPalette::_cColorGroups]
...
@@ -59,17 +59,17 @@ QColor QGCPalette::_warningText[QGCPalette::_cThemes][QGCPalette::_cColorGroups]
};
};
QColor
QGCPalette
::
_button
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_button
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
0x1b
,
0x6f
,
0xad
)
},
{
QColor
(
"#ffffff"
),
QColor
(
"#ffffff"
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
98
,
98
,
100
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
98
,
98
,
100
)
},
};
};
QColor
QGCPalette
::
_buttonText
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_buttonText
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
0x2c
,
0x2c
,
0x2c
),
QColor
(
0xFF
,
0xFF
,
0xFF
)
},
{
QColor
(
"#dedede"
),
QColor
(
"#000000"
)
},
{
QColor
(
0x2c
,
0x2c
,
0x2c
),
QColor
(
0xFF
,
0xFF
,
0xFF
)
},
{
QColor
(
0x2c
,
0x2c
,
0x2c
),
QColor
(
0xFF
,
0xFF
,
0xFF
)
},
};
};
QColor
QGCPalette
::
_buttonHighlight
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_buttonHighlight
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
237
,
235
,
51
)
},
{
QColor
(
"#e4e4e4"
),
QColor
(
"#e4e4e4"
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
237
,
235
,
51
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
237
,
235
,
51
)
},
};
};
...
@@ -89,12 +89,12 @@ QColor QGCPalette::_primaryButtonText[QGCPalette::_cThemes][QGCPalette::_cColorG
...
@@ -89,12 +89,12 @@ QColor QGCPalette::_primaryButtonText[QGCPalette::_cThemes][QGCPalette::_cColorG
};
};
QColor
QGCPalette
::
_textField
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_textField
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
255
,
255
,
255
)
},
{
QColor
(
"#ffffff"
),
QColor
(
"#ffffff"
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
255
,
255
,
255
)
},
{
QColor
(
0x58
,
0x58
,
0x58
),
QColor
(
255
,
255
,
255
)
},
};
};
QColor
QGCPalette
::
_textFieldText
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
QColor
QGCPalette
::
_textFieldText
[
QGCPalette
::
_cThemes
][
QGCPalette
::
_cColorGroups
]
=
{
{
QColor
(
0x2c
,
0x2c
,
0x2c
),
QColor
(
0
,
0
,
0
)
},
{
QColor
(
"#dedede"
),
QColor
(
"#000000"
)
},
{
QColor
(
0x2c
,
0x2c
,
0x2c
),
QColor
(
0
,
0
,
0
)
},
{
QColor
(
0x2c
,
0x2c
,
0x2c
),
QColor
(
0
,
0
,
0
)
},
};
};
...
@@ -131,18 +131,23 @@ void QGCPalette::setColorGroupEnabled(bool enabled)
...
@@ -131,18 +131,23 @@ void QGCPalette::setColorGroupEnabled(bool enabled)
void
QGCPalette
::
setGlobalTheme
(
Theme
newTheme
)
void
QGCPalette
::
setGlobalTheme
(
Theme
newTheme
)
{
{
// Mobile build does not have themes
if
(
_theme
!=
newTheme
)
{
if
(
_theme
!=
newTheme
)
{
_theme
=
newTheme
;
_theme
=
newTheme
;
_signalPaletteChangeToAll
();
// Notify all objects of the new theme
foreach
(
QGCPalette
*
palette
,
_paletteObjects
)
{
palette
->
_themeChanged
();
}
}
}
}
}
void
QGCPalette
::
_
themeChanged
(
void
)
void
QGCPalette
::
_
signalPaletteChangeToAll
(
void
)
{
{
emit
paletteChanged
();
// Notify all objects of the new theme
foreach
(
QGCPalette
*
palette
,
_paletteObjects
)
{
palette
->
_signalPaletteChanged
();
}
}
}
void
QGCPalette
::
_signalPaletteChanged
(
void
)
{
emit
paletteChanged
();
}
src/QGCPalette.h
View file @
96f845d3
This diff is collapsed.
Click to expand it.
src/QmlControls/ClickableColor.qml
0 → 100644
View file @
96f845d3
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Dialogs
1.2
Rectangle
{
id
:
_root
width
:
80
height
:
20
border.width
:
1
border.color
:
"
black
"
signal
colorSelected
(
var
color
)
ColorDialog
{
id
:
colorDialog
onAccepted
:
{
_root
.
colorSelected
(
colorDialog
.
color
)
colorDialog
.
close
()
}
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
colorDialog
.
color
=
_root
.
color
colorDialog
.
visible
=
true
}
}
}
src/QmlControls/DropButton.qml
View file @
96f845d3
...
@@ -161,7 +161,6 @@ Item {
...
@@ -161,7 +161,6 @@ Item {
radius
:
width
/
2
radius
:
width
/
2
border.width
:
2
border.width
:
2
border.color
:
"
white
"
border.color
:
"
white
"
opacity
:
checked
?
0.95
:
0.65
color
:
checked
?
qgcPal
.
mapButtonHighlight
:
qgcPal
.
mapButton
color
:
checked
?
qgcPal
.
mapButtonHighlight
:
qgcPal
.
mapButton
Image
{
Image
{
...
@@ -170,6 +169,7 @@ Item {
...
@@ -170,6 +169,7 @@ Item {
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
mipmap
:
true
smooth
:
true
smooth
:
true
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
onClicked
:
{
onClicked
:
{
...
...
src/QmlControls/IndicatorButton.qml
View file @
96f845d3
...
@@ -9,6 +9,8 @@ import QGroundControl.ScreenTools 1.0
...
@@ -9,6 +9,8 @@ import QGroundControl.ScreenTools 1.0
// indicator on the right edge.
// indicator on the right edge.
QGCButton
{
QGCButton
{
showBorder
:
true
property
bool
indicatorGreen
:
false
property
bool
indicatorGreen
:
false
Rectangle
{
Rectangle
{
...
...
src/QmlControls/ModeSwitchDisplay.qml
View file @
96f845d3
...
@@ -43,7 +43,7 @@ Rectangle {
...
@@ -43,7 +43,7 @@ Rectangle {
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
height
:
column
.
height
+
(
ScreenTools
.
defaultFontPixelWidth
*
2
)
height
:
column
.
height
+
(
ScreenTools
.
defaultFontPixelWidth
*
2
)
color
:
_qgcPal
.
window
Shade
color
:
_qgcPal
.
window
QGCPalette
{
id
:
_qgcPal
;
colorGroupEnabled
:
enabled
}
QGCPalette
{
id
:
_qgcPal
;
colorGroupEnabled
:
enabled
}
...
...
src/QmlControls/QGCButton.qml
View file @
96f845d3
...
@@ -7,8 +7,9 @@ import QGroundControl.Palette 1.0
...
@@ -7,8 +7,9 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
Button
{
Button
{
// primary: true - this is the primary button for this group of buttons
property
bool
primary
:
false
property
bool
primary
:
false
// primary: true - primary button for a group of buttons
property
bool
showBorder
:
false
///< true: draw border around button
property
var
__qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
property
var
__qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
...
@@ -67,10 +68,12 @@ Button {
...
@@ -67,10 +68,12 @@ Button {
implicitHeight
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelHeight
*
3
*
0.75
:
Math
.
max
(
25
,
Math
.
round
(
TextSingleton
.
implicitHeight
*
1.2
))
implicitHeight
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelHeight
*
3
*
0.75
:
Math
.
max
(
25
,
Math
.
round
(
TextSingleton
.
implicitHeight
*
1.2
))
Rectangle
{
Rectangle
{
anchors.fill
:
parent
anchors.fill
:
parent
color
:
__showHighlight
?
border.width
:
showBorder
?
1
:
0
control
.
__qgcPal
.
buttonHighlight
:
border.color
:
__qgcPal
.
buttonText
(
primary
?
control
.
__qgcPal
.
primaryButton
:
control
.
__qgcPal
.
button
)
color
:
__showHighlight
?
control
.
__qgcPal
.
buttonHighlight
:
(
primary
?
control
.
__qgcPal
.
primaryButton
:
control
.
__qgcPal
.
button
)
}
}
Image
{
Image
{
...
...
src/QmlControls/QGroundControl.Controls.qmldir
View file @
96f845d3
...
@@ -34,4 +34,6 @@ MissionItemIndexLabel 1.0 MissionItemIndexLabel.qml
...
@@ -34,4 +34,6 @@ MissionItemIndexLabel 1.0 MissionItemIndexLabel.qml
MissionItemSummary 1.0 MissionItemSummary.qml
MissionItemSummary 1.0 MissionItemSummary.qml
MissionItemEditor 1.0 MissionItemEditor.qml
MissionItemEditor 1.0 MissionItemEditor.qml
MainToolBar 1.0 MainToolBar.qml
MainToolBar 1.0 MainToolBar.qml
ClickableColor 1.0 ClickableColor.qml
src/QmlControls/QmlTest.qml
View file @
96f845d3
This diff is collapsed.
Click to expand it.
src/QmlControls/QmlTestWidget.cc
View file @
96f845d3
...
@@ -26,11 +26,30 @@
...
@@ -26,11 +26,30 @@
#include "QmlTestWidget.h"
#include "QmlTestWidget.h"
#include <QColorDialog>
QmlTestWidget
::
QmlTestWidget
(
void
)
QmlTestWidget
::
QmlTestWidget
(
void
)
:
QGCQmlWidgetHolder
(
QString
(),
NULL
,
NULL
)
:
QGCQmlWidgetHolder
(
QString
(),
NULL
,
NULL
)
{
{
setAttribute
(
Qt
::
WA_DeleteOnClose
);
setAttribute
(
Qt
::
WA_DeleteOnClose
);
resize
(
900
,
500
);
resize
(
900
,
500
);
setVisible
(
true
);
setVisible
(
true
);
setContextPropertyObject
(
"controller"
,
this
);
setSource
(
QUrl
::
fromUserInput
(
"qrc:qml/QmlTest.qml"
));
setSource
(
QUrl
::
fromUserInput
(
"qrc:qml/QmlTest.qml"
));
}
}
void
QmlTestWidget
::
showColorDialog
(
QQuickItem
*
item
)
{
Q_UNUSED
(
item
)
QColorDialog
colorDialog
(
this
);
connect
(
&
colorDialog
,
&
QColorDialog
::
colorSelected
,
this
,
&
QmlTestWidget
::
_colorSelected
);
colorDialog
.
open
();
}
void
QmlTestWidget
::
_colorSelected
(
const
QColor
&
color
)
{
Q_UNUSED
(
color
);
}
src/QmlControls/QmlTestWidget.h
View file @
96f845d3
...
@@ -37,6 +37,12 @@ class QmlTestWidget : public QGCQmlWidgetHolder
...
@@ -37,6 +37,12 @@ class QmlTestWidget : public QGCQmlWidgetHolder
public:
public:
QmlTestWidget
(
void
);
QmlTestWidget
(
void
);
Q_INVOKABLE
void
showColorDialog
(
QQuickItem
*
item
);
private
slots
:
void
_colorSelected
(
const
QColor
&
color
);
};
};
#endif
#endif
src/QmlControls/RoundButton.qml
View file @
96f845d3
...
@@ -31,14 +31,15 @@ Item {
...
@@ -31,14 +31,15 @@ Item {
radius
:
width
/
2
radius
:
width
/
2
border.width
:
2
border.width
:
2
border.color
:
"
white
"
border.color
:
"
white
"
opacity
:
checked
?
0.95
:
0.65
color
:
checked
?
qgcPal
.
mapButtonHighlight
:
qgcPal
.
mapButton
color
:
checked
?
qgcPal
.
mapButtonHighlight
:
qgcPal
.
mapButton
Image
{
Image
{
id
:
button
id
:
button
anchors.fill
:
parent
anchors.fill
:
parent
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
mipmap
:
true
smooth
:
true
smooth
:
true
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
onClicked
:
{
onClicked
:
{
...
...
src/QmlControls/ScreenToolsController.cc
View file @
96f845d3
...
@@ -29,6 +29,8 @@
...
@@ -29,6 +29,8 @@
#ifdef Q_OS_WIN
#ifdef Q_OS_WIN
const
double
ScreenToolsController
::
_defaultFontPixelSizeRatio
=
1.0
;
const
double
ScreenToolsController
::
_defaultFontPixelSizeRatio
=
1.0
;
#elif __mobile__
const
double
ScreenToolsController
::
_defaultFontPixelSizeRatio
=
1.0
;
#else
#else
const
double
ScreenToolsController
::
_defaultFontPixelSizeRatio
=
0.8
;
const
double
ScreenToolsController
::
_defaultFontPixelSizeRatio
=
0.8
;
#endif
#endif
...
...
src/QmlControls/SubMenuButton.qml
View file @
96f845d3
...
@@ -28,7 +28,7 @@ Button {
...
@@ -28,7 +28,7 @@ Button {
background
:
Rectangle
{
background
:
Rectangle
{
id
:
innerRect
id
:
innerRect
color
:
showHighlight
?
qgcPal
.
buttonHighlight
:
qgcPal
.
button
color
:
showHighlight
?
qgcPal
.
buttonHighlight
:
qgcPal
.
windowShade
readonly
property
real
titleHeight
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
readonly
property
real
titleHeight
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
...
@@ -59,7 +59,7 @@ Button {
...
@@ -59,7 +59,7 @@ Button {
anchors.top
:
titleBar
.
bottom
anchors.top
:
titleBar
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
width
:
parent
.
width
width
:
parent
.
width
color
:
qgcPal
.
windowShade
color
:
qgcPal
.
windowShade
Dark
QGCColoredImage
{
QGCColoredImage
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
.
75
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
.
75
...
...
src/VehicleSetup/SetupView.qml
View file @
96f845d3
...
@@ -34,8 +34,10 @@ import QGroundControl.Controls 1.0
...
@@ -34,8 +34,10 @@ import QGroundControl.Controls 1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
MultiVehicleManager
1.0
import
QGroundControl
.
MultiVehicleManager
1.0
Item
{
Rectangle
{
z
:
zOrder
// zOrder comes from the Loader in MainWindow.qml
anchors.fill
:
parent
color
:
qgcPal
.
window
z
:
zOrder
// zOrder comes from the Loader in MainWindow.qml
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
...
@@ -44,7 +46,7 @@ Item {
...
@@ -44,7 +46,7 @@ Item {
readonly
property
real
_defaultTextHeight
:
ScreenTools
.
defaultFontPixelHeight
readonly
property
real
_defaultTextHeight
:
ScreenTools
.
defaultFontPixelHeight
readonly
property
real
_defaultTextWidth
:
ScreenTools
.
defaultFontPixelWidth
readonly
property
real
_defaultTextWidth
:
ScreenTools
.
defaultFontPixelWidth
readonly
property
real
_margin
:
_defaultTextHeight
/
2
readonly
property
real
_margin
:
_defaultTextHeight
/
2
readonly
property
real
_buttonWidth
:
_defaultTextWidth
*
1
5
readonly
property
real
_buttonWidth
:
_defaultTextWidth
*
1
7
readonly
property
string
_armedVehicleText
:
"
This operation cannot be performed while vehicle is armed.
"
readonly
property
string
_armedVehicleText
:
"
This operation cannot be performed while vehicle is armed.
"
property
string
_messagePanelText
:
"
missing message panel text
"
property
string
_messagePanelText
:
"
missing message panel text
"
...
@@ -198,8 +200,7 @@ Item {
...
@@ -198,8 +200,7 @@ Item {
Rectangle
{
Rectangle
{
//anchors.margins: _defaultTextHeight * 2
//anchors.margins: _defaultTextHeight * 2
anchors.fill
:
parent
anchors.fill
:
parent
color
:
qgcPal
.
window
color
:
qgcPal
.
windowShadeDark
opacity
:
0.8
QGCLabel
{
QGCLabel
{
id
:
title
id
:
title
...
@@ -218,12 +219,14 @@ Item {
...
@@ -218,12 +219,14 @@ Item {
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
color
:
qgcPal
.
window
Shade
color
:
qgcPal
.
window
Flickable
{
Flickable
{
id
:
buttonFlickable
id
:
buttonFlickable
width
:
_buttonWidth
width
:
_buttonWidth
height
:
parent
.
height
anchors.topMargin
:
_defaultTextHeight
/
2
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
contentWidth
:
_buttonWidth
contentWidth
:
_buttonWidth
contentHeight
:
buttonColumn
.
height
contentHeight
:
buttonColumn
.
height
flickableDirection
:
Flickable
.
VerticalFlick
flickableDirection
:
Flickable
.
VerticalFlick
...
...
src/VehicleSetup/VehicleSummary.qml
View file @
96f845d3
...
@@ -67,7 +67,7 @@ Rectangle {
...
@@ -67,7 +67,7 @@ Rectangle {
Rectangle
{
Rectangle
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
28
width
:
ScreenTools
.
defaultFontPixelWidth
*
28
height
:
ScreenTools
.
defaultFontPixelHeight
*
13
height
:
ScreenTools
.
defaultFontPixelHeight
*
13
color
:
qgcPal
.
window
Shade
color
:
qgcPal
.
window
readonly
property
real
titleHeight
:
ScreenTools
.
defaultFontPixelHeight
*
2
readonly
property
real
titleHeight
:
ScreenTools
.
defaultFontPixelHeight
*
2
...
@@ -76,7 +76,7 @@ Rectangle {
...
@@ -76,7 +76,7 @@ Rectangle {
id
:
titleBar
id
:
titleBar
width
:
parent
.
width
width
:
parent
.
width
height
:
titleHeight
height
:
titleHeight
color
:
qgcPal
.
windowShade
Dark
color
:
qgcPal
.
windowShade
// Title text
// Title text
QGCLabel
{
QGCLabel
{
...
...
src/ui/MainWindow.qml
View file @
96f845d3
...
@@ -33,7 +33,7 @@ import QGroundControl.ScreenTools 1.0
...
@@ -33,7 +33,7 @@ import QGroundControl.ScreenTools 1.0
FlightDisplayView
{
FlightDisplayView
{
id
:
_root
id
:
_root
topMargin
:
toolbarLoader
.
height
topMargin
:
toolbarLoader
.
height
+
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
property
var
_toolbar
:
toolbarLoader
.
item
property
var
_toolbar
:
toolbarLoader
.
item
...
@@ -102,7 +102,6 @@ FlightDisplayView {
...
@@ -102,7 +102,6 @@ FlightDisplayView {
Loader
{
Loader
{
id
:
setupViewLoader
id
:
setupViewLoader
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.top
:
toolbarLoader
.
bottom
anchors.top
:
toolbarLoader
.
bottom
...
...
src/ui/toolbar/MainToolBar.qml
View file @
96f845d3
...
@@ -38,9 +38,12 @@ import QGroundControl.MultiVehicleManager 1.0
...
@@ -38,9 +38,12 @@ import QGroundControl.MultiVehicleManager 1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Controllers
1.0
Item
{
Rectangle
{
id
:
toolBarHolder
id
:
toolBarHolder
height
:
toolBarHeight
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
toolBarHeight
color
:
qgcPal
.
window
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
...
...
src/ui/toolbar/MainToolBarActiveVehicleComponent.qml
View file @
96f845d3
...
@@ -105,7 +105,7 @@ Row {
...
@@ -105,7 +105,7 @@ Row {
}
}
QGCButton
{
QGCButton
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
1
2
width
:
ScreenTools
.
defaultFontPixelWidth
*
1
3
height
:
cellHeight
height
:
cellHeight
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
"
Vehicle
"
+
activeVehicle
.
id
text
:
"
Vehicle
"
+
activeVehicle
.
id
...
@@ -359,7 +359,7 @@ Row {
...
@@ -359,7 +359,7 @@ Row {
}
}
QGCButton
{
QGCButton
{
width
:
ScreenTools
.
defaultFontPixelWidth
*
1
5
width
:
ScreenTools
.
defaultFontPixelWidth
*
1
6
height
:
cellHeight
height
:
cellHeight
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
activeVehicle
.
flightMode
text
:
activeVehicle
.
flightMode
...
...
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