More tokens

This commit is contained in:
Ryan Hughes
2026-05-19 16:55:56 -04:00
parent 97d4e908af
commit 201a003537
12 changed files with 136 additions and 57 deletions
+14 -11
View File
@@ -9,10 +9,13 @@ Item {
id: root
property string fontFamily: Quickshell.env("OMARCHY_MENU_FONT") || "monospace"
property color accent: Color.accent
property color background: Color.menu.background
property color foreground: Color.menu.text
property color border: foreground
// Bound to the central [polkit] section in shell.toml via Color.qml.
property color accent: Color.polkit.accent
property color background: Color.polkit.background
property color foreground: Color.polkit.text
property color border: Color.polkit.border
property color borderError: Color.polkit.borderError
property color scrim: Color.polkit.scrim
readonly property int cornerRadius: Style.cornerRadius
property int contentMargin: Style.spacing.panelPadding
property int fieldHeight: Math.max(Style.space(42), Style.spacing.controlHeight)
@@ -212,7 +215,7 @@ Item {
Rectangle {
anchors.fill: parent
color: root.withAlpha(root.background, 0.5)
color: root.scrim
}
MouseArea {
@@ -228,7 +231,7 @@ Item {
anchors.centerIn: parent
anchors.horizontalCenterOffset: root.shakeOffset
color: root.background
border.color: root.accent
border.color: root.errorFlash ? root.borderError : root.border
border.width: Math.max(1, Style.space(2))
MouseArea { anchors.fill: parent; onClicked: root.refocus() }
@@ -258,7 +261,7 @@ Item {
Text {
text: "\uf023"
color: root.errorFlash ? Color.urgent : root.accent
color: root.errorFlash ? Color.polkit.textError : root.accent
font.family: root.fontFamily
font.pixelSize: Style.font.iconLarge
width: Style.space(26)
@@ -277,13 +280,13 @@ Item {
verticalAlignment: TextInput.AlignVCenter
activeFocusOnPress: true
clip: true
selectionColor: root.withAlpha(root.accent, 0.45)
selectionColor: Color.alpha(root.accent, 0.45)
selectedTextColor: root.foreground
font.family: root.fontFamily
font.pixelSize: Style.font.iconLarge
echoMode: root.responseVisible ? TextInput.Normal : TextInput.Password
passwordCharacter: "\u2022"
color: root.errorFlash ? Color.urgent : root.foreground
color: root.errorFlash ? Color.polkit.textError : root.foreground
cursorVisible: activeFocus && !root.submitted && !root.errorFlash
readOnly: root.submitted || root.errorFlash
enabled: root.dialogVisible && !root.fingerprintWaiting
@@ -302,7 +305,7 @@ Item {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
text: root.errorFlash ? "Wrong" : (root.submitted ? "Checking..." : "Enter password")
color: root.errorFlash ? Color.urgent : root.foreground
color: root.errorFlash ? Color.polkit.textError : root.foreground
opacity: root.errorFlash ? 1 : 0.36
font.family: root.fontFamily
font.pixelSize: Style.font.iconLarge
@@ -315,7 +318,7 @@ Item {
height: Style.space(24)
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
color: root.errorFlash ? Color.urgent : root.foreground
color: root.errorFlash ? Color.polkit.textError : root.foreground
visible: passwordInput.visible && passwordInput.activeFocus && passwordInput.text.length === 0 && !root.submitted && !root.errorFlash
}