<commit_before>import QtQuick 2.8
import QtQuick.Layouts 1.3
import org.kde.plasma.components 2.0 as PlasmaComponents

RowLayout {
    readonly property string letters: "<KEY>"
    property var list
    property var modelItem

    function scrollList(val)
    {
        var model = list.model
        for (var i=0; i<model.count; ++i) {
            var srch = model.get(i)[modelItem]
            if (val === srch.slice(0,1)) {
                list.positionViewAtIndex(i, ListView.Visible)
                list.currentIndex = i
                break
            }
        }
    }

    Repeater {
        model: letters.length
        delegate:
            PlasmaComponents.Label {
                text: "<a href=\"cmd://" + letters.slice(index,index+1) + "\">" + letters.slice(index,index+1) + "</a>"
                onLinkActivated: scrollList(link.split("//")[1])
        }
    }
}<commit_msg>Little nicer layout/display<commit_after>import QtQuick 2.8
import QtQuick.Layouts 1.3
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras

RowLayout {
    readonly property string letters: "<KEY>"
    property var list
    property var modelItem

    function scrollList(val)
    {
        var model = list.model
        for (var i=0; i<model.count; ++i) {
            var srch = model.get(i)[modelItem]
            if (val === srch.slice(0,1)) {
                list.positionViewAtIndex(i, ListView.Center)
                list.currentIndex = i
                break
            }
        }
    }

    PlasmaComponents.ButtonRow {
        spacing: 0
        Repeater {
            model: letters.length
            delegate:
            PlasmaComponents.Button {
                text: letters.slice(index,index+1)
                onClicked: scrollList(text)
                width: units.gridUnit
                font {
                    pointSize: theme.defaultFont.pointSize - 2
                }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.10297829379101464, 'fraction_numerical': 0.013124684502776375, 'mean_word_length': 1.6568364611260054, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '7371957', 'n_tokens_mistral': 601, 'n_tokens_neox': 560, 'n_words': 126}