Build the Panama Hyprland desktop
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
// One action in the focus capsule. Kept local to the module so the capsule's
|
||||
// low, tailored geometry does not leak into generic shell buttons.
|
||||
|
||||
import QtQuick
|
||||
import qs.config
|
||||
import qs.widgets
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property string icon: ""
|
||||
property string iconFallback: "dialog-information-symbolic"
|
||||
property string label: ""
|
||||
property bool destructive: false
|
||||
|
||||
signal activated
|
||||
|
||||
implicitHeight: 34
|
||||
radius: Theme.cardRadius - 2
|
||||
border.width: 0
|
||||
|
||||
readonly property color actionColor: root.destructive ? Theme.danger : Theme.fg
|
||||
|
||||
color: {
|
||||
if (mouse.pressed)
|
||||
return Theme.alpha(root.actionColor, 0.24);
|
||||
if (mouse.containsMouse)
|
||||
return Theme.alpha(root.actionColor, root.destructive ? 0.16 : Theme.hoverAlpha);
|
||||
return Theme.alpha(Theme.fg, 0.07);
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation { duration: Theme.durFast }
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors.centerIn: parent
|
||||
spacing: 7
|
||||
|
||||
ThemedIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
size: 15
|
||||
icon: root.icon
|
||||
iconFallback: root.iconFallback
|
||||
tint: root.actionColor
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: root.label
|
||||
color: root.actionColor
|
||||
font.family: Theme.fontFamily
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: root.activated()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// The session never disappears completely. Dismissing the larger glass signal
|
||||
// leaves this quiet bar-native indicator, which reopens it in one click.
|
||||
|
||||
import QtQuick
|
||||
import qs.config
|
||||
import qs.services
|
||||
import qs.widgets
|
||||
|
||||
Pill {
|
||||
id: root
|
||||
|
||||
visible: FocusSession.active
|
||||
horizontalPadding: 8
|
||||
onActivated: FocusSession.reveal()
|
||||
onSecondaryActivated: FocusSession.pauseOrResume()
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: FocusSession.paused ? "\u{F03E4}" : "\u{F051F}" // pause / timer-outline
|
||||
color: FocusSession.paused ? Theme.warn : Theme.accent
|
||||
font.family: Theme.fontMono
|
||||
font.pixelSize: 14
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: FocusSession.remainingText
|
||||
color: FocusSession.paused ? Theme.fgDim : Theme.fg
|
||||
font.family: Theme.fontFamily
|
||||
font.features: Theme.tabularFigures
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
module qs.modules.focus
|
||||
FocusAction 1.0 FocusAction.qml
|
||||
FocusIndicator 1.0 FocusIndicator.qml
|
||||
Reference in New Issue
Block a user