import QtQuick 2.12
import QtQuick.Controls 2.12 as QuickControls

import Utils 1.0

QuickControls.Button {
    id: control

    implicitHeight: Ui.scale(52)

    font.pixelSize: Ui.scale(21)
    font.family: "Roboto"
    font.weight: Font.DemiBold

    contentItem: Text {
        text: control.text
        font: control.font
        opacity: enabled ? 1.0 : 0.3
        color: Palette.secondaryButtonTextColor
        horizontalAlignment: Text.AlignHCenter
        verticalAlignment: Text.AlignVCenter
        elide: Text.ElideRight
    }

    background: Rectangle {
        radius: Ui.scale(32)
        color: control.down ? Palette.secondaryButtonPushedBackgroundColor : Palette.secondaryButtonBackgroundColor
        border.width: Ui.scale(2)
        border.color: Palette.secondaryButtonBorderColor

        width: control.width
        height: control.height
    }
}
