From 83f3ec5c817e23fc9861565869e58eb42e4a3394 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Wed, 5 Apr 2017 01:46:55 -0400 Subject: [PATCH] =?UTF-8?q?Adding=20some=20WIP=20icons=20to=20the=20Fly=20?= =?UTF-8?q?View=20ToolStrip=20Increasing=20a=20bit=20the=20bottom=20margin?= =?UTF-8?q?=20for=20the=20confirmation=20dialogs=20Changed=20the=20color?= =?UTF-8?q?=20for=20the=20guidedActionConfirm=20dialog=20to=20the=20palett?= =?UTF-8?q?e=E2=80=99s=20alertColor=20Disabled=20onHeightChanged=20on=20To?= =?UTF-8?q?olStrip=20for=20the=20time=20being=20as=20it=20was=20not=20work?= =?UTF-8?q?ing.=20I=20need=20to=20come=20back=20to=20this=20and=20see=20wh?= =?UTF-8?q?y=20it=20hides=20=E2=80=9Coptional=20elements=E2=80=9D=20even?= =?UTF-8?q?=20though=20I=20have=20plenty=20of=20space=20for=20them.=20Adju?= =?UTF-8?q?sted=20the=20color=20for=20disabled=20text=20so=20you=20can=20r?= =?UTF-8?q?ead=20it=20within=20the=20ToolStrip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qgcresources.qrc | 9 ++++--- resources/land.svg | 19 ++++++++++++++ resources/rtl.svg | 17 +++++++++++++ resources/takeoff.svg | 19 ++++++++++++++ src/FlightDisplay/FlightDisplayView.qml | 33 ++++++++++++++----------- src/QGCPalette.cc | 6 ++--- src/QmlControls/ToolStrip.qml | 8 ++++++ 7 files changed, 90 insertions(+), 21 deletions(-) create mode 100644 resources/land.svg create mode 100644 resources/rtl.svg create mode 100644 resources/takeoff.svg diff --git a/qgcresources.qrc b/qgcresources.qrc index 033fcd8cf..d74da17b4 100644 --- a/qgcresources.qrc +++ b/qgcresources.qrc @@ -175,19 +175,22 @@ resources/gear-white.svg resources/JoystickBezel.png resources/JoystickBezelLight.png + resources/land.svg resources/notile.png - resources/Pause.svg + resources/Pause.svg resources/Play.svg resources/PowerButton.svg - resources/QGCLogoWhite.svg resources/QGCLogoBlack.svg + resources/QGCLogoWhite.svg resources/QGroundControlConnect.svg + resources/rtl.svg resources/SplashScreen.png resources/Stop.svg + resources/takeoff.svg resources/TrashDelete.svg + resources/waves.svg resources/XDelete.svg resources/XDeleteBlack.svg - resources/waves.svg resources/icons/qgroundcontrol.ico diff --git a/resources/land.svg b/resources/land.svg new file mode 100644 index 000000000..c6a1401d0 --- /dev/null +++ b/resources/land.svg @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/resources/rtl.svg b/resources/rtl.svg new file mode 100644 index 000000000..83c67f9b5 --- /dev/null +++ b/resources/rtl.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + diff --git a/resources/takeoff.svg b/resources/takeoff.svg new file mode 100644 index 000000000..53f4abc0b --- /dev/null +++ b/resources/takeoff.svg @@ -0,0 +1,19 @@ + + + + + + + + + diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml index 1dc71f75c..347edf223 100644 --- a/src/FlightDisplay/FlightDisplayView.qml +++ b/src/FlightDisplay/FlightDisplayView.qml @@ -391,22 +391,22 @@ QGCView { model: [ { name: guidedController.takeoffTitle, - iconSource: "/qmlimages/MapCenter.svg", + iconSource: "/res/takeoff.svg", action: guidedController.actionTakeoff }, { name: guidedController.landTitle, - iconSource: "/qmlimages/MapCenter.svg", + iconSource: "/res/land.svg", action: guidedController.actionLand }, { name: guidedController.rtlTitle, - iconSource: "/qmlimages/MapCenter.svg", + iconSource: "/res/rtl.svg", action: guidedController.actionRTL }, { name: guidedController.pauseTitle, - iconSource: "/qmlimages/MapCenter.svg", + iconSource: "/res/Pause.svg", action: guidedController.actionPause }, { @@ -461,11 +461,14 @@ QGCView { id: guidedActionConfirm anchors.margins: _margins anchors.bottom: parent.bottom + anchors.bottomMargin: ScreenTools.defaultFontPixelHeight * 4 anchors.horizontalCenter: parent.horizontalCenter - width: confirmColumn.width + (_margins * 2) - height: confirmColumn.height + (_margins * 2) + border.color: qgcPal.alertBorder + border.width: 1 + width: confirmColumn.width + (_margins * 4) + height: confirmColumn.height + (_margins * 4) radius: ScreenTools.defaultFontPixelHeight / 2 - color: qgcPal.window + color: qgcPal.alertBackground opacity: 0.9 z: guidedController.z visible: false @@ -480,12 +483,12 @@ QGCView { Column { id: confirmColumn anchors.margins: _margins - anchors.top: parent.top - anchors.left: parent.left + anchors.centerIn: parent spacing: _margins QGCLabel { id: titleText + color: qgcPal.alertText anchors.left: slider.left anchors.right: slider.right horizontalAlignment: Text.AlignHCenter @@ -493,6 +496,7 @@ QGCView { QGCLabel { id: messageText + color: qgcPal.alertText anchors.left: slider.left anchors.right: slider.right horizontalAlignment: Text.AlignHCenter @@ -530,8 +534,7 @@ QGCView { sourceSize.height: width source: "/res/XDelete.svg" fillMode: Image.PreserveAspectFit - color: qgcPal.text - + color: qgcPal.alertText QGCMouseArea { fillItem: parent onClicked: { @@ -546,9 +549,10 @@ QGCView { id: guidedActionList anchors.margins: _margins anchors.bottom: parent.bottom + anchors.bottomMargin: ScreenTools.defaultFontPixelHeight * 4 anchors.horizontalCenter: parent.horizontalCenter - width: actionColumn.width + (_margins * 2) - height: actionColumn.height + (_margins * 2) + width: actionColumn.width + (_margins * 4) + height: actionColumn.height + (_margins * 4) radius: _margins / 2 color: qgcPal.window opacity: 0.9 @@ -562,8 +566,7 @@ QGCView { ColumnLayout { id: actionColumn anchors.margins: guidedActionList._margins - anchors.top: parent.top - anchors.left: parent.left + anchors.centerIn: parent spacing: _margins QGCLabel { diff --git a/src/QGCPalette.cc b/src/QGCPalette.cc index 32e1fe373..c0c2d76b5 100644 --- a/src/QGCPalette.cc +++ b/src/QGCPalette.cc @@ -25,10 +25,10 @@ QGCPalette::Theme QGCPalette::_theme = QGCPalette::Dark; DECLARE_QGC_COLOR(window, "#ffffff", "#ffffff", "#222222", "#222222") DECLARE_QGC_COLOR(windowShade, "#d9d9d9", "#d9d9d9", "#333333", "#333333") DECLARE_QGC_COLOR(windowShadeDark, "#bdbdbd", "#bdbdbd", "#282828", "#282828") -DECLARE_QGC_COLOR(text, "#9d9d9d", "#000000", "#3a3a3a", "#ffffff") +DECLARE_QGC_COLOR(text, "#9d9d9d", "#000000", "#a0a0a0", "#ffffff") DECLARE_QGC_COLOR(warningText, "#cc0808", "#cc0808", "#f85761", "#f85761") -DECLARE_QGC_COLOR(button, "#ffffff", "#ffffff", "#606060", "#626270") -DECLARE_QGC_COLOR(buttonText, "#9d9d9d", "#000000", "#2c2c2c", "#ffffff") +DECLARE_QGC_COLOR(button, "#ffffff", "#ffffff", "#707070", "#626270") +DECLARE_QGC_COLOR(buttonText, "#9d9d9d", "#000000", "#202020", "#ffffff") DECLARE_QGC_COLOR(buttonHighlight, "#e4e4e4", "#946120", "#3a3a3a", "#fff291") DECLARE_QGC_COLOR(buttonHighlightText, "#2c2c2c", "#ffffff", "#2c2c2c", "#000000") DECLARE_QGC_COLOR(primaryButton, "#585858", "#8cb3be", "#585858", "#8cb3be") diff --git a/src/QmlControls/ToolStrip.qml b/src/QmlControls/ToolStrip.qml index 3e912e4d0..c851cdb7b 100644 --- a/src/QmlControls/ToolStrip.qml +++ b/src/QmlControls/ToolStrip.qml @@ -54,6 +54,7 @@ Rectangle { onDefaultFontPixelHeightChanged: recalcShowOptionalElements() } + /* onHeightChanged: { if (_needRecalc) { _needRecalc = false @@ -62,6 +63,7 @@ Rectangle { } } } + */ function recalcShowOptionalElements() { if (_showOptionalElements) { @@ -232,6 +234,12 @@ Rectangle { } } + Item { + width: 1 + height: ScreenTools.defaultFontPixelHeight * 0.25 + visible: _showOptionalElements + } + QGCLabel { id: buttonLabel anchors.horizontalCenter: parent.horizontalCenter -- 2.22.0