Files
VkuMonitor/qml/Controls/PrimaryButton.qml
2024-07-03 19:11:29 +09:00

35 lines
841 B
QML

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.primaryButtonTextColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
background: Rectangle {
radius: Ui.scale(32)
color: control.down ? Palette.primaryButtonPushedBackgroundColor : Palette.primaryButtonBackgroundColor
border.width: Ui.scale(2)
border.color: color
width: control.width
height: control.height
}
}