<commit_before>import QtQml 2.12
import QtQuick 2.12
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.5
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.12

import "../vendor"

ScrollView {
    id: root

    signal openImage(int index)

    property var results
    property double thumbnailHeightToWidthRatio: 0
    property int thumbnailSpacing: 0
    property int thumbnailRadius: 0
    property bool thumbnailPadding: false
    property var thumbnailFillMode: Image.PreserveAspectFit

    contentHeight: resultsLayout.contentHeight
    clip: true
    padding: thumbnailPadding
        ? root.thumbnailSpacing / 2
        : -root.thumbnailSpacing / 2

    ColumnFlow {
        id: resultsLayout

        anchors.fill: parent
        columns: window.width > window.height
            ? gSettings.resultsColumnCountLandscape.value
            : gSettings.resultsColumnCountPortrait.value
        model: results

        onColumnsChanged: resultsRefresher.restart()

        delegate: Item {
            height: img.height + root.thumbnailSpacing<commit_msg>Fix results sometimes having the wrong height when changing settings<commit_after>import QtQml 2.12
import QtQuick 2.12
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.5
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts 1.12

import "../vendor"

ScrollView {
    id: root

    signal openImage(int index)

    property var results
    property double thumbnailHeightToWidthRatio: 0
    property int thumbnailSpacing: 0
    property int thumbnailRadius: 0
    property bool thumbnailPadding: false
    property var thumbnailFillMode: Image.PreserveAspectFit

    contentHeight: resultsLayout.contentHeight
    clip: true
    padding: thumbnailPadding
        ? root.thumbnailSpacing / 2
        : -root.thumbnailSpacing / 2

    onThumbnailHeightToWidthRatioChanged: resultsRefresher.restart()
    onThumbnailSpacingChanged: resultsRefresher.restart()
    onThumbnailPaddingChanged: resultsRefresher.restart()
    onThumbnailFillModeChanged: resultsRefresher.restart()

    ColumnFlow {
        id: resultsLayout

        anchors.fill: parent
        columns: window.width > window.height
            ? gSettings.resultsColumnCountLandscape.value
            : gSettings.resultsColumnCountPortrait.value
        model: results

        onColumnsChanged: resultsRefresher.restart()

        delegate: Item {
            height: img.height + root.thumbnailSpacing
{'fraction_non_alphanumeric': 0.05858421480878763, 'fraction_numerical': 0.01708706265256306, 'mean_word_length': 3.1748726655348047, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '358412', 'n_tokens_mistral': 704, 'n_tokens_neox': 656, 'n_words': 172}