import QtQuick 2.7
import QtQuick.Window 2.2

Rectangle {

    width: ROOT_WIDTH ; height: ROOT_HEIGHT
    BACKGROUND

    ListModel {
        id: appGridModel

    ELEMENTS
    }

    GridView {
            id: menu
            objectName: "menuScreen"
            boundsBehavior :Flickable.StopAtBounds
            width: parent.width
            height: parent.height
            anchors.centerIn: parent
            model: appGridModel
            cellWidth: width / NUMBER_COLS
            cellHeight: height / NUMBER_ROWS
            delegate: Component {
                id: appGridDelegate
                Item {
                    id: wrapper
                    width: menu.cellWidth
                    height: menu.cellHeight
                    Rectangle {
                        anchors.fill: wrapper
                        color: "transparent"
                        CUSTOMIZE_SIZE_VIEW
                        Image {
                            id: image
                            width: ((Math.min(parent.width, parent.height)*0.6) )
                            height : width
                            source: imagen
                            anchors.centerIn: parent
                        }
                        Rectangle{
                            anchors.top: image.bottom
                            width: parent.width
                            height: ((Math.min(parent.width, parent.height)*0.2) )
                            color: "transparent"

                            Text {
                                text: name
                                horizontalAlignment: Text.AlignHCenter
                                anchors.fill: parent
                                fontSizeMode: Text.Fit
                                minimumPointSize: 6
                                font.pointSize: 120
                            }
                       }
                    }
                }
            }
        }
    }
