|
|
|
@ -68,7 +68,11 @@ Rectangle {
@@ -68,7 +68,11 @@ Rectangle {
|
|
|
|
|
|
|
|
|
|
onShowMessage: { |
|
|
|
|
toolBarMessage.text = message |
|
|
|
|
mainToolBar.height = toolBarHeight + toolBarMessage.contentHeight + verticalMargins |
|
|
|
|
if (toolBarMessage.contentHeight > toolBarMessageCloseButton.height) { |
|
|
|
|
mainToolBar.height = toolBarHeight + toolBarMessage.contentHeight + (verticalMargins * 2) |
|
|
|
|
} else { |
|
|
|
|
mainToolBar.height = toolBarHeight + toolBarMessageCloseButton.height + (verticalMargins * 2) |
|
|
|
|
} |
|
|
|
|
toolBarMessageArea.visible = true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -771,14 +775,17 @@ Rectangle {
@@ -771,14 +775,17 @@ Rectangle {
|
|
|
|
|
|
|
|
|
|
// Toolbar message area |
|
|
|
|
Rectangle { |
|
|
|
|
id: toolBarMessageArea |
|
|
|
|
anchors.margins: horizontalMargins |
|
|
|
|
anchors.top: progressBar.bottom |
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
color: qgcPal.windowShadeDark |
|
|
|
|
visible: false |
|
|
|
|
id: toolBarMessageArea |
|
|
|
|
anchors.leftMargin: horizontalMargins |
|
|
|
|
anchors.rightMargin: horizontalMargins |
|
|
|
|
anchors.topMargin: verticalMargins |
|
|
|
|
anchors.bottomMargin: verticalMargins |
|
|
|
|
anchors.top: progressBar.bottom |
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
anchors.left: parent.left |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
color: qgcPal.windowShadeDark |
|
|
|
|
visible: false |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
id: toolBarMessage |
|
|
|
@ -790,7 +797,6 @@ Rectangle {
@@ -790,7 +797,6 @@ Rectangle {
|
|
|
|
|
QGCButton { |
|
|
|
|
id: toolBarMessageCloseButton |
|
|
|
|
anchors.rightMargin: horizontalMargins |
|
|
|
|
anchors.topMargin: verticalMargins |
|
|
|
|
anchors.top: parent.top |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
primary: true |
|
|
|
@ -799,6 +805,7 @@ Rectangle {
@@ -799,6 +805,7 @@ Rectangle {
|
|
|
|
|
onClicked: { |
|
|
|
|
parent.visible = false |
|
|
|
|
mainToolBar.height = toolBarHeight |
|
|
|
|
mainToolBar.onToolBarMessageClosed() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|