app/resources/qml/Components/AlignedButton.qml

22 lines
606 B
QML
Raw Permalink Normal View History

import QtQuick 2.0
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
Button {
id: control
property alias horizontalAlignment: label.horizontalAlignment
property alias verticalAlignment: label.verticalAlignment
contentItem: Label {
id: label
text: control.text
font: control.font
color: !control.enabled ? control.Material.hintTextColor :
control.flat && control.highlighted ? control.Material.accentColor :
control.highlighted ? control.Material.primaryHighlightedTextColor : control.Material.foreground
}
}