<commit_before>import QtQuick 2.5
import QtQuick.Controls 1.4
import NoteEverywhere 1.0

Loader {
    active: NoteEverywhere.currentCategory === Ne.NONE
    sourceComponent: Rectangle {
        color: NoteEverywhere.colors.categoryIndicator
        width: 70 * NoteEverywhere.ratio
        height: categoryLabel.implicitHeight

        Label {
            id: categoryLabel
            text: NoteEverywhere.categoryAsText(category)
            elide: Text.ElideRight
            anchors.fill: parent
            anchors.leftMargin: 5 * NoteEverywhere.ratio
            anchors.rightMargin: 5 * NoteEverywhere.ratio
            font.pixelSize: 11 * NoteEverywhere.ratio
        }
    }
}<commit_msg>Improved positioning.<commit_after>import QtQuick 2.5
import QtQuick.Controls 1.4
import NoteEverywhere 1.0

Loader {
    property int pixelSize: 11 * NoteEverywhere.ratio

    active: NoteEverywhere.currentCategory === Ne.NONE

    sourceComponent: Rectangle {
        color: NoteEverywhere.colors.categoryIndicator
        width: if (categoryLabel.implicitWidth < 70 * NoteEverywhere.ratio){
                   categoryLabel.implicitWidth + 10 * NoteEverywhere.ratio
               }
               else {
                   70 * NoteEverywhere.ratio
               }

        height: categoryLabel.implicitHeight

        Label {
            id: categoryLabel
            text: NoteEverywhere.categoryAsText(category)
            elide: Text.ElideRight
            anchors.left: parent.left
            anchors.right: parent.right
            anchors.leftMargin: 5 * NoteEverywhere.ratio
            anchors.rightMargin: 5 * NoteEverywhere.ratio
            font.pixelSize: pixelSize
        }
    }
}
{'fraction_non_alphanumeric': 0.06933019976498238, 'fraction_numerical': 0.01645123384253819, 'mean_word_length': 2.113345521023766, 'pattern_counts': {'":': 0, '<': 4, '<?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': '4804562', 'n_tokens_mistral': 467, 'n_tokens_neox': 441, 'n_words': 95}