feat: colorful multi-accent quickshell design system
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A8TNMgnEa7Kia5Wcz2kyDx
This commit is contained in:
1 parent
b8255db11a
commit
e818b1c1ea
23 files changed
+1073
-577
No files matched your search
@@ -0,0 +1,53 @@
|
||||
import QtQuick
|
||||
import "."
|
||||
|
||||
// Selectable list row: a colored left accent bar plus a tinted background
|
||||
// when current, shared by CommandPalette and ClipboardManager so both
|
||||
// launchers read as the same design language.
|
||||
Rectangle {
|
||||
id: row
|
||||
|
||||
property bool selected: false
|
||||
property color accent: Theme.colors.primary
|
||||
readonly property alias hovered: rowMouse.containsMouse
|
||||
default property alias content: contentItem.data
|
||||
|
||||
signal clicked(var mouse)
|
||||
signal entered()
|
||||
|
||||
height: 40
|
||||
radius: Theme.geometry.radiusTiny
|
||||
color: selected ? Qt.alpha(accent, 0.16) : "transparent"
|
||||
|
||||
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
|
||||
|
||||
Rectangle {
|
||||
width: 3
|
||||
height: parent.height - 10
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
radius: 2
|
||||
color: row.accent
|
||||
opacity: row.selected ? 1 : 0
|
||||
Behavior on opacity { NumberAnimation { duration: Theme.animation.durationFast } }
|
||||
}
|
||||
|
||||
// Declared before contentItem so any interactive child placed in
|
||||
// `content` (e.g. a hover delete button) stacks on top and can
|
||||
// intercept clicks before they fall through to this row-wide handler.
|
||||
MouseArea {
|
||||
id: rowMouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onEntered: row.entered()
|
||||
onClicked: (mouse) => row.clicked(mouse)
|
||||
}
|
||||
|
||||
Item {
|
||||
id: contentItem
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: Theme.geometry.padding + 4
|
||||
anchors.rightMargin: Theme.geometry.padding
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user