Style Buttons, re-layout Login
This commit is contained in:
30
TeroStyle/Button.qml
Normal file
30
TeroStyle/Button.qml
Normal file
@@ -0,0 +1,30 @@
|
||||
import QtQuick
|
||||
import QtQuick.Templates as T
|
||||
|
||||
T.Button {
|
||||
id: control
|
||||
|
||||
implicitHeight: implicitContentHeight
|
||||
implicitWidth: contentItem.width
|
||||
|
||||
background: Rectangle {
|
||||
color: Colors.primary
|
||||
radius: Dimensions.radius
|
||||
}
|
||||
contentItem: Text {
|
||||
color: Colors.foreground
|
||||
font: control.font
|
||||
padding: Dimensions.s + 2
|
||||
text: control.text
|
||||
// Make sure the button is at least wide enough to be comfortably clickable
|
||||
width: Math.max(implicitWidth, 120)
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onPressed: (mouse) => mouse.accepted = false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user