added adaptive quickshell

This commit is contained in:
wt committed 2026-11-17 18:15:16 +07:00
1 parent 6eb56d2065
commit 5b33a73fd8
189 files changed
+8678 -15

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls
import "../services"
Button {
id: control
implicitHeight: 48
implicitWidth: Math.max(48, label.implicitWidth + leftPadding + rightPadding)
leftPadding: 14
rightPadding: 14
topInset: 0
bottomInset: 0
hoverEnabled: true
contentItem: Text {
id: label
text: control.text
color: control.enabled ? (control.checked ? Theme.onPrimaryContainer : Theme.foreground) : Theme.outline
font.pixelSize: 14
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
textFormat: Text.PlainText
}
background: Rectangle {
radius: control.checked ? 16 : 24
color: control.checked ? Theme.primaryContainer : control.down ? Theme.secondaryContainer : control.hovered ? Theme.surfaceHigh : Theme.surfaceLow
border.width: control.activeFocus || control.checked ? 2 : 0
border.color: Theme.primary
}
}