2020-05-19 13:22:38 +00:00
|
|
|
import QtQuick 2.3
|
|
|
|
import QtQuick.Controls 1.3
|
|
|
|
import QtQuick.Controls 2.3
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import QtQml 2.14
|
2020-05-29 18:02:06 +00:00
|
|
|
import "../imports"
|
2020-05-19 13:22:38 +00:00
|
|
|
|
|
|
|
Button {
|
2020-05-29 18:02:06 +00:00
|
|
|
property string label: "My button"
|
2020-05-29 18:12:57 +00:00
|
|
|
property color btnColor: Theme.lightBlue
|
|
|
|
property color textColor: Theme.blue
|
|
|
|
property bool disabled: false
|
2020-05-19 13:22:38 +00:00
|
|
|
|
|
|
|
id: btnStyled
|
2020-05-29 18:02:06 +00:00
|
|
|
width: txtBtnLabel.width + 2 * Theme.padding
|
|
|
|
height: 44
|
2020-05-29 18:12:57 +00:00
|
|
|
enabled: !disabled
|
2020-05-19 13:22:38 +00:00
|
|
|
|
|
|
|
background: Rectangle {
|
2020-05-29 19:15:55 +00:00
|
|
|
color: disabled ? Theme.grey : btnStyled.btnColor
|
2020-05-29 18:12:57 +00:00
|
|
|
radius: Theme.radius
|
2020-05-29 18:02:06 +00:00
|
|
|
anchors.fill: parent
|
2020-05-19 13:22:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
id: txtBtnLabel
|
2020-05-29 18:12:57 +00:00
|
|
|
color: btnStyled.disabled ? Theme.darkGrey : btnStyled.textColor
|
|
|
|
font.pixelSize: 15
|
2020-05-19 13:22:38 +00:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2020-05-29 18:12:57 +00:00
|
|
|
text: btnStyled.label
|
2020-05-29 18:02:06 +00:00
|
|
|
font.weight: Font.Medium
|
2020-05-19 13:22:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|