First implementation
This commit is contained in:
31
Qml/Controls/Button.qml
Normal file
31
Qml/Controls/Button.qml
Normal file
@@ -0,0 +1,31 @@
|
||||
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
|
||||
|
||||
property color backgroundColor: Palette.blueButtonColor
|
||||
|
||||
contentItem: Text {
|
||||
text: control.text
|
||||
font: control.font
|
||||
opacity: enabled ? 1.0 : 0.3
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user