Commit 9ca7cd34 authored by Gus Grubba's avatar Gus Grubba

UI tweaks

parent 61a41ef0
...@@ -25,7 +25,7 @@ Item { ...@@ -25,7 +25,7 @@ Item {
property alias pageDescription: pageDescriptionLabel.text property alias pageDescription: pageDescriptionLabel.text
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 - pageLoader.y property real availableHeight: height - mainContent.y
property bool poped: false property bool poped: false
property real _margins: ScreenTools.defaultFontPixelHeight * 0.5 property real _margins: ScreenTools.defaultFontPixelHeight * 0.5
...@@ -36,7 +36,9 @@ Item { ...@@ -36,7 +36,9 @@ Item {
anchors.topMargin: _margins anchors.topMargin: _margins
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.rightMargin: _margins
anchors.right: floatIcon.left anchors.right: floatIcon.left
visible: !ScreenTools.isShortScreen && headerLoader.sourceComponent !== null
} }
Column { Column {
...@@ -44,12 +46,14 @@ Item { ...@@ -44,12 +46,14 @@ Item {
anchors.topMargin: _margins anchors.topMargin: _margins
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.rightMargin: _margins
anchors.right: floatIcon.left anchors.right: floatIcon.left
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
} }
QGCLabel { QGCLabel {
id: pageDescriptionLabel id: pageDescriptionLabel
...@@ -60,6 +64,7 @@ Item { ...@@ -60,6 +64,7 @@ Item {
} }
QGCFlickable { QGCFlickable {
id: mainContent
anchors.topMargin: ScreenTools.defaultFontPixelHeight anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: headerLoader.sourceComponent === null ? (headingColumn.visible ? headingColumn.bottom : parent.top) : headerLoader.bottom anchors.top: headerLoader.sourceComponent === null ? (headingColumn.visible ? headingColumn.bottom : parent.top) : headerLoader.bottom
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
...@@ -75,7 +80,7 @@ Item { ...@@ -75,7 +80,7 @@ Item {
QGCColoredImage { QGCColoredImage {
id: floatIcon id: floatIcon
anchors.top: parent.top anchors.verticalCenter: headerLoader.visible ? headerLoader.verticalCenter : headingColumn.verticalCenter
anchors.right: parent.right anchors.right: parent.right
width: ScreenTools.defaultFontPixelHeight * 2 width: ScreenTools.defaultFontPixelHeight * 2
height: width height: width
......
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