Files
StandBatteryView/Qml/Controls/Button.qml
2025-11-21 14:42:03 +03:00

36 lines
813 B
QML

import QtQuick 2.12
import QtQuick.Controls 2.12 as Controls
import Palette 1.0
Controls.Button {
id: control
leftPadding: 12
rightPadding: 12
topPadding: 8
bottomPadding: 8
font.family: "Roboto"
font.pixelSize: 14
font.weight: Font.Normal
property color backgroundColor: Palette.blueButtonColor
contentItem: Text {
text: control.text
font: control.font
opacity: enabled ? 1.0 : 0.5
color: Palette.alternativeTextColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
background: Rectangle {
color: control.pressed ? Qt.darker(control.backgroundColor, 1.4) :
control.backgroundColor
radius: 8
}
}