<commit_before>import QtQuick 2.0

Rectangle {
    id: gallery
    width: 320
    height: parent.height
    color: "#4f5764"

    signal basemapChanged(string basemapUrl)

    Rectangle {
        id: galleryHeader
        color: "#272c33"
        width: parent.width
        height: 44

        Text {
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.verticalCenter: parent.verticalCenter
            font {
                family: "Helvetica"
                pixelSize: 16
            }
            color: "#ffffff"
            text: qsTr("Basemaps")
        }
    }

    ListView {
        id: listView
        model: viewModel

        anchors.fill: parent
        anchors.margins: {
            left: 32
        }

        orientation: ListView.Horizontal
        spacing: 32
    }

    Component {
        id: layerView
        Item {
            id: item
            width: 100
            height: 100

            Image {
                id: image
                anchors.fill: parent
                fillMode: Image.PreserveAspectFit
                source: imageSource

                MouseArea {
                    anchors.fill: parent

                    onClicked: {
                        gallery.basemapChanged(layerUrl);
                        gallery.visible = false;
                    }
                }
            }

            Text {
                id: basemapText
                anchors.top: image.bottom
                anchors.horizontalCenter: parent.horizontalCenter<commit_msg>Added the hover effect to the basemap gallery<commit_after>import QtQuick 2.0

Rectangle {
    id: gallery
    width: 320
    height: parent.height
    color: "#4f5764"

    signal basemapChanged(string basemapUrl)

    Rectangle {
        id: galleryHeader
        color: "#272c33"
        width: parent.width
        height: 44

        Text {
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.verticalCenter: parent.verticalCenter
            font {
                family: "Helvetica"
                pixelSize: 16
            }
            color: "#ffffff"
            text: qsTr("Basemaps")
        }
    }

    ListView {
        id: listView
        model: viewModel

        anchors {
            fill: parent
            top: galleryHeader.bottom
            topMargin: 50
            margins: {
                left: 32
            }
        }

        orientation: ListView.HorizontalFlick
        spacing: 32
    }

    Component {
        id: layerView
        Rectangle {
            id: item
            width: 100
            height: 100

            property bool hovered: false

            Image {
                id: image
                anchors.fill: item
                fillMode: Image.PreserveAspectFit
                source: imageSource

                MouseArea {
                    anchors.fill: parent

                    hoverEnabled: true

                    onClicked: {
                        gallery.basemapChanged(layerUrl);
                        gallery.visible = false;
                    }
                    onHoveredChanged: {
                        item.hovered = !item.hovered;
                        item.color = (item.hovered) ? "#3e4551" : gallery.color;
                    }
                }
            }

            Text {
                id: basemapText
                anchors.top: image.bottom
                anchors.horizontalCenter: parent.horizontalCenter
{'fraction_non_alphanumeric': 0.06305278174037089, 'fraction_numerical': 0.018544935805991442, 'mean_word_length': 1.0770142180094786, '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': '2012055', 'n_tokens_mistral': 953, 'n_tokens_neox': 835, 'n_words': 194}