Commit 92e15136 authored by DonLakeFlyer's avatar DonLakeFlyer

parent 22f4f7c5
...@@ -26,7 +26,7 @@ Item { ...@@ -26,7 +26,7 @@ Item {
property alias headerComponent: headerLoader.sourceComponent property alias headerComponent: headerLoader.sourceComponent
property real availableWidth: width - pageLoader.x property real availableWidth: width - pageLoader.x
property real availableHeight: height - mainContent.y property real availableHeight: height - mainContent.y
property bool poped: false property bool popped: false
property real _margins: ScreenTools.defaultFontPixelHeight * 0.5 property real _margins: ScreenTools.defaultFontPixelHeight * 0.5
signal popout() signal popout()
...@@ -47,13 +47,13 @@ Item { ...@@ -47,13 +47,13 @@ Item {
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.rightMargin: _margins anchors.rightMargin: _margins
anchors.right: floatIcon.left anchors.right: floatIcon.visible ? floatIcon.left : parent.right
spacing: _margins spacing: _margins
visible: !ScreenTools.isShortScreen && headerLoader.sourceComponent === null visible: !ScreenTools.isShortScreen && headerLoader.sourceComponent === null
QGCLabel { QGCLabel {
id: pageNameLabel id: pageNameLabel
font.pointSize: ScreenTools.largeFontPointSize font.pointSize: ScreenTools.largeFontPointSize
visible: !poped visible: !popped
} }
QGCLabel { QGCLabel {
id: pageDescriptionLabel id: pageDescriptionLabel
...@@ -86,13 +86,10 @@ Item { ...@@ -86,13 +86,10 @@ Item {
source: "/qmlimages/FloatingWindow.svg" source: "/qmlimages/FloatingWindow.svg"
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
color: qgcPal.text color: qgcPal.text
visible: !poped && !ScreenTools.isMobile visible: !popped && !ScreenTools.isMobile
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: popout()
popout()
}
} }
} }
} }
...@@ -7,11 +7,6 @@ ...@@ -7,11 +7,6 @@
* *
****************************************************************************/ ****************************************************************************/
/// @file
/// @brief Setup View
/// @author Don Gagne <don@thegagnes.com>
import QtQuick 2.3 import QtQuick 2.3
import QtQuick.Window 2.2 import QtQuick.Window 2.2
import QtQuick.Controls 1.2 import QtQuick.Controls 1.2
...@@ -23,10 +18,12 @@ import QGroundControl.Controllers 1.0 ...@@ -23,10 +18,12 @@ import QGroundControl.Controllers 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
Rectangle { Rectangle {
id: setupView id: _root
color: qgcPal.window color: qgcPal.window
z: QGroundControl.zOrderTopMost z: QGroundControl.zOrderTopMost
signal popout()
ExclusiveGroup { id: setupButtonGroup } ExclusiveGroup { id: setupButtonGroup }
readonly property real _defaultTextHeight: ScreenTools.defaultFontPixelHeight readonly property real _defaultTextHeight: ScreenTools.defaultFontPixelHeight
...@@ -147,7 +144,8 @@ Rectangle { ...@@ -147,7 +144,8 @@ Rectangle {
panelLoader.source = "" panelLoader.source = ""
buttonRepeater.itemAt(_curIndex).loader.source = source buttonRepeater.itemAt(_curIndex).loader.source = source
buttonRepeater.itemAt(_curIndex).visible = false buttonRepeater.itemAt(_curIndex).visible = false
buttonRepeater.itemAt(_curIndex).loader.item.poped = true buttonRepeater.itemAt(_curIndex).loader.item.popped = true
_root.popout()
} }
} }
......
...@@ -522,6 +522,12 @@ ApplicationWindow { ...@@ -522,6 +522,12 @@ ApplicationWindow {
anchors.right: parent.right anchors.right: parent.right
anchors.top: toolDrawerToolbar.bottom anchors.top: toolDrawerToolbar.bottom
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
Connections {
target: toolDrawerLoader.item
ignoreUnknownSignals: true
onPopout: toolDrawer.visible = false
}
} }
} }
......
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