• Gus Grubba's avatar
    Plan View Work · 6940e70c
    Gus Grubba authored
    Toggle Rally Point insertion on/off.
    Highlight current Rally Point and current Waypoint.
    Use tab bar instead of a row of radio buttons for selection (Mission, Fence, Rally).
    Fix QGCHoverButton to handle proper checked state toggle.
    Get rid of the many arrays used to define behaviors for the ToolStrip. They are now all defined within its model.
    Fixed color for disabled text within ToolStrip (it was invisible)
    6940e70c
QGCTabButton.qml 922 Bytes
import QtQuick                      2.11
import QtQuick.Controls             2.4

import QGroundControl               1.0
import QGroundControl.Palette       1.0
import QGroundControl.Controls      1.0
import QGroundControl.ScreenTools   1.0

TabButton {
    id: control
    property bool _showHighlight: (pressed | hovered | checked)
    QGCPalette { id: qgcPalDisabled; colorGroupEnabled: false }
    background: Rectangle {
        color:                  enabled ? (_showHighlight ? qgcPal.buttonHighlight : qgcPal.button) : qgcPalDisabled.button
    }
    contentItem: QGCLabel {
        text:                   control.text
        color:                  enabled ? (_showHighlight ? qgcPal.buttonHighlightText : qgcPal.buttonText) : qgcPalDisabled.buttonText
        horizontalAlignment:    Text.AlignHCenter
        verticalAlignment:      Text.AlignVCenter
        elide:                  Text.ElideRight
    }
}