<commit_before>import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
import QtQuick.Controls.Styles 1.0

TabViewStyle {
    property string selectColor : "steelblue"
    property string nonselectColor : "lightsteelblue"
    property int tabHeight : 22
    property int splitindex  : 0
    property int indexTab : 0


    frameOverlap: 1
    tab: Rectangle {
        color: styleData.selected && activeSplit === Math.abs(splitindex) ? selectColor : nonselectColor
        border.color:  color

        implicitWidth: Math.max(text.width + 4, 100)
        implicitHeight: tabHeight
        radius: 2
        Text {
            id: text
            anchors.centerIn: parent
            text: styleData.title
            color: styleData.selected ? "white" : "black"
            elide: Text.ElideMiddle
        }
        MouseArea  {
            anchors.fill: parent
            onClicked : {
                indexTab = styleData.index
                mastercatalog.setActiveTab(Math.abs(splitindex) - 1, indexTab)
                splitindex = -splitindex

            }
        }
    }
    frame: Rectangle { color: "white"; border.width: 1 ; border.color: "lightgrey" }
}<commit_msg>added icon-button for closing tabs<commit_after>import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
import QtQuick.Controls.Styles 1.0

TabViewStyle {
    property string selectColor : "steelblue"
    property string nonselectColor : "lightsteelblue"
    property int tabHeight : 22
    property int splitindex  : 0
    property int indexTab : 0


    Action {
        id : closeStuff
        onTriggered: {
            mainsplit.closeTab(splitindex, indexTab)
        }
    }

    frameOverlap: 1
    tab: Rectangle {
        color: styleData.selected && activeSplit === Math.abs(splitindex) ? selectColor : nonselectColor
        border.color:  color

        implicitWidth: Math.max(label.width + 4, 140)
        implicitHeight: tabHeight
        radius: 2
        Text {
            id: label
            width : 100
            anchors.centerIn: parent
            text: styleData.title
            color: styleData.selected ? "white" : "black"
            elide: Text.ElideMiddle
        }
        MouseArea  {
            width : label.width
            height : parent.height
            onClicked : {
                indexTab = styleData.index
                mastercatalog.setActiveTab(Math.abs(splitindex) - 1, indexTab)
                splitindex = -splitindex

            }
        }

        Button {
            y : 2
            anchors.right : parent.right
            anchors.rightMargin: 2
            width : 18
            height : 18
            opacity : 0.5
            action : closeStuff
            Image {
                y : 2
                x : 1
                width : 15
                height : 15
                source : "images/close20.png"


            }
        }

    }
    frame: Rectangle { color: "white"; border.width: 1 ; border.color: "lightgrey" }
}
{'fraction_non_alphanumeric': 0.07809397749834547, 'fraction_numerical': 0.019523494374586368, 'mean_word_length': 1.637870855148342, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1661894', 'n_tokens_mistral': 889, 'n_tokens_neox': 819, 'n_words': 210}