Commit 10de6808 authored by dogmaphobic's avatar dogmaphobic

Restoring toolbar transparency.

parent f7ad3693
...@@ -45,9 +45,7 @@ QGCView { ...@@ -45,9 +45,7 @@ QGCView {
QGCPalette { id: qgcPal; colorGroupEnabled: enabled } QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _mainIsMap: _controller.hasVideo ? QGroundControl.loadBoolGlobalSetting(_mainIsMapKey, true) : true property bool _mainIsMap: _controller.hasVideo ? QGroundControl.loadBoolGlobalSetting(_mainIsMapKey, true) : true
property bool _isPipVisible: _controller.hasVideo ? QGroundControl.loadBoolGlobalSetting(_PIPVisibleKey, true) : false property bool _isPipVisible: _controller.hasVideo ? QGroundControl.loadBoolGlobalSetting(_PIPVisibleKey, true) : false
...@@ -225,7 +223,10 @@ QGCView { ...@@ -225,7 +223,10 @@ QGCView {
Loader { Loader {
id: widgetsLoader id: widgetsLoader
z: _panel.z + 4 z: _panel.z + 4
anchors.fill: parent height: ScreenTools.availableHeight
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
asynchronous: true asynchronous: true
visible: status == Loader.Ready visible: status == Loader.Ready
...@@ -238,11 +239,11 @@ QGCView { ...@@ -238,11 +239,11 @@ QGCView {
id: multiTouchItem id: multiTouchItem
z: _panel.z + 5 z: _panel.z + 5
width: parent.width - (_flightVideoPipControl.width / 2) width: parent.width - (_flightVideoPipControl.width / 2)
height: Math.min(parent.height * 0.25, ScreenTools.defaultFontPixelWidth * 16) height: Math.min(ScreenTools.availableHeight * 0.25, ScreenTools.defaultFontPixelWidth * 16)
visible: QGroundControl.virtualTabletJoystick visible: QGroundControl.virtualTabletJoystick
anchors.bottom: _flightVideoPipControl.top anchors.bottom: _flightVideoPipControl.top
anchors.bottomMargin: ScreenTools.defaultFontPixelHeight * 2 anchors.bottomMargin: ScreenTools.defaultFontPixelHeight * 2
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: widgetsLoader.horizontalCenter
source: "qrc:/qml/VirtualJoystick.qml" source: "qrc:/qml/VirtualJoystick.qml"
active: QGroundControl.virtualTabletJoystick active: QGroundControl.virtualTabletJoystick
} }
......
...@@ -23,6 +23,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -23,6 +23,7 @@ This file is part of the QGROUNDCONTROL project
import QtQuick 2.4 import QtQuick 2.4
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.2
import QGroundControl.Controls 1.0 import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
...@@ -52,7 +53,7 @@ QGCFlickable { ...@@ -52,7 +53,7 @@ QGCFlickable {
} }
function showPicker() { function showPicker() {
qgcView.showDialog(propertyPicker, qsTr("Value Widget Setup"), qgcView.showDialogDefaultWidth, StandardButton.Ok) qgcView.showDialog(propertyPicker, qsTr("Value Widget Setup"), qgcView.showDialogDefaultWidth, StandardButton.Ok, true /*use available height*/ )
} }
function listContains(list, value) { function listContains(list, value) {
...@@ -201,7 +202,7 @@ QGCFlickable { ...@@ -201,7 +202,7 @@ QGCFlickable {
Repeater { Repeater {
model: factGroup ? factGroup.factNames : 0 model: factGroup ? factGroup.factNames : 0
Row { RowLayout {
spacing: _margins spacing: _margins
property string propertyName: factGroupName + "." + modelData property string propertyName: factGroupName + "." + modelData
...@@ -250,11 +251,13 @@ QGCFlickable { ...@@ -250,11 +251,13 @@ QGCFlickable {
text: factGroup.getFact(modelData).shortDescription text: factGroup.getFact(modelData).shortDescription
checked: _largeCheckBox.checked || listContains(controller.smallValues, propertyName) checked: _largeCheckBox.checked || listContains(controller.smallValues, propertyName)
onClicked: updateValues() onClicked: updateValues()
Layout.fillWidth: true
Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 20
} }
QGCCheckBox { QGCCheckBox {
id: _largeCheckBox id: _largeCheckBox
text: qsTr("large") text: qsTr("Large")
checked: listContains(controller.largeValues, propertyName) checked: listContains(controller.largeValues, propertyName)
enabled: _addCheckBox.checked enabled: _addCheckBox.checked
onClicked: updateValues() onClicked: updateValues()
......
...@@ -43,6 +43,8 @@ FactPanel { ...@@ -43,6 +43,8 @@ FactPanel {
property var viewPanel property var viewPanel
property bool __useAvailableHeight: false
/// This is signalled when the top level Item reaches Component.onCompleted. This allows /// This is signalled when the top level Item reaches Component.onCompleted. This allows
/// the view subcomponent to connect to this signal and do work once the full ui is ready /// the view subcomponent to connect to this signal and do work once the full ui is ready
/// to go. /// to go.
...@@ -134,11 +136,13 @@ FactPanel { ...@@ -134,11 +136,13 @@ FactPanel {
readonly property int showDialogFullWidth: -1 ///< Use for full width dialog readonly property int showDialogFullWidth: -1 ///< Use for full width dialog
readonly property int showDialogDefaultWidth: 40 ///< Use for default dialog width readonly property int showDialogDefaultWidth: 40 ///< Use for default dialog width
function showDialog(component, title, charWidth, buttons) { function showDialog(component, title, charWidth, buttons, useAvailableHeight) {
if (__checkForEarlyDialog(title)) { if (__checkForEarlyDialog(title)) {
return return
} }
__useAvailableHeight = typeof useAvailableHeight !== 'undefined' ? useAvailableHeight : false
__stopAllAnimations() __stopAllAnimations()
__dialogCharWidth = charWidth __dialogCharWidth = charWidth
...@@ -278,7 +282,7 @@ FactPanel { ...@@ -278,7 +282,7 @@ FactPanel {
// This covers the parent with an transparent section // This covers the parent with an transparent section
Rectangle { Rectangle {
id: __transparentSection id: __transparentSection
anchors.top: parent.top height: __useAvailableHeight ? ScreenTools.availableHeight : parent.height
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.left: parent.left anchors.left: parent.left
anchors.right: __dialogPanel.left anchors.right: __dialogPanel.left
...@@ -291,7 +295,7 @@ FactPanel { ...@@ -291,7 +295,7 @@ FactPanel {
id: __dialogPanel id: __dialogPanel
width: __dialogCharWidth == showDialogFullWidth ? parent.width : defaultTextWidth * __dialogCharWidth width: __dialogCharWidth == showDialogFullWidth ? parent.width : defaultTextWidth * __dialogCharWidth
anchors.topMargin: topDialogMargin anchors.topMargin: topDialogMargin
anchors.top: parent.top height: __useAvailableHeight ? ScreenTools.availableHeight : parent.height
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.right: parent.right anchors.right: parent.right
color: __qgcPal.windowShadeDark color: __qgcPal.windowShadeDark
......
...@@ -9,6 +9,8 @@ import QGroundControl.ScreenToolsController 1.0 ...@@ -9,6 +9,8 @@ import QGroundControl.ScreenToolsController 1.0
Item { Item {
signal repaintRequested signal repaintRequested
property real availableHeight: 0
readonly property real defaultFontPixelSize: _textMeasure.fontHeight * ScreenToolsController.defaultFontPixelSizeRatio readonly property real defaultFontPixelSize: _textMeasure.fontHeight * ScreenToolsController.defaultFontPixelSizeRatio
readonly property real defaultFontPixelHeight: defaultFontPixelSize readonly property real defaultFontPixelHeight: defaultFontPixelSize
readonly property real defaultFontPixelWidth: _textMeasure.fontWidth readonly property real defaultFontPixelWidth: _textMeasure.fontWidth
......
...@@ -55,6 +55,10 @@ Item { ...@@ -55,6 +55,10 @@ Item {
property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property string formatedMessage: activeVehicle ? activeVehicle.formatedMessage : "" property string formatedMessage: activeVehicle ? activeVehicle.formatedMessage : ""
onHeightChanged: {
ScreenTools.availableHeight = parent.height - toolBar.height
}
function showFlyView() { function showFlyView() {
if(currentPopUp) { if(currentPopUp) {
currentPopUp.close() currentPopUp.close()
...@@ -276,19 +280,18 @@ Item { ...@@ -276,19 +280,18 @@ Item {
opaqueBackground: leftPanel.visible opaqueBackground: leftPanel.visible
isBackgroundDark: flightView.isBackgroundDark isBackgroundDark: flightView.isBackgroundDark
z: QGroundControl.zOrderTopMost z: QGroundControl.zOrderTopMost
onShowSetupView: mainWindow.showSetupView() onShowSetupView: mainWindow.showSetupView()
onShowPlanView: mainWindow.showPlanView() onShowPlanView: mainWindow.showPlanView()
onShowFlyView: mainWindow.showFlyView() onShowFlyView: mainWindow.showFlyView()
Component.onCompleted: {
ScreenTools.availableHeight = parent.height - toolBar.height
}
} }
FlightDisplayView { FlightDisplayView {
id: flightView id: flightView
anchors.left: parent.left anchors.fill: parent
anchors.right: parent.right visible: true
anchors.top: toolBar.bottom
anchors.bottom: parent.bottom
visible: true
} }
Loader { Loader {
......
...@@ -41,7 +41,7 @@ import QGroundControl.Controllers 1.0 ...@@ -41,7 +41,7 @@ import QGroundControl.Controllers 1.0
Rectangle { Rectangle {
id: toolBar id: toolBar
color: qgcPal.window color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(1,1,1,0.8) : Qt.rgba(0,0,0,0.75)
QGCPalette { id: qgcPal; colorGroupEnabled: true } QGCPalette { id: qgcPal; colorGroupEnabled: true }
...@@ -424,6 +424,15 @@ Rectangle { ...@@ -424,6 +424,15 @@ Rectangle {
mipmap: true mipmap: true
antialiasing: true antialiasing: true
} }
/* Experimenting with a white/black divider
Rectangle {
color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(0,0,0,0.15) : Qt.rgba(1,1,1,0.15)
height: parent.height
width: 1
anchors.right: parent.right
anchors.top: parent.top
}
*/
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: mainWindow.showLeftMenu() onClicked: mainWindow.showLeftMenu()
......
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