MissionItemIndexLabel.qml 971 Bytes
Newer Older
1 2 3 4 5
import QtQuick                  2.2
import QtQuick.Controls         1.2
import QtQuick.Controls.Styles  1.2

import QGroundControl.ScreenTools 1.0
6
import QGroundControl.Palette     1.0
7 8

Rectangle {
Don Gagne's avatar
Don Gagne committed
9 10
    property alias  label:          _label.text
    property bool   isCurrentItem:  false
11

12 13
    signal clicked

14 15
    QGCPalette { id: qgcPal }

16
    width:          ScreenTools.mediumFontPixelSize * 1.5
17 18 19 20
    height:         width
    radius:         width / 2
    border.width:   2
    border.color:   "white"
21
    color:          isCurrentItem ? "green" : qgcPal.mapButtonHighlight
22

23 24 25 26 27 28
    MouseArea {
        anchors.fill: parent

        onClicked: parent.clicked()
    }

29
    QGCLabel {
Don Gagne's avatar
Don Gagne committed
30
        id:                     _label
31 32 33 34
        anchors.fill:           parent
        horizontalAlignment:    Text.AlignHCenter
        verticalAlignment:      Text.AlignVCenter
        color:                  "white"
35
        font.pixelSize:         ScreenTools.mediumFontPixelSize
36 37
    }
}