From 0a2d20ae51633eb2291b361705775986c5d4cf7e Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Sat, 22 Jun 2019 21:21:21 -0300 Subject: [PATCH] Light palette tweaks --- .../res/Custom/Widgets/CustomIconButton.qml | 2 +- .../Custom/Widgets/CustomToolBarButton.qml | 4 ++-- custom-example/res/CustomCameraControl.qml | 2 -- .../res/MainToolbar/CustomMainToolBar.qml | 19 ++++++++++--------- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/custom-example/res/Custom/Widgets/CustomIconButton.qml b/custom-example/res/Custom/Widgets/CustomIconButton.qml index c6c906d60..003628d33 100644 --- a/custom-example/res/Custom/Widgets/CustomIconButton.qml +++ b/custom-example/res/Custom/Widgets/CustomIconButton.qml @@ -50,7 +50,7 @@ Button { mipmap: true antialiasing: true fillMode: Image.PreserveAspectFit - source: "/res/QGCLogoWhite" + source: qgcPal.globalTheme === QGCPalette.Light ? "/res/QGCLogoBlack" : "/res/QGCLogoWhite" sourceSize.height: height anchors.left: _edge.right anchors.leftMargin: ScreenTools.defaultFontPixelWidth diff --git a/custom-example/res/Custom/Widgets/CustomToolBarButton.qml b/custom-example/res/Custom/Widgets/CustomToolBarButton.qml index e46b4e2b9..a9eed915d 100644 --- a/custom-example/res/Custom/Widgets/CustomToolBarButton.qml +++ b/custom-example/res/Custom/Widgets/CustomToolBarButton.qml @@ -40,7 +40,7 @@ Button { width: height sourceSize.height: parent.height 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 anchors.verticalCenter: parent.verticalCenter } @@ -48,7 +48,7 @@ Button { id: _label visible: 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 } } diff --git a/custom-example/res/CustomCameraControl.qml b/custom-example/res/CustomCameraControl.qml index b4c6d03c1..0fa223559 100644 --- a/custom-example/res/CustomCameraControl.qml +++ b/custom-example/res/CustomCameraControl.qml @@ -55,8 +55,6 @@ Item { 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 _hasZoom: _camera && _camera.hasZoom - property Fact _evFact: _camera ? _camera.ev : null - property Fact _irPaletteFact: _camera ? _camera.irPalette : null Connections { target: QGroundControl.multiVehicleManager.activeVehicle diff --git a/custom-example/res/MainToolbar/CustomMainToolBar.qml b/custom-example/res/MainToolbar/CustomMainToolBar.qml index 8a3f635eb..5072b0c82 100644 --- a/custom-example/res/MainToolbar/CustomMainToolBar.qml +++ b/custom-example/res/MainToolbar/CustomMainToolBar.qml @@ -28,6 +28,7 @@ Item { property string sectionTitle: qsTr("Fly") property bool inPlanView: planViewLoader.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 Connections { @@ -103,7 +104,7 @@ Item { Rectangle { width: 1 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 } //------------------------------------------------------------------------- @@ -149,7 +150,7 @@ Item { anchors.right: parent.right anchors.bottom: parent.bottom 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) @@ -160,7 +161,7 @@ Item { height: mainWindow.height - header.height closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside background: Rectangle { - color: qgcPal.window + color: qgcPal.window } ButtonGroup { id: buttonGroup @@ -176,7 +177,7 @@ Item { Layout.alignment: Qt.AlignVCenter width: parent.width height: 1 - color: Qt.rgba(1,1,1,0.15) + color: menuSeparatorColor } CustomToolBarButton { id: flyButton @@ -194,7 +195,7 @@ Item { Layout.alignment: Qt.AlignVCenter width: parent.width height: 1 - color: Qt.rgba(1,1,1,0.15) + color: menuSeparatorColor } CustomToolBarButton { id: planButton @@ -212,7 +213,7 @@ Item { Layout.alignment: Qt.AlignVCenter width: parent.width height: 1 - color: Qt.rgba(1,1,1,0.15) + color: menuSeparatorColor } CustomToolBarButton { text: qsTr("Analyze") @@ -229,7 +230,7 @@ Item { Layout.alignment: Qt.AlignVCenter width: parent.width height: 1 - color: Qt.rgba(1,1,1,0.15) + color: menuSeparatorColor } CustomToolBarButton { id: vehicleSetup @@ -247,7 +248,7 @@ Item { Layout.alignment: Qt.AlignVCenter width: parent.width height: 1 - color: Qt.rgba(1,1,1,0.15) + color: menuSeparatorColor } } ColumnLayout { @@ -261,7 +262,7 @@ Item { Layout.alignment: Qt.AlignVCenter width: parent.width height: 1 - color: Qt.rgba(1,1,1,0.15) + color: menuSeparatorColor } CustomToolBarButton { id: settingsButton -- 2.22.0