Rewrite the launcher in MoonBit (old code moves to legacy/) (#1)
This commit was merged in pull request #1.
This commit is contained in:
1 parent
7d2bf5996f
commit
2fa7bd745b
150 files changed
+8319
-462
No files matched your search
@@ -0,0 +1,27 @@
|
||||
import QtQuick
|
||||
|
||||
// A rounded text button: "ghost" (clear until pressed) or "primary" (filled).
|
||||
Rectangle {
|
||||
id: root
|
||||
property alias text: label.text
|
||||
property bool primary: false
|
||||
property real fontSize: 14
|
||||
signal clicked()
|
||||
implicitWidth: label.implicitWidth + 28
|
||||
implicitHeight: 36
|
||||
radius: height / 2
|
||||
color: primary ? (area.pressed ? "#d4d4d8" : "white")
|
||||
: (area.pressed ? Qt.rgba(1, 1, 1, .18) : "transparent")
|
||||
Text {
|
||||
id: label
|
||||
anchors.centerIn: parent
|
||||
color: root.primary ? "#111" : "white"
|
||||
font.pixelSize: root.fontSize
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
MouseArea {
|
||||
id: area
|
||||
anchors.fill: parent
|
||||
onClicked: root.clicked()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user