<commit_before>import Qt 4.7
import Bauhaus 1.0

QExtGroupBox {
    id: colorGroupBox

    property variant finished;
    property variant backendColor
    property bool gradientEditing: gradientButtonChecked
    property variant singleColor: (backendColor === undefined || backendColor.value  === undefined) ? "#000000" : backendColor.value
    property variant gradientColor: "#000000"
    property variant color: "#000000"
    property variant oldMaximumHeight;

    property variant startupCollapse: selectionChanged === undefined ? false : selectionChanged;
    property variant firstTime: true;
    property variant caption: ""
    property bool showButtons: false
    property bool showGradientButton: false

    property bool gradientButtonChecked: buttons.gradient
    property bool noneButtonChecked: buttons.none
    property bool solidButtonChecked: buttons.solid

    property alias setGradientButtonChecked: buttons.setGradient
    property alias setNoneButtonChecked: buttons.setNone
    property alias setSolidButtonChecked: buttons.setSolid

    property alias collapseBox: colorButton.checked

    property alias alpha: colorControl.alpha

    smooth: false

    onGradientColorChanged: {
        if (gradientEditing == true)
            color = gradientColor;
        colorChanged();
    }
    onSingleColorChanged: {
        if (!gradientEditing == true && color != singleColor)
            color = singleColor;
    }

    onFinishedChanged: {<commit_msg>QmlDesigner.propertyEditor: bug fix for gradient editing<commit_after>import Qt 4.7
import Bauhaus 1.0

QExtGroupBox {
    id: colorGroupBox

    property variant finished;
    property variant backendColor
    property bool gradientEditing: gradientButtonChecked
    property variant singleColor: (backendColor === undefined || backendColor.value  === undefined) ? "#000000" : backendColor.value
    property variant gradientColor: "#000000"
    property variant color: "#000000"
    property variant oldMaximumHeight;

    property variant startupCollapse: selectionChanged === undefined ? false : selectionChanged;
    property variant firstTime: true;
    property variant caption: ""
    property bool showButtons: false
    property bool showGradientButton: false

    property bool gradientButtonChecked: buttons.gradient
    property bool noneButtonChecked: buttons.none
    property bool solidButtonChecked: buttons.solid

    property alias setGradientButtonChecked: buttons.setGradient
    property alias setNoneButtonChecked: buttons.setNone
    property alias setSolidButtonChecked: buttons.setSolid

    property alias collapseBox: colorButton.checked

    property alias alpha: colorControl.alpha

    smooth: false

    onGradientColorChanged: {
        if (gradientEditing == true)
            color = gradientColor;
        colorChanged();
    }
    onSingleColorChanged: {
        if (!gradientEditing == true && color != singleColor)
            color = singleColor;
    }

    onGradientButtonCheckedChanged: {
        if (buttons.gradient == true)
            color = gradientColor;
        if (!buttons.gradient == true && color != singleColor)
            color = singleColor;
        colorChanged();
    }

    onFinishedChanged: {
{'fraction_non_alphanumeric': 0.06716186939028165, 'fraction_numerical': 0.013618074899411947, 'mean_word_length': 3.5649717514124295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '936789', 'n_tokens_mistral': 821, 'n_tokens_neox': 746, 'n_words': 241}