<commit_before>import Qt 4.7
import "helper.js" as Code

Rectangle {
    id: listOfPhones
    color: "black"
    property bool alive: false

    signal selectionChanged(int iIndex, string name)
    signal sigHeightChanged(int iHeight)
    signal sigDestructor

    Timer {
        id: cbBoxCleanupTimer
        interval: 500
        onTriggered: listOfPhones.sigDestructor();
    }// Timer

    function killSelf () {
        listOfPhones.alive = false;
        cbBoxCleanupTimer.restart ();
    }

    states: [
        State{ name: "AliveState"; when: alive == true
            PropertyChanges { target: listView; opacity: 1 }
        },
        State{ name: "DeadState"; when: alive == false
            PropertyChanges { target: listView; opacity: 0 }
        }
    ]

    function calcFontPoint () {
        var pt = Math.max(listOfPhones.width,listOfPhones.height);
        pt = pt / 20;
        if (pt < 1) pt = 1;
        sigHeightChanged(pt);
        return pt;
    }

    ListView {
        id: listView
        anchors.fill: parent

        // Display smoothly
        Behavior on opacity {
            NumberAnimation { properties:"opacity"; duration: 400 }
        }

        model: myModel
        delegate: Rectangle {
            id: rectDelegate
            color: "black"
            border.color: "grey"
            width: listView.width
            height: (txtName.height + txtNumber.height)

            Column {
                Text {
                    id: txtName
                    text: name
                    color: "white"
                    width: listView.width
                    font.pointSize: calcFontPoint ();
                    elide: Text.ElideMiddle
                }

                Text {
                    id: txtNumber
                    text: description<commit_msg>fix color on button text, clip the list view. clip listview on main application too. will be picked up on next build<commit_after>import Qt 4.7
import "helper.js" as Code

Rectangle {
    id: listOfPhones
    color: "black"
    property bool alive: false

    signal selectionChanged(int iIndex, string name)
    signal sigHeightChanged(int iHeight)
    signal sigDestructor

    Timer {
        id: cbBoxCleanupTimer
        interval: 500
        onTriggered: listOfPhones.sigDestructor();
    }// Timer

    function killSelf () {
        listOfPhones.alive = false;
        cbBoxCleanupTimer.restart ();
    }

    states: [
        State{ name: "AliveState"; when: alive == true
            PropertyChanges { target: listView; opacity: 1 }
        },
        State{ name: "DeadState"; when: alive == false
            PropertyChanges { target: listView; opacity: 0 }
        }
    ]

    function calcFontPoint () {
        var pt = Math.max(listOfPhones.width,listOfPhones.height);
        pt = pt / 20;
        if (pt < 1) pt = 1;
        sigHeightChanged(pt);
        return pt;
    }

    ListView {
        id: listView
        anchors.fill: parent
        clip: true

        // Display smoothly
        Behavior on opacity {
            NumberAnimation { properties:"opacity"; duration: 400 }
        }

        model: myModel
        delegate: Rectangle {
            id: rectDelegate
            color: "black"
            border.color: "grey"
            width: listView.width
            height: (txtName.height + txtNumber.height)

            Column {
                Text {
                    id: txtName
                    text: name
                    color: "white"
                    width: listView.width
                    font.pointSize: calcFontPoint ();
                    elide: Text.ElideMiddle
                }

                Text {
                    id: txtNumber
                    text: description
{'fraction_non_alphanumeric': 0.08076514346439957, 'fraction_numerical': 0.007438894792773645, 'mean_word_length': 1.486789960369881, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2061627', 'n_tokens_mistral': 1047, 'n_tokens_neox': 968, 'n_words': 274}