Skip to content
Snippets Groups Projects
QmlTest.qml 41.5 KiB
Newer Older
  • Learn to ignore specific revisions
  • import QtQuick 2.3
    import QtQuick.Controls 1.2
    
    import QtQuick.Controls.Styles 1.4
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    import QGroundControl.Palette       1.0
    import QGroundControl.Controls      1.0
    import QGroundControl.ScreenTools   1.0
    
    Don Gagne's avatar
    Don Gagne committed
    
    Rectangle {
    
    
    
        QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
    
    
        property var palette: QGCPalette { colorGroupEnabled: true }
    
        color: "white"
    
    Don Gagne's avatar
    Don Gagne committed
    
    
        Component {
            id: arbBox
            Rectangle {
                width:  arbGrid.width  * 1.5
                height: arbGrid.height * 1.5
                color:  backgroundColor
                border.color: qgcPal.text
                border.width: 1
                anchors.horizontalCenter: parent.horizontalCenter
                GridLayout {
                    id: arbGrid
                    columns: 4
                    rowSpacing: 10
                    anchors.centerIn: parent
                    QGCColoredImage {
                        color:                      qgcPal.colorGreen
                        width:                      ScreenTools.defaultFontPixelWidth * 2
                        height:                     width
                        sourceSize.height:          width
                        mipmap:                     true
                        fillMode:                   Image.PreserveAspectFit
                        source:                     "/qmlimages/Gears.svg"
                    }
                    Label { text: "colorGreen"; color: qgcPal.colorGreen; }
                    QGCColoredImage {
                        color:                      qgcPal.colorOrange
                        width:                      ScreenTools.defaultFontPixelWidth * 2
                        height:                     width
                        sourceSize.height:          width
                        mipmap:                     true
                        fillMode:                   Image.PreserveAspectFit
                        source:                     "/qmlimages/Gears.svg"
                    }
                    Label { text: "colorOrange"; color: qgcPal.colorOrange; }
                    QGCColoredImage {
                        color:                      qgcPal.colorRed
                        width:                      ScreenTools.defaultFontPixelWidth * 2
                        height:                     width
                        sourceSize.height:          width
                        mipmap:                     true
                        fillMode:                   Image.PreserveAspectFit
                        source:                     "/qmlimages/Gears.svg"
                    }
                    Label { text: "colorRed"; color: qgcPal.colorRed; }
                    QGCColoredImage {
                        color:                      qgcPal.colorGrey
                        width:                      ScreenTools.defaultFontPixelWidth * 2
                        height:                     width
                        sourceSize.height:          width
                        mipmap:                     true
                        fillMode:                   Image.PreserveAspectFit
                        source:                     "/qmlimages/Gears.svg"
                    }
                    Label { text: "colorGrey"; color: qgcPal.colorGrey;  }
                    QGCColoredImage {
                        color:                      qgcPal.colorBlue
                        width:                      ScreenTools.defaultFontPixelWidth * 2
                        height:                     width
                        sourceSize.height:          width
                        mipmap:                     true
                        fillMode:                   Image.PreserveAspectFit
                        source:                     "/qmlimages/Gears.svg"
                    }
                    Label { text: "colorBlue"; color: qgcPal.colorBlue; }
                }
            }
        }
    
    
    Don Gagne's avatar
    Don Gagne committed
        Column {
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    dogmaphobic's avatar
    dogmaphobic committed
            Rectangle {
                width:  parent.width
                height: themeChoice.height * 2
                color:  palette.window
                QGCLabel {
    
    Tomaz Canabrava's avatar
    Tomaz Canabrava committed
                    text: qsTr("Window Color")
    
    dogmaphobic's avatar
    dogmaphobic committed
                    anchors.left:           parent.left
                    anchors.leftMargin:     20
    
    Don Gagne's avatar
    Don Gagne committed
                }
    
    dogmaphobic's avatar
    dogmaphobic committed
                Row {
                    id: themeChoice
                    anchors.centerIn: parent
                    anchors.margins: 20
                    spacing:         20
                    ExclusiveGroup { id: themeGroup }
                    QGCRadioButton {
    
    Tomaz Canabrava's avatar
    Tomaz Canabrava committed
                        text: qsTr("Light")
    
    dogmaphobic's avatar
    dogmaphobic committed
                        checked: palette.globalTheme === QGCPalette.Light
                        exclusiveGroup: themeGroup
                        onClicked: { palette.globalTheme = QGCPalette.Light }
                    }
                    QGCRadioButton {
    
    Tomaz Canabrava's avatar
    Tomaz Canabrava committed
                        text: qsTr("Dark")
    
    dogmaphobic's avatar
    dogmaphobic committed
                        checked: palette.globalTheme === QGCPalette.Dark
                        exclusiveGroup: themeGroup
                        onClicked: { palette.globalTheme = QGCPalette.Dark }
                    }
    
    Don Gagne's avatar
    Don Gagne committed
                }
    
    Don Gagne's avatar
    Don Gagne committed
            }
    
            Row {
                spacing: 30
    
                Grid {
    
                    columns: 5
    
    Don Gagne's avatar
    Don Gagne committed
                    spacing: 5
    
                    Component {
                        id: rowHeader
    
                        Text {
                            width: 180
                            height: 20
                            horizontalAlignment: Text.AlignRight
                            verticalAlignment: Text.AlignVCenter
    
                            color: "black"
    
    Don Gagne's avatar
    Don Gagne committed
                            text: parent.text
                        }
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // Header row
                    Loader {
                        sourceComponent: rowHeader
                        property var text: ""
                    }
    
    Don Gagne's avatar
    Don Gagne committed
                    Text {
    
    Don Gagne's avatar
    Don Gagne committed
                        width: 80
    
    Don Gagne's avatar
    Don Gagne committed
                        height: 20
    
                        color: "black"
    
    Don Gagne's avatar
    Don Gagne committed
                        horizontalAlignment: Text.AlignHCenter
    
    Tomaz Canabrava's avatar
    Tomaz Canabrava committed
                        text: qsTr("Disabled")
    
    Don Gagne's avatar
    Don Gagne committed
                    }
                    Text {
                        width: 80
                        height: 20
    
                        color: "black"
    
    Don Gagne's avatar
    Don Gagne committed
                        horizontalAlignment: Text.AlignHCenter
    
    Tomaz Canabrava's avatar
    Tomaz Canabrava committed
                        text: qsTr("Enabled")
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Tomaz Canabrava's avatar
    Tomaz Canabrava committed
                        text: qsTr("Value")
    
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Tomaz Canabrava's avatar
    Tomaz Canabrava committed
                        text: qsTr("Value")
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // window
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "window"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.window
                        onColorSelected: palette.window = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        color: palette.window
                        onColorSelected: palette.window = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.window
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.window
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // windowShade
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "windowShade"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.windowShade
                        onColorSelected: palette.windowShade = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.windowShade
                        onColorSelected: palette.windowShade = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.windowShade
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        text: palette.windowShade
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // windowShadeDark
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "windowShadeDark"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.windowShadeDark
                        onColorSelected: palette.windowShadeDark = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.windowShadeDark
                        onColorSelected: palette.windowShadeDark = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.windowShadeDark
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        text: palette.windowShadeDark
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // text
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "text"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.text
                        onColorSelected: palette.text = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.text
                        onColorSelected: palette.text = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.text
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        text: palette.text
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // button
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "button"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.button
                        onColorSelected: palette.button = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.button
                        onColorSelected: palette.button = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.button
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        text: palette.button
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // buttonText
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "buttonText"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.buttonText
                        onColorSelected: palette.buttonText = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        color: palette.buttonText
                        onColorSelected: palette.buttonText = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.buttonText
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.buttonText
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
                    // buttonHighlight
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "buttonHighlight"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.buttonHighlight
                        onColorSelected: palette.buttonHighlight = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.buttonHighlight
                        onColorSelected: palette.buttonHighlight = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.buttonHighlight
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        text: palette.buttonHighlight
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // buttonHighlightText
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "buttonHighlightText"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.buttonHighlightText
                        onColorSelected: palette.buttonHighlightText = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.buttonHighlightText
                        onColorSelected: palette.buttonHighlightText = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.buttonHighlightText
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        text: palette.buttonHighlightText
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // primaryButton
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "primaryButton"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.primaryButton
                        onColorSelected: palette.primaryButton = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.primaryButton
                        onColorSelected: palette.primaryButton = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.primaryButton
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        text: palette.primaryButton
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // primaryButtonText
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "primaryButtonText"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.primaryButtonText
                        onColorSelected: palette.primaryButtonText = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.primaryButtonText
                        onColorSelected: palette.primaryButtonText = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.primaryButtonText
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        text: palette.primaryButtonText
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Don Gagne's avatar
    Don Gagne committed
                    // textField
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "textField"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.textField
                        onColorSelected: palette.textField = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.textField
                        onColorSelected: palette.textField = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.textField
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        text: palette.textField
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
                    // textFieldText
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "textFieldText"
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
    
                        color: palette.textFieldText
                        onColorSelected: palette.textFieldText = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
                    ClickableColor {
    
    Don Gagne's avatar
    Don Gagne committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
    
                        color: palette.textFieldText
                        onColorSelected: palette.textFieldText = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.textFieldText
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.textFieldText
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    dogmaphobic's avatar
    dogmaphobic committed
    
                    // warningText
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "warningText"
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        color: palette.warningText
                        onColorSelected: palette.warningText = color
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.warningText
                        onColorSelected: palette.warningText = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.warningText
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.warningText
                    }
    
    
                    // colorGreen
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "colorGreen"
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        color: palette.colorGreen
                        onColorSelected: palette.colorGreen = color
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.colorGreen
                        onColorSelected: palette.colorGreen = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.colorGreen
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.colorGreen
                    }
    
                    // colorOrange
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "colorOrange"
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        color: palette.colorOrange
                        onColorSelected: palette.colorOrange = color
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.colorOrange
                        onColorSelected: palette.colorOrange = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.colorOrange
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.colorOrange
                    }
    
                    // colorRed
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "colorRed"
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        color: palette.colorRed
                        onColorSelected: palette.colorRed = color
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.colorRed
                        onColorSelected: palette.colorRed = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.colorRed
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.colorRed
                    }
    
                    // colorGrey
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "colorGrey"
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        color: palette.colorGrey
                        onColorSelected: palette.colorGrey = color
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.colorGrey
                        onColorSelected: palette.colorGrey = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.colorGrey
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.colorGrey
                    }
    
                    // colorBlue
                    Loader {
                        sourceComponent: rowHeader
                        property var text: "colorBlue"
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        color: palette.colorBlue
                        onColorSelected: palette.colorBlue = color
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.colorBlue
                        onColorSelected: palette.colorBlue = color
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.colorBlue
                    }
                    Text {
                        width: 80
                        height: 20
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.colorBlue
                    }
    
    
    Gus Grubba's avatar
    Gus Grubba committed
                    // alertBackground
    
    Don Gagne's avatar
    Don Gagne committed
                    Loader {
    
    Gus Grubba's avatar
    Gus Grubba committed
                        sourceComponent: rowHeader
                        property var text: "alertBackground"
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        color: palette.alertBackground
                        onColorSelected: palette.alertBackground = color
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.alertBackground
                        onColorSelected: palette.alertBackground = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
                    Text {
    
    Gus Grubba's avatar
    Gus Grubba committed
                        width: 80
    
    Don Gagne's avatar
    Don Gagne committed
                        height: 20
    
                        color: "black"
    
    Don Gagne's avatar
    Don Gagne committed
                        horizontalAlignment: Text.AlignHCenter
    
    Gus Grubba's avatar
    Gus Grubba committed
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.alertBackground
    
    Don Gagne's avatar
    Don Gagne committed
                    }
                    Text {
    
    Gus Grubba's avatar
    Gus Grubba committed
                        width: 80
    
    Don Gagne's avatar
    Don Gagne committed
                        height: 20
    
                        color: "black"
    
    Don Gagne's avatar
    Don Gagne committed
                        horizontalAlignment: Text.AlignHCenter
    
    Gus Grubba's avatar
    Gus Grubba committed
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.alertBackground
    
    Gus Grubba's avatar
    Gus Grubba committed
                    // alertBorder
    
    Don Gagne's avatar
    Don Gagne committed
                    Loader {
    
    Gus Grubba's avatar
    Gus Grubba committed
                        sourceComponent: rowHeader
                        property var text: "alertBorder"
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Gus Grubba's avatar
    Gus Grubba committed
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        color: palette.alertBorder
                        onColorSelected: palette.alertBorder = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Gus Grubba's avatar
    Gus Grubba committed
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.alertBorder
                        onColorSelected: palette.alertBorder = color
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Gus Grubba's avatar
    Gus Grubba committed
                    Text {
                        width: 80
    
    Don Gagne's avatar
    Don Gagne committed
                        height: 20
    
    Gus Grubba's avatar
    Gus Grubba committed
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.alertBorder
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Gus Grubba's avatar
    Gus Grubba committed
                    Text {
                        width: 80
    
    Don Gagne's avatar
    Don Gagne committed
                        height: 20
    
    Gus Grubba's avatar
    Gus Grubba committed
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.alertBorder
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Gus Grubba's avatar
    Gus Grubba committed
                    // alertText
    
    Don Gagne's avatar
    Don Gagne committed
                    Loader {
    
    Gus Grubba's avatar
    Gus Grubba committed
                        sourceComponent: rowHeader
                        property var text: "alertText"
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Gus Grubba's avatar
    Gus Grubba committed
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        color: palette.alertText
                        onColorSelected: palette.alertText = color
                    }
                    ClickableColor {
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        color: palette.alertText
                        onColorSelected: palette.alertText = color
                    }
                    Text {
                        width: 80
    
    Don Gagne's avatar
    Don Gagne committed
                        height: 20
    
    Gus Grubba's avatar
    Gus Grubba committed
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: false }
                        text: palette.alertText
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Gus Grubba's avatar
    Gus Grubba committed
                    Text {
                        width: 80
    
    Don Gagne's avatar
    Don Gagne committed
                        height: 20
    
    Gus Grubba's avatar
    Gus Grubba committed
                        color: "black"
                        horizontalAlignment: Text.AlignHCenter
                        property var palette: QGCPalette { colorGroupEnabled: true }
                        text: palette.alertText
    
    Don Gagne's avatar
    Don Gagne committed
                    }
    
    Gus Grubba's avatar
    Gus Grubba committed
                }
    
                Column {
                    spacing: 10
                    width: leftGrid.width
                    Grid {
                        id: leftGrid
                        columns: 3
                        spacing: 10
    
                        Component {
                            id: ctlRowHeader
    
                            Text {
                                width: 120
                                height: 20
                                horizontalAlignment: Text.AlignRight
                                verticalAlignment: Text.AlignVCenter
                                color: "black"
                                text: parent.text
                            }
    
    Gus Grubba's avatar
    Gus Grubba committed
    
    
                        // Header row
                        Loader {
                            sourceComponent: ctlRowHeader
                            property var text: ""
    
    Gus Grubba's avatar
    Gus Grubba committed
                        Text {
                            width: 100
                            height: 20
                            color: "black"
                            horizontalAlignment: Text.AlignHCenter
                            text: qsTr("Enabled")
                        }
                        Text {
                            width: 100
                            height: 20
                            color: "black"
                            horizontalAlignment: Text.AlignHCenter
                            text: qsTr("Disabled")
    
    Gus Grubba's avatar
    Gus Grubba committed
                        // QGCLabel
                        Loader {
                            sourceComponent: ctlRowHeader
                            property var text: "QGCLabel"
                        }
                        QGCLabel {
                            width: 100
                            height: 20
                            text: qsTr("Label")
                        }
                        QGCLabel {
                            width: 100
                            height: 20
                            text: qsTr("Label")
                            enabled: false
                        }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Gus Grubba's avatar
    Gus Grubba committed
                        // QGCButton
                        Loader {
                            sourceComponent: ctlRowHeader
                            property var text: "QGCButton"
                        }
                        QGCButton {
                            width: 100
                            height: 20
                            text: qsTr("Button")
                        }
                        QGCButton {
                            width: 100
                            height: 20
                            text: qsTr("Button")
                            enabled: false
                        }
    
    Don Gagne's avatar
    Don Gagne committed
    
    
    Gus Grubba's avatar
    Gus Grubba committed
                        // QGCButton - primary
                        Loader {
                            sourceComponent: ctlRowHeader
                            property var text: "QGCButton(primary)"
                        }
                        QGCButton {
                            width: 100
                            height: 20
                            primary: true
                            text: qsTr("Button")
                        }
                        QGCButton {
                            width: 100
                            height: 20
                            text: qsTr("Button")
                            primary: true
                            enabled: false
                        }
    
    Gus Grubba's avatar
    Gus Grubba committed
                        // QGCButton - menu
                        Loader {
                            sourceComponent: ctlRowHeader
                            property var text: "QGCButton(menu)"
                        }
                        Menu {
                            id: buttonMenu
                            MenuItem {
                                text: qsTr("Item 1")
                            }
                            MenuItem {
                                text: qsTr("Item 2")
                            }
                            MenuItem {
                                text: qsTr("Item 3")
                            }
                        }
                        QGCButton {
                            width: 100
                            height: 20
                            text: qsTr("Button")
                            menu: buttonMenu
                        }
                        QGCButton {
                            width: 100
                            height: 20
                            text: qsTr("Button")
                            enabled: false
                            menu: buttonMenu
                        }
    
    Gus Grubba's avatar
    Gus Grubba committed
                        // QGCRadioButton
                        Loader {
                            sourceComponent: ctlRowHeader
                            property var text: "QGCRadioButton"
                        }
                        QGCRadioButton {
                            width: 100
                            height: 20
                            text: qsTr("Radio")
                        }
                        QGCRadioButton {
                            width: 100
                            height: 20
                            text: qsTr("Radio")
                            enabled: false
                        }
    
                        // QGCCheckBox
                        Loader {
                            sourceComponent: ctlRowHeader
                            property var text: "QGCCheckBox"
                        }
                        QGCCheckBox {
                            width: 100
                            height: 20
                            text: qsTr("Check Box")
                        }
                        QGCCheckBox {
                            width: 100