Browse Source

Light palette tweaks

QGC4.4
Gus Grubba 6 years ago
parent
commit
0a2d20ae51
  1. 2
      custom-example/res/Custom/Widgets/CustomIconButton.qml
  2. 4
      custom-example/res/Custom/Widgets/CustomToolBarButton.qml
  3. 2
      custom-example/res/CustomCameraControl.qml
  4. 19
      custom-example/res/MainToolbar/CustomMainToolBar.qml

2
custom-example/res/Custom/Widgets/CustomIconButton.qml

@ -50,7 +50,7 @@ Button {
mipmap: true mipmap: true
antialiasing: true antialiasing: true
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: "/res/QGCLogoWhite" source: qgcPal.globalTheme === QGCPalette.Light ? "/res/QGCLogoBlack" : "/res/QGCLogoWhite"
sourceSize.height: height sourceSize.height: height
anchors.left: _edge.right anchors.left: _edge.right
anchors.leftMargin: ScreenTools.defaultFontPixelWidth anchors.leftMargin: ScreenTools.defaultFontPixelWidth

4
custom-example/res/Custom/Widgets/CustomToolBarButton.qml

@ -40,7 +40,7 @@ Button {
width: height width: height
sourceSize.height: parent.height sourceSize.height: parent.height
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
color: (mouseArea.pressed || button.checked) ? qgcPal.buttonHighlightText : qgcPal.buttonText color: (mouseArea.pressed || button.checked) ? qgcPal.colorOrange : qgcPal.buttonText
source: button.icon.source source: button.icon.source
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
@ -48,7 +48,7 @@ Button {
id: _label id: _label
visible: text !== "" visible: text !== ""
text: button.text text: button.text
color: (mouseArea.pressed || button.checked) ? qgcPal.buttonHighlightText : qgcPal.buttonText color: (mouseArea.pressed || button.checked) ? qgcPal.colorOrange : qgcPal.buttonText
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }

2
custom-example/res/CustomCameraControl.qml

@ -55,8 +55,6 @@ Item {
property bool _recordingVideo: _cameraVideoMode && _camera.videoStatus === QGCCameraControl.VIDEO_CAPTURE_STATUS_RUNNING property bool _recordingVideo: _cameraVideoMode && _camera.videoStatus === QGCCameraControl.VIDEO_CAPTURE_STATUS_RUNNING
property bool _settingsEnabled: !_communicationLost && _camera && _camera.cameraMode !== QGCCameraControl.CAM_MODE_UNDEFINED && _camera.photoStatus === QGCCameraControl.PHOTO_CAPTURE_IDLE && !_recordingVideo property bool _settingsEnabled: !_communicationLost && _camera && _camera.cameraMode !== QGCCameraControl.CAM_MODE_UNDEFINED && _camera.photoStatus === QGCCameraControl.PHOTO_CAPTURE_IDLE && !_recordingVideo
property bool _hasZoom: _camera && _camera.hasZoom property bool _hasZoom: _camera && _camera.hasZoom
property Fact _evFact: _camera ? _camera.ev : null
property Fact _irPaletteFact: _camera ? _camera.irPalette : null
Connections { Connections {
target: QGroundControl.multiVehicleManager.activeVehicle target: QGroundControl.multiVehicleManager.activeVehicle

19
custom-example/res/MainToolbar/CustomMainToolBar.qml

@ -28,6 +28,7 @@ Item {
property string sectionTitle: qsTr("Fly") property string sectionTitle: qsTr("Fly")
property bool inPlanView: planViewLoader.visible property bool inPlanView: planViewLoader.visible
property bool inFlyView: rootBackground.visible property bool inFlyView: rootBackground.visible
property color menuSeparatorColor: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(0,0,0,0.25) : Qt.rgba(1,1,1,0.25)
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
//-- Setup can be invoked from c++ side //-- Setup can be invoked from c++ side
Connections { Connections {
@ -103,7 +104,7 @@ Item {
Rectangle { Rectangle {
width: 1 width: 1
height: parent.height height: parent.height
color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(0,0,0,0.15) : Qt.rgba(1,1,1,0.15) color: menuSeparatorColor
visible: activeVehicle && !inPlanView visible: activeVehicle && !inPlanView
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@ -149,7 +150,7 @@ Item {
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
height: 1 height: 1
color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(0,0,0,0.15) : Qt.rgba(1,1,1,0.15) color: menuSeparatorColor
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
//-- Navigation Drawer (Left to Right, on command or using touch gestures) //-- Navigation Drawer (Left to Right, on command or using touch gestures)
@ -160,7 +161,7 @@ Item {
height: mainWindow.height - header.height height: mainWindow.height - header.height
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
background: Rectangle { background: Rectangle {
color: qgcPal.window color: qgcPal.window
} }
ButtonGroup { ButtonGroup {
id: buttonGroup id: buttonGroup
@ -176,7 +177,7 @@ Item {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
width: parent.width width: parent.width
height: 1 height: 1
color: Qt.rgba(1,1,1,0.15) color: menuSeparatorColor
} }
CustomToolBarButton { CustomToolBarButton {
id: flyButton id: flyButton
@ -194,7 +195,7 @@ Item {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
width: parent.width width: parent.width
height: 1 height: 1
color: Qt.rgba(1,1,1,0.15) color: menuSeparatorColor
} }
CustomToolBarButton { CustomToolBarButton {
id: planButton id: planButton
@ -212,7 +213,7 @@ Item {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
width: parent.width width: parent.width
height: 1 height: 1
color: Qt.rgba(1,1,1,0.15) color: menuSeparatorColor
} }
CustomToolBarButton { CustomToolBarButton {
text: qsTr("Analyze") text: qsTr("Analyze")
@ -229,7 +230,7 @@ Item {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
width: parent.width width: parent.width
height: 1 height: 1
color: Qt.rgba(1,1,1,0.15) color: menuSeparatorColor
} }
CustomToolBarButton { CustomToolBarButton {
id: vehicleSetup id: vehicleSetup
@ -247,7 +248,7 @@ Item {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
width: parent.width width: parent.width
height: 1 height: 1
color: Qt.rgba(1,1,1,0.15) color: menuSeparatorColor
} }
} }
ColumnLayout { ColumnLayout {
@ -261,7 +262,7 @@ Item {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
width: parent.width width: parent.width
height: 1 height: 1
color: Qt.rgba(1,1,1,0.15) color: menuSeparatorColor
} }
CustomToolBarButton { CustomToolBarButton {
id: settingsButton id: settingsButton

Loading…
Cancel
Save