import QtQuick 2.12
import QtQuick.Controls 2.12

import Utils 1.0

Button {
    id: control

    contentItem: Text {
        text: control.text
        font.pixelSize: 16
        font.weight: Font.Bold
        opacity: enabled ? 1.0 : 0.3
        color: Palette.alternativeTextColor
        horizontalAlignment: Text.AlignHCenter
        verticalAlignment: Text.AlignVCenter
        elide: Text.ElideRight
    }

    background: Rectangle {
        implicitWidth: 200
        implicitHeight: 52
        opacity: enabled ? 1 : 0.3
        color: control.pressed ? Palette.pressedButtonColor :
                                 control.hovered ? Palette.hoveredButtonColor : Palette.buttonColor
        radius: 5
    }
}
