mirror of
https://github.com/stemoretti/BaseUI.git
synced 2025-07-18 04:54:22 -04:00
Heavy changes
This commit is contained in:
34
qml/ButtonContained.qml
Normal file
34
qml/ButtonContained.qml
Normal file
@ -0,0 +1,34 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
|
||||
Button {
|
||||
id: root
|
||||
|
||||
property alias textColor: buttonText.color
|
||||
property alias buttonColor: buttonBackground.color
|
||||
|
||||
focusPolicy: Qt.NoFocus
|
||||
leftPadding: 6
|
||||
rightPadding: 6
|
||||
|
||||
contentItem: Text {
|
||||
id: buttonText
|
||||
text: root.text
|
||||
opacity: enabled ? 1.0 : 0.3
|
||||
color: Style.textOnPrimary
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
font.capitalization: Font.AllUppercase
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
id: buttonBackground
|
||||
implicitHeight: 48
|
||||
color: Style.primaryColor
|
||||
radius: 2
|
||||
opacity: root.pressed ? 0.75 : 1.0
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user