<commit_before>import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1

import UM 1.0 as UM

QtObject {
    property Component sidebar_header_button: Component {
        ButtonStyle {
            background: Item {
                Image {
                    anchors.right: parent.right;
                    anchors.verticalCenter: parent.verticalCenter;

                    source: UM.Theme.icons.down_arrow;
                }
            }

            label: Label {
                property bool down: control.pressed || (control.checkable && control.checked);

                font: UM.Theme.fonts.sidebar_header;
                color: down ? UM.Theme.colors.text_pressed : control.hovered ? UM.Theme.colors.text_hover : UM.Theme.colors.text;

                text: control.text;
            }
        }
    }

    property Component tool_button: Component {
        ButtonStyle {
            background: UM.AngledCornerRectangle {
                property bool down: control.pressed || (control.checkable && control.checked);

                implicitWidth: UM.Theme.sizes.button.width;
                implicitHeight: UM.Theme.sizes.button.height;
                color: down ? UM.Theme.colors.button_down : control.hovered ? UM.Theme.colors.button_hover : UM.Theme.colors.button;
                cornerSize: UM.Theme.sizes.default_margin.width;
            }

            label: Item {
                Image {
                    anchors.centerIn: parent;

                    source: control.iconSource;
                    width: UM.Theme.sizes.button_icon.width;
                    height: UM.Theme.sizes.button_icon.height;

                    sourceSize: UM.Theme.sizes.button_icon;
                }
            }
        }
    }
}<commit_msg>Add a theme style for setting categories<commit_after>import QtQuick 2.1
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1

import UM 1.0 as UM

QtObject {
    property Component sidebar_header_button: Component {
        ButtonStyle {
            background: Item {
                Image {
                    anchors.right: parent.right;
                    anchors.verticalCenter: parent.verticalCenter;

                    source: UM.Theme.icons.down_arrow;
                }
            }

            label: Label {
                property bool down: control.pressed || (control.checkable && control.checked);

                font: UM.Theme.fonts.sidebar_header;
                color: down ? UM.Theme.colors.text_pressed : control.hovered ? UM.Theme.colors.text_hover : UM.Theme.colors.text;

                text: control.text;
            }
        }
    }

    property Component tool_button: Component {
        ButtonStyle {
            background: UM.AngledCornerRectangle {
                property bool down: control.pressed || (control.checkable && control.checked);

                implicitWidth: UM.Theme.sizes.button.width;
                implicitHeight: UM.Theme.sizes.button.height;
                color: down ? UM.Theme.colors.button_down : control.hovered ? UM.Theme.colors.button_hover : UM.Theme.colors.button;
                cornerSize: UM.Theme.sizes.default_margin.width;
            }

            label: Item {
                Image {
                    anchors.centerIn: parent;

                    source: control.iconSource;
                    width: UM.Theme.sizes.button_icon.width;
                    height: UM.Theme.sizes.button_icon.height;

                    sourceSize: UM.Theme.sizes.button_icon;
                }
            }
        }
    }

    property Component category: Component {
        ButtonStyle {
            background: UM.AngledCornerRectangle {
                property bool down: control.pressed || (control.checkable && control.checked);
                color: down ? UM.Theme.colors.button_down : control.hovered ? UM.Theme.colors.button_hover : UM.Theme.colors.button;
                cornerSize: UM.Theme.sizes.default_margin.width;
            }
            label: Row {
                anchors.fill: parent;
                anchors.margins: UM.Theme.sizes.default_margin.width;
                spacing: UM.Theme.sizes.default_margin.width;
                Image { anchors.verticalCenter: parent.verticalCenter; source: control.iconSource; }
                Label { anchors.verticalCenter: parent.verticalCenter; text: control.text; font: UM.Theme.fonts.large; color: UM.Theme.colors.button_text }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.08826790862719007, 'fraction_numerical': 0.0035484586382789974, 'mean_word_length': 1.6054303870595032, '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': '1937778', 'n_tokens_mistral': 1264, 'n_tokens_neox': 1140, 'n_words': 219}