/*!
 *
 * Copyright (c) 2019-2025 Diality Inc. - All Rights Reserved.
 * \copyright
 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN
 * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER.
 *
 * \file    MonitorItem.qml
 * \author  (last)      Nico Ramirez
 * \date    (last)      27-Jun-2025
 * \author  (original)  Nico Ramirez
 * \date    (original)  27-Jun-2025
 *
 */

// Qt
import QtQuick 2.12

import "qrc:/globals"
import "qrc:/components"

TouchRect { id  : _icon
    property int    iconSize        : Variables.iconButtonSize
    property string iconImageSource : ""
    property int    extraSpace      : Variables.defaultMargin
    readonly property alias  icon   : _iconImage

    width       : iconSize + extraSpace
    height      : iconSize + extraSpace
    radius      : height
    border.color: "transparent"

    Image { id  : _iconImage
        anchors.centerIn: parent
        height  : iconSize
        width   : iconSize
        fillMode: Image.PreserveAspectFit
        source  : iconImageSource
    }
}
