38 lines
830 B
QML
38 lines
830 B
QML
|
import QtQuick 2.0
|
||
|
import QtQuick.Controls 2.2
|
||
|
|
||
|
Button {
|
||
|
id: control
|
||
|
|
||
|
width: height
|
||
|
|
||
|
font.pixelSize: width * 0.15
|
||
|
|
||
|
scale: pressed ? 0.8:1
|
||
|
|
||
|
contentItem: Text {
|
||
|
text: control.text
|
||
|
font: control.font
|
||
|
opacity: enabled ? 1.0 : 0.3
|
||
|
color: settings.theme("ButtonTextColor")
|
||
|
horizontalAlignment: Text.AlignHCenter
|
||
|
verticalAlignment: Text.AlignVCenter
|
||
|
elide: Text.ElideRight
|
||
|
}
|
||
|
|
||
|
background: Rectangle {
|
||
|
color: settings.theme("ButtonBackgroundColor")
|
||
|
radius: width * 0.5
|
||
|
border.color: settings.theme("ButtonBorderColor")
|
||
|
border.width: parseInt(settings.theme("ButtonBorderWidth"))
|
||
|
}
|
||
|
|
||
|
Behavior on scale {
|
||
|
NumberAnimation {
|
||
|
easing.type: Easing.InOutQuad
|
||
|
duration: 200
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|