<commit_before>import QtQuick 2.0
import QtQuick.Controls 1.2
import Machinekit.Application 1.0
import QtQuick.Window 2.0

ListView {
    implicitWidth: 200
    implicitHeight: 200
    verticalLayoutDirection: ListView.BottomToTop
    model: notificationModel
    delegate: notificationDelegate

    function addNotification (type, text)
    {
        notificationModel.append({"type": type, "text": text})
    }

    SystemPalette {
        id: systemPalette
    }

    Component {
        id: notificationDelegate
        Rectangle {

            //height: width * 0.4
            width: parent.width
            height: textLabel.height
            radius: Screen.logicalPixelDensity * 2
            color: systemPalette.light
            border.color: systemPalette.mid
            border.width: 1

            Label {
                id: textLabel
                anchors.left: typeImage.right
                anchors.right: parent.right
                anchors.margins: Screen.logicalPixelDensity * 5
                horizontalAlignment: Text.AlignHCenter
                verticalAlignment: Text.AlignVCenter
                wrapMode: Text.WordWrap
                text: model.text
            }

            Image {
                id: typeImage
                anchors.left: parent.left
                anchors.top: parent.top
                anchors.bottom: parent.bottom
                width: parent.width * 0.13
                anchors.margins: Screen.logicalPixelDensity * 5
                fillMode: Image.PreserveAspectFit
                source: {
                    switch (model.type) {
                    case ApplicationError.NmlError:
                    case ApplicationError.OperatorError:
                        return "qrc:Machinekit/Application/Controls/icons/dialog-error"<commit_msg>applicationcontrols/ApplicationNotifications: width of area is now 0 so that mouse events are still possible<commit_after>import QtQuick 2.0
import QtQuick.Controls 1.2
import Machinekit.Application 1.0
import QtQuick.Window 2.0

ListView {
    property int messageWidth: 100

    id: root
    implicitWidth: 200
    implicitHeight: 200
    verticalLayoutDirection: ListView.BottomToTop
    model: notificationModel
    delegate: notificationDelegate

    function addNotification (type, text)
    {
        notificationModel.append({"type": type, "text": text})
    }

    SystemPalette {
        id: systemPalette
    }

    Component {
        id: notificationDelegate
        Rectangle {

            //height: width * 0.4
            anchors.right: parent.right
            width: root.messageWidth
            height: textLabel.height
            radius: Screen.logicalPixelDensity * 2
            color: systemPalette.light
            border.color: systemPalette.mid
            border.width: 1

            Label {
                id: textLabel
                anchors.left: typeImage.right
                anchors.right: parent.right
                anchors.margins: Screen.logicalPixelDensity * 5
                horizontalAlignment: Text.AlignHCenter
                verticalAlignment: Text.AlignVCenter
                wrapMode: Text.WordWrap
                text: model.text
            }

            Image {
                id: typeImage
                anchors.left: parent.left
                anchors.top: parent.top
                anchors.bottom: parent.bottom
                width: parent.width * 0.13
                anchors.margins: Screen.logicalPixelDensity * 5
                fillMode: Image.PreserveAspectFit
                source: {
                    switch (model.type) {
                    case ApplicationError.NmlError:
                    case ApplicationError.OperatorError:
                        return "qrc:Machinekit/Application/Controls/icons/dialog-error"
{'fraction_non_alphanumeric': 0.06418653392716793, 'fraction_numerical': 0.013099292638197537, 'mean_word_length': 1.6222527472527473, 'pattern_counts': {'":': 4, '<': 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': '5904469', 'n_tokens_mistral': 1003, 'n_tokens_neox': 911, 'n_words': 216}