<commit_before>import QtQuick 2.0
import QtQuick.Layouts 1.0
import QtQml.Models 2.1
import QtGraphicalEffects 1.0
import "Extra" 1.0

Rectangle {
    id: root

    signal backRequested

    color: "#81d2c9"

    Keys.onBackPressed: {
        if (clearDataConfirmationDialog.visible) {
            clearDataConfirmationDialog.hide();
            return;
        }

        root.backRequested();
    }

    function getDifficultyText(difficulty) {
        if (difficulty === 1)
            return qsTr("Easy");

        if (difficulty === 2)
            return qsTr("Normal");

        if (difficulty === 3)
            return qsTr("Hard");

        if (difficulty === 4)
            return qsTr("Hardest");

        return "";
    }

    function fixTime(milliseconds) {
        var minutes = Math.floor(milliseconds / 60000);
        var seconds = Math.floor((milliseconds % 60000) / 1000);

        if (minutes !== 0)
            return qsTr("%1m %2s").arg(minutes).arg(seconds);
        else
            return qsTr("%1s").arg(seconds)
    }

    CircularButton {
        id: backButton

        anchors.left: parent.left
        anchors.leftMargin: parent.width * 0.05
        anchors.top: parent.top
        anchors.topMargin: anchors.leftMargin

        width: root.width * 0.2
        height: width

        imageUrl: "qrc:/back.png"

        onClicked: {
            root.backRequested();
        }
    }

    CircularButton {
        id: clearDataButton

        anchors.right: parent.right
        anchors.rightMargin: parent.width * 0.05
        anchors.top: parent.top
        anchors.topMargin: anchors.rightMargin

        width: root.width * 0.2
        height: width

        imageUrl: "qrc:/reset.png"

        onClicked: {
            clearDataConfirmationDialog.show();
        }
    }

    Item {
        id: bodyItem

        anchors.top: backButton.bottom
        anchors.topMargin: backButton.anchors.topMargin
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.bottom: parent.bottom
        anchors.bottomMargin: parent.width * 0.1
        anchors.leftMargin: (parent.width / 40)
        anchors.rightMargin: (parent.width / 40)

        Rectangle {
            id: bodyItemBackground

            anchors.fill: parent
            anchors.topMargin: Globals.style.shadowWidth
            anchors.bottomMargin: Globals.style.shadowWidth

            color: Globals.style.colorPalette.backgroundColor
        }
    }

    DropShadow {
        anchors.fill: bodyItem

        fast: true
        cached: true
        color: Globals.style.colorPalette.shadowColor
        source: bodyItem
        spread: 0.2
        radius: Globals.style.shadowWidth
        samples: 32
    }

    Item {
        anchors.fill: bodyItem
        anchors.topMargin: Globals.style.shadowWidth * 2
        anchors.bottomMargin: Globals.style.shadowWidth * 2

        Row {
            id: difficultyTabsRow

            anchors.horizontalCenter: parent.horizontalCenter
            anchors.top: parent.top

            Repeater {
                model: 4

                delegate: Item {
                    width: root.width / 4
                    height: root.height * 0.1

                    Text {
                        anchors.centerIn: parent

                        font.pointSize: 24
                        font.weight: GameControl.scoreBoardModel.difficulty === index + 1 ? Font.Bold
                                                                                          : Font.Normal
                        text: getDifficultyText(index + 1)

                        color: Globals.style.colorPalette.titleColor
                    }
<commit_msg>visual update<commit_after>import QtQuick 2.0
import QtQuick.Layouts 1.0
import QtQml.Models 2.1
import QtGraphicalEffects 1.0
import "Extra" 1.0

Rectangle {
    id: root

    signal backRequested

    color: "#81d2c9"

    Image {
        id: backgroundImage

        anchors.fill: parent

        fillMode: Image.PreserveAspectFit
        source: "qrc:/game_background.png"
        opacity: 0.06
    }

    Keys.onBackPressed: {
        if (clearDataConfirmationDialog.visible) {
            clearDataConfirmationDialog.hide();
            return;
        }

        root.backRequested();
    }

    function getDifficultyText(difficulty) {
        if (difficulty === 1)
            return qsTr("Easy");

        if (difficulty === 2)
            return qsTr("Normal");

        if (difficulty === 3)
            return qsTr("Hard");

        if (difficulty === 4)
            return qsTr("Hardest");

        return "";
    }

    function fixTime(milliseconds) {
        var minutes = Math.floor(milliseconds / 60000);
        var seconds = Math.floor((milliseconds % 60000) / 1000);

        if (minutes !== 0)
            return qsTr("%1m %2s").arg(minutes).arg(seconds);
        else
            return qsTr("%1s").arg(seconds)
    }

    CircularButton {
        id: backButton

        anchors.left: parent.left
        anchors.leftMargin: parent.width * 0.05
        anchors.top: parent.top
        anchors.topMargin: anchors.leftMargin

        width: root.width * 0.18
        height: width

        imageUrl: "qrc:/back.png"

        onClicked: {
            root.backRequested();
        }
    }

    CircularButton {
        id: clearDataButton

        anchors.right: parent.right
        anchors.rightMargin: parent.width * 0.05
        anchors.top: parent.top
        anchors.topMargin: anchors.rightMargin

        width: root.width * 0.18
        height: width

        imageUrl: "qrc:/reset.png"

        onClicked: {
            clearDataConfirmationDialog.show();
        }
    }

    Item {
        id: bodyItem

        anchors.top: backButton.bottom
        anchors.topMargin: backButton.anchors.topMargin
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.bottom: parent.bottom
        anchors.bottomMargin: parent.width * 0.1

        Rectangle {
            id: bodyItemBackground

            anchors.fill: parent
            anchors.topMargin: Globals.style.shadowWidth
            anchors.bottomMargin: Globals.style.shadowWidth

            color: Globals.style.colorPalette.backgroundColor
        }
    }

    DropShadow {
        anchors.fill: bodyItem

        fast: true
        cached: true
        color: Globals.style.colorPalette.shadowColor
        source: bodyItem
        spread: 0.2
        radius: Globals.style.shadowWidth
        samples: 32
    }

    Item {
        anchors.fill: bodyItem
        anchors.topMargin: Globals.style.shadowWidth * 2
        anchors.bottomMargin: Globals.style.shadowWidth * 2

        Row {
            id: difficultyTabsRow

            anchors.horizontalCenter: parent.horizontalCenter
            anchors.top: parent.top

            Repeater {
                model: 4

                delegate: Item {
                    width: root.width / 4
                    height: root.height * 0.1

                    Text {
                        anchors.centerIn: parent

                        font.pointSize: 22
                        font.weight: GameControl.scoreBoardModel.difficulty === index + 1 ? Font.Bold
                                                                                          : Font.Normal
                        text: getDifficultyText(index + 1)

                        color: Globals.style.colorPalette.titleColor
                    }

{'fraction_non_alphanumeric': 0.08744993324432576, 'fraction_numerical': 0.017757009345794394, 'mean_word_length': 1.51460221550856, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2605720', 'n_tokens_mistral': 2238, 'n_tokens_neox': 2049, 'n_words': 418}