import QtQuick 2.0
import QGroundControl.Controls      1.0
import QGroundControl.ScreenTools   1.0
import QtQuick.Layouts              1.2

GridLayout {
    id:         main
    clip:       true
    columns:    1

    property string shortDescription: "Description"
    property string value: "-,-"
    property string unit: ""

    QGCLabel {
        Layout.fillWidth:       true
        Layout.columnSpan:      parent.columns
        wrapMode:               Text.WordWrap
        horizontalAlignment:    Text.AlignHCenter
        font.pointSize:         ScreenTools.isTinyScreen ?
                                    ScreenTools.smallFontPointSize * 0.75
                                  : ScreenTools.smallFontPointSize
        text:                   main.shortDescription
    }
    QGCLabel {
        Layout.fillWidth:       true
        horizontalAlignment:    Text.AlignHCenter
        fontSizeMode:           Text.HorizontalFit
        text:                   main.value + " " + main.unit
    }
//    QGCLabel {
//        Layout.fillWidth:       true
//        //width:                  parent.width
//        horizontalAlignment:    Text.AlignHCenter
//        font.pointSize:         ScreenTools.isTinyScreen ?
//                                    ScreenTools.smallFontPointSize * 0.75
//                                  : ScreenTools.smallFontPointSize
//        fontSizeMode:           Text.HorizontalFit
//        text:                   main.unit
//    }
} // Column
