Commit bc69d121 authored by Don Gagne's avatar Don Gagne

Much better Outdoor palette visuals

parent b9e0a303
......@@ -403,7 +403,6 @@ QGCView {
QGCButton {
id: nextButton
showBorder: true
text: "Next"
enabled: false
onClicked: controller.nextClicked()
......@@ -411,7 +410,6 @@ QGCView {
QGCButton {
id: cancelButton
showBorder: true
text: "Cancel"
enabled: false
onClicked: controller.cancelCalibration()
......
......@@ -396,7 +396,6 @@ QGCView {
QGCButton {
id: skipButton
showBorder: true
text: "Skip"
onClicked: controller.skipButtonClicked()
......@@ -404,7 +403,6 @@ QGCView {
QGCButton {
id: cancelButton
showBorder: true
text: "Cancel"
onClicked: controller.cancelButtonClicked()
......@@ -413,7 +411,6 @@ QGCView {
QGCButton {
id: nextButton
primary: true
showBorder: true
text: "Calibrate"
onClicked: {
......@@ -457,7 +454,6 @@ QGCView {
QGCButton {
id: bindButton
showBorder: true
text: "Spektrum Bind"
onClicked: showDialog(spektrumBindDialogComponent, dialogTitle, qgcView.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel)
......@@ -465,7 +461,6 @@ QGCView {
}
QGCButton {
showBorder: true
text: "Copy Trims"
visible: QGroundControl.multiVehicleManager.activeVehicle.px4Firmware
onClicked: showDialog(copyTrimsDialogComponent, dialogTitle, qgcView.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel)
......
......@@ -202,7 +202,7 @@ QGCView {
height: voltageCol.height
fillMode: Image.PreserveAspectFit
smooth: true
color: palette.button
color: palette.text
cache: false
source: getBatteryImage();
}
......
......@@ -355,7 +355,6 @@ QGCView {
QGCButton {
id: cancelButton
showBorder: true
text: "Cancel"
enabled: false
onClicked: controller.cancelCalibration()
......
......@@ -42,11 +42,9 @@ import QGroundControl.FactSystem 1.0
QGCView {
id: root
viewPanel: _panel
topDialogMargin: height - availableHeight
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
property real availableHeight: parent.height
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
......@@ -225,14 +223,11 @@ QGCView {
//-- Widgets
Loader {
id: widgetsLoader
z: _panel.z + 4
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
height: availableHeight
asynchronous: true
visible: status == Loader.Ready
id: widgetsLoader
z: _panel.z + 4
anchors.fill: parent
asynchronous: true
visible: status == Loader.Ready
property bool isBackgroundDark: root.isBackgroundDark
property var qgcView: root
......
......@@ -43,7 +43,6 @@ QGCView {
property bool syncNeeded: controller.visualItems.dirty // Unsaved changes, visible to parent container
viewPanel: panel
topDialogMargin: height - mainWindow.availableHeight
// zOrder comes from the Loader in MainWindow.qml
z: QGroundControl.zOrderTopMost
......@@ -458,7 +457,7 @@ QGCView {
// Mission Item Editor
Item {
id: missionItemEditor
height: mainWindow.availableHeight
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
width: _rightPanelWidth
......@@ -510,19 +509,13 @@ QGCView {
}
}
Item {
id: toolbarSpacer
height: mainWindow.tbHeight
width: 1
}
//-- Vertical Tool Buttons
Column {
id: toolColumn
anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.left: parent.left
anchors.top: toolbarSpacer.bottom
spacing: ScreenTools.defaultFontPixelHeight
id: toolColumn
anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.left: parent.left
anchors.top: parent.top
spacing: ScreenTools.defaultFontPixelHeight
RoundButton {
id: addMissionItemsButton
......
......@@ -38,13 +38,14 @@ Rectangle {
spacing: _margin
QGCLabel {
width: parent.width
wrapMode: Text.WordWrap
text: missionItem.sequenceNumber == 0 ?
"Planned home position." :
(missionItem.rawEdit ?
"Provides advanced access to all commands/parameters. Be very careful!" :
missionItem.commandDescription)
width: parent.width
wrapMode: Text.WordWrap
font.pixelSize: ScreenTools.smallFontPixelHeight
text: missionItem.sequenceNumber == 0 ?
"Planned home position." :
(missionItem.rawEdit ?
"Provides advanced access to all commands/parameters. Be very careful!" :
missionItem.commandDescription)
}
Repeater {
......
......@@ -34,7 +34,7 @@ QList<QGCPalette*> QGCPalette::_paletteObjects;
QGCPalette::Theme QGCPalette::_theme = QGCPalette::Dark;
QColor QGCPalette::_window[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = {
{ QColor("#f9f8f4"), QColor("#f9f8f4") },
{ QColor("#ffffff"), QColor("#ffffff") },
{ QColor(0x22, 0x22, 0x22), QColor(0x22, 0x22, 0x22) }
};
......@@ -59,7 +59,7 @@ QColor QGCPalette::_warningText[QGCPalette::_cThemes][QGCPalette::_cColorGroups]
};
QColor QGCPalette::_button[QGCPalette::_cThemes][QGCPalette::_cColorGroups] = {
{ QColor("#ffffff"), QColor("#91d1e4") },
{ QColor("#ffffff"), QColor("#ffffff") },
{ QColor(0x58, 0x58, 0x58), QColor(98, 98, 100) },
};
......
......@@ -9,8 +9,6 @@ import QGroundControl.ScreenTools 1.0
// indicator on the right edge.
QGCButton {
showBorder: true
property bool indicatorGreen: false
Rectangle {
......
......@@ -8,12 +8,11 @@ import QGroundControl.ScreenTools 1.0
Button {
property bool primary: false // primary: true - primary button for a group of buttons
property bool showBorder: false ///< true: draw border around button
property bool primary: false ///< primary button for a group of buttons
property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }
property bool __showHighlight: (pressed | hovered | checked) && !__forceHoverOff
property var _qgcPal: QGCPalette { colorGroupEnabled: enabled }
property bool _showHighlight: (pressed | hovered | checked) && !__forceHoverOff
property bool _showBorder: _qgcPal.globalTheme == QGCPalette.Light
// This fixes the issue with button hover where if a Button is near the edge oa QQuickWidget you can
// move the mouse fast enough such that the MouseArea does not trigger an onExited. This is turn
......@@ -69,11 +68,11 @@ Button {
Rectangle {
anchors.fill: parent
border.width: showBorder ? 1: 0
border.color: __qgcPal.buttonText
color: __showHighlight ?
control.__qgcPal.buttonHighlight :
(primary ? control.__qgcPal.primaryButton : control.__qgcPal.button)
border.width: _showBorder ? 1: 0
border.color: _qgcPal.buttonText
color: _showHighlight ?
control._qgcPal.buttonHighlight :
(primary ? control._qgcPal.primaryButton : control._qgcPal.button)
}
Image {
......@@ -111,9 +110,9 @@ Button {
anchors.verticalCenter: parent.verticalCenter
color: __showHighlight ?
control.__qgcPal.buttonHighlightText :
(primary ? control.__qgcPal.primaryButtonText : control.__qgcPal.buttonText)
color: _showHighlight ?
control._qgcPal.buttonHighlightText :
(primary ? control._qgcPal.primaryButtonText : control._qgcPal.buttonText)
}
}
}
......
......@@ -7,29 +7,29 @@ import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0
ComboBox {
property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }
property bool __showHighlight: pressed | hovered
property var _qgcPal: QGCPalette { colorGroupEnabled: enabled }
property bool _showHighlight: pressed | hovered
property bool _showBorder: _qgcPal.globalTheme == QGCPalette.Light
style: ComboBoxStyle {
font.pixelSize: ScreenTools.defaultFontPixelSize
textColor: __showHighlight ?
control.__qgcPal.buttonHighlightText :
control.__qgcPal.buttonText
textColor: _showHighlight ?
control._qgcPal.buttonHighlightText :
control._qgcPal.buttonText
background: Item {
implicitWidth: Math.round(TextSingleton.implicitHeight * 4.5)
implicitHeight: ScreenTools.isMobile ? ScreenTools.defaultFontPixelHeight * 3 * 0.75 : Math.max(25, Math.round(TextSingleton.implicitHeight * 1.2))
Rectangle {
anchors.fill: parent
color: __showHighlight ?
control.__qgcPal.buttonHighlight :
control.__qgcPal.button
anchors.fill: parent
color: _showHighlight ? control._qgcPal.buttonHighlight : control._qgcPal.button
border.width: _showBorder ? 1: 0
border.color: control._qgcPal.buttonText
}
Image {
id: imageItem
visible: control.menu !== null
source: "/qmlimages/arrow-down.png"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
......
......@@ -24,8 +24,9 @@ This file is part of the QGROUNDCONTROL project
import QtQuick 2.4
import QtQuick.Controls 1.2
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0
Item {
id: _root
......@@ -34,6 +35,8 @@ Item {
property bool checked: false
property ExclusiveGroup exclusiveGroup: null
readonly property real _topBottomMargins: ScreenTools.defaultFontPixelHeight / 2
signal clicked()
QGCPalette { id: qgcPal }
......@@ -44,22 +47,27 @@ Item {
}
}
QGCColoredImage {
id: icon
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: _topBottomMargins
anchors.bottomMargin: _topBottomMargins
anchors.top: parent.top
anchors.bottom: parent.bottom
fillMode: Image.PreserveAspectFit
color: checked ? qgcPal.buttonHighlight : qgcPal.buttonText
}
Rectangle {
anchors.fill: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: _topBottomMargins / 3
color: qgcPal.buttonHighlight
visible: checked
}
QGCColoredImage {
id: icon
width: parent.height * 0.9
height: parent.height * 0.9
fillMode: Image.PreserveAspectFit
color: checked ? qgcPal.buttonHighlightText : qgcPal.buttonText
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
MouseArea {
anchors.fill: parent
onClicked: {
......
This diff is collapsed.
......@@ -48,7 +48,6 @@ Item {
property int tbCellHeight: tbHeight * 0.75
property real tbSpacing: ScreenTools.isMobile ? width * 0.00824 : 9.54
property real tbButtonWidth: tbCellHeight * 1.35
property real availableHeight: height - tbHeight
property real menuButtonWidth: (tbButtonWidth * 2) + (tbSpacing * 4) + 1
property var gcsPosition: QtPositioning.coordinate() // Starts as invalid coordinate
property var currentPopUp: null
......@@ -284,21 +283,29 @@ Item {
}
FlightDisplayView {
id: flightView
anchors.fill: parent
availableHeight: mainWindow.availableHeight
visible: true
id: flightView
anchors.left: parent.left
anchors.right: parent.right
anchors.top: toolBar.bottom
anchors.bottom: parent.bottom
visible: true
}
Loader {
id: planViewLoader
anchors.fill: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.top: toolBar.bottom
anchors.bottom: parent.bottom
visible: false
}
Loader {
id: setupViewLoader
anchors.fill: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.top: toolBar.bottom
anchors.bottom: parent.bottom
visible: false
}
......
......@@ -397,22 +397,33 @@ Rectangle {
}
}
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
height: 1
color: "black"
}
//---------------------------------------------
// Toolbar Row
Row {
id: viewRow
height: mainWindow.tbCellHeight
spacing: mainWindow.tbSpacing
anchors.left: parent.left
id: viewRow
height: mainWindow.tbCellHeight
spacing: mainWindow.tbSpacing
anchors.left: parent.left
anchors.leftMargin: mainWindow.tbSpacing
anchors.verticalCenter: parent.verticalCenter
anchors.bottomMargin: 1
anchors.top: parent.top
anchors.bottom: parent.bottom
ExclusiveGroup { id: mainActionGroup }
QGCToolBarButton {
id: preferencesButton
width: mainWindow.tbButtonWidth
height: mainWindow.tbCellHeight
anchors.top: parent.top
anchors.bottom: parent.bottom
source: "/qmlimages/Hamburger.svg"
onClicked: {
mainWindow.showLeftMenu();
......@@ -423,7 +434,8 @@ Rectangle {
QGCToolBarButton {
id: setupButton
width: mainWindow.tbButtonWidth
height: mainWindow.tbCellHeight
anchors.top: parent.top
anchors.bottom: parent.bottom
exclusiveGroup: mainActionGroup
source: "/qmlimages/Gears.svg"
onClicked: toolBar.showSetupView()
......@@ -432,7 +444,8 @@ Rectangle {
QGCToolBarButton {
id: planButton
width: mainWindow.tbButtonWidth
height: mainWindow.tbCellHeight
anchors.top: parent.top
anchors.bottom: parent.bottom
exclusiveGroup: mainActionGroup
source: "/qmlimages/Plan.svg"
onClicked: toolBar.showPlanView()
......@@ -441,7 +454,8 @@ Rectangle {
QGCToolBarButton {
id: flyButton
width: mainWindow.tbButtonWidth
height: mainWindow.tbCellHeight
anchors.top: parent.top
anchors.bottom: parent.bottom
exclusiveGroup: mainActionGroup
source: "/qmlimages/PaperPlane.svg"
onClicked: toolBar.showFlyView()
......
......@@ -371,15 +371,6 @@ Row {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
QGCColoredImage {
width: mainWindow.tbCellHeight * 0.65
height: mainWindow.tbCellHeight * 0.65
fillMode: Image.PreserveAspectFit
source: "/qmlimages/Quad.svg"
color: qgcPal.buttonText
anchors.verticalCenter: parent.verticalCenter
}
QGCLabel {
text: activeVehicle ? activeVehicle.flightMode : "N/A"
font.pixelSize: tbFontLarge
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment