linphone-desktop/tests/ui/modules/Common/Form/SmallButton.qml
2016-12-28 14:23:52 +01:00

35 lines
934 B
QML

import QtQuick 2.7
import QtQuick.Controls 2.0
import Common.Styles 1.0
// =============================================================================
Button {
id: button
property alias backgroundColor: background.color
background: Rectangle {
id: background
color: button.down
? SmallButtonStyle.background.color.pressed
: (button.hovered
? SmallButtonStyle.background.color.hovered
: SmallButtonStyle.background.color.normal
)
implicitHeight: SmallButtonStyle.background.height
radius: SmallButtonStyle.background.radius
}
contentItem: Text {
color: SmallButtonStyle.text.color
font.pointSize: SmallButtonStyle.text.fontSize
horizontalAlignment: Text.AlignHCenter
text: button.text
verticalAlignment: Text.AlignVCenter
leftPadding: SmallButtonStyle.leftPadding
rightPadding: SmallButtonStyle.rightPadding
}
hoverEnabled: true
}