<commit_before>import QtQuick 2.2
import QtQml.Models 2.1
import Sonetta 0.1
import Navigation 0.1
import "../common"
import "../common/States.js" as States

ListView {
    id: root
    model: [ "nowplaying", "playlists", "search", "explore", "session" ]
    currentIndex: {
        switch (UI.page)
        {
        case "nowplaying":
            return 0
        case "playlists":
            return 1
        case "search":
            return 2
        case "explore":
            return 3
        case "session":
            return 4
        }
    }

    delegate: MainMenuEntry {
        id: entry
        page: modelData
        height: root.height / root.count
        selected: ListView.isCurrentItem

        Rectangle {
            anchors {
                top: entry.top
                left: entry.left
                right: entry.right
            }
            height: 1
            z: -1
            parent: root.contentItem
            color: ui.colors.light
        }

        Rectangle {
            visible: index == root.count - 1
            anchors {
                bottom: entry.bottom
                left: entry.left
                right: entry.right
            }
            height: 1
            z: -1
            parent: root.contentItem
            color: ui.colors.light
        }
    }

    highlightMoveDuration: ui.misc.globalAnimationTime
    highlight: Rectangle {
        width: root.activeFocus ? root.width : ui.misc.globalPadding / 2
        color: ui.colors.highlight

        Behavior on width {
            SmoothedAnimation { duration: ui.misc.globalAnimationTime; velocity: -1 }
        }
    }

    Keys.forwardTo: Nav {
        onDown: updateIndex(currentIndex + 1)
        onUp: updateIndex(currentIndex - 1)
    }<commit_msg>Changed main menu delegate to a pattern of different color<commit_after>import QtQuick 2.2
import QtQml.Models 2.1
import Sonetta 0.1
import Navigation 0.1
import "../common"
import "../common/States.js" as States

ListView {
    id: root
    model: [ "nowplaying", "playlists", "search", "explore", "session" ]
    currentIndex: {
        switch (UI.page)
        {
        case "nowplaying":
            return 0
        case "playlists":
            return 1
        case "search":
            return 2
        case "explore":
            return 3
        case "session":
            return 4
        }
    }

    delegate: MainMenuEntry {
        id: entry
        page: modelData
        height: root.height / root.count
        selected: ListView.isCurrentItem

        Rectangle {
            anchors {
                top: entry.top
                left: entry.left
                right: entry.right
            }
            height: 1
            z: -1
            parent: root.contentItem
            color: ui.colors.light
        }

        Rectangle {
            visible: index == root.count - 1
            anchors {
                bottom: entry.bottom
                left: entry.left
                right: entry.right
            }
            height: 1
            z: -1
            parent: root.contentItem
            color: ui.colors.light
        }
    }

    highlightMoveDuration: ui.misc.globalAnimationTime
    highlight: Pattern {
        width: root.width
        pattern: "medium"

        Rectangle {
            width: root.activeFocus ? root.width : ui.misc.globalPadding / 2
            color: ui.colors.highlight
            anchors {
                top: parent.top
                bottom: parent.bottom
            }

            Behavior on width {
                SmoothedAnimation { duration: ui.misc.globalAnimationTime; velocity: -1 }
            }
        }
    }

    Keys.forwardTo: Nav {
        onDown: updateIndex(currentIndex + 1)
        onUp: updateIndex(currentIndex - 1)
    }
{'fraction_non_alphanumeric': 0.08372703412073491, 'fraction_numerical': 0.011548556430446194, 'mean_word_length': 1.3153098420413123, 'pattern_counts': {'":': 10, '<': 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': '3623512', 'n_tokens_mistral': 1067, 'n_tokens_neox': 987, 'n_words': 267}