Build the Panama Control Center

This commit is contained in:
Gabriel Brown
2026-08-17 13:44:18 -04:00
parent 190e3200e0
commit 5940d6b4bd
12 changed files with 867 additions and 8 deletions
@@ -0,0 +1,50 @@
import QtQuick
import qs.config
Item {
id: root
property string label: ""
property string action: ""
property bool actionEnabled: true
signal actionTriggered
implicitHeight: 24
Text {
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
text: root.label.toUpperCase()
color: Theme.fgMuted
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.DemiBold
font.letterSpacing: 0.9
}
Text {
id: actionLabel
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
visible: root.action !== ""
text: root.action
color: root.actionEnabled
? (actionMouse.containsMouse ? Theme.accentAlt : Theme.accent)
: Theme.fgMuted
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Medium
Behavior on color { ColorAnimation { duration: Theme.durFast } }
MouseArea {
id: actionMouse
anchors.fill: parent
anchors.margins: -6
enabled: root.actionEnabled
hoverEnabled: true
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: root.actionTriggered()
}
}
}