Build the Prism calendar Daybook

This commit is contained in:
Gabriel Brown
2026-08-17 11:38:24 -04:00
parent 6a1bec849d
commit 03914e23af
9 changed files with 724 additions and 165 deletions
@@ -9,13 +9,15 @@ import qs.widgets
Rectangle {
id: root
readonly property bool compact: width < 360
readonly property MprisPlayer player: {
const players = Mpris.players ? Mpris.players.values : [];
return players.find(p => p.isPlaying) ?? players.find(p => p.trackTitle) ?? null;
}
visible: root.player !== null
implicitHeight: visible ? 76 : 0
implicitHeight: visible ? (compact ? 64 : 76) : 0
radius: Theme.cardRadius
border.width: 0
color: Theme.alpha(Theme.fg, 0.06)
@@ -24,11 +26,11 @@ Rectangle {
Rectangle {
id: artwork
anchors.left: parent.left
anchors.leftMargin: 10
anchors.leftMargin: root.compact ? 8 : 10
anchors.verticalCenter: parent.verticalCenter
width: 56
height: 56
radius: 10
width: root.compact ? 46 : 56
height: width
radius: root.compact ? 9 : 10
border.width: 0
color: Theme.alpha(Theme.accentAlt, 0.16)
clip: true
@@ -54,9 +56,9 @@ Rectangle {
Column {
anchors.left: artwork.right
anchors.leftMargin: 12
anchors.leftMargin: root.compact ? 9 : 12
anchors.right: controls.left
anchors.rightMargin: 10
anchors.rightMargin: root.compact ? 6 : 10
anchors.verticalCenter: parent.verticalCenter
spacing: 3
@@ -83,7 +85,7 @@ Rectangle {
Row {
id: controls
anchors.right: parent.right
anchors.rightMargin: 10
anchors.rightMargin: root.compact ? 7 : 10
anchors.verticalCenter: parent.verticalCenter
spacing: 2
@@ -114,7 +116,7 @@ Rectangle {
property bool emphasized: false
signal clicked
width: emphasized ? 34 : 30
width: root.compact ? (emphasized ? 30 : 27) : (emphasized ? 34 : 30)
height: width
radius: width / 2
border.width: 0