quickshell: restyle calendar with background blobs and larger fonts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3b8bb68647
commit
269c9bbe15
1 changed files with 84 additions and 61 deletions
|
|
@ -1872,86 +1872,109 @@ in
|
||||||
NumberAnimation { duration: 150; easing.type: Easing.OutCubic }
|
NumberAnimation { duration: 150; easing.type: Easing.OutCubic }
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Rectangle {
|
||||||
|
width: 7 * 32 + 16
|
||||||
|
height: calTitle.height + 16
|
||||||
|
radius: 8
|
||||||
|
color: Theme.base01
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: clockText.now.toLocaleDateString(Qt.locale(), "dddd, d MMMM yyyy")
|
|
||||||
color: Theme.base05
|
|
||||||
font.family: "FiraMono Nerd Font"
|
|
||||||
font.pixelSize: 14
|
|
||||||
font.weight: Font.Medium
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
Text {
|
||||||
spacing: 0
|
id: calTitle
|
||||||
Repeater {
|
anchors.centerIn: parent
|
||||||
model: ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"]
|
text: clockText.now.toLocaleDateString(Qt.locale(), "dddd, d MMMM yyyy")
|
||||||
Text {
|
color: Theme.base05
|
||||||
required property var modelData
|
font.family: "FiraMono Nerd Font"
|
||||||
width: 28
|
font.pixelSize: 16
|
||||||
horizontalAlignment: Text.AlignHCenter
|
font.weight: Font.Medium
|
||||||
text: modelData
|
|
||||||
color: Theme.base03
|
|
||||||
font.family: "FiraMono Nerd Font"
|
|
||||||
font.pixelSize: 11
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Grid {
|
Rectangle {
|
||||||
columns: 7
|
width: 7 * 32 + 16
|
||||||
spacing: 0
|
height: calInner.height + 16
|
||||||
|
radius: 8
|
||||||
|
color: Theme.base01
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Repeater {
|
Column {
|
||||||
id: calRepeater
|
id: calInner
|
||||||
model: 42
|
anchors.centerIn: parent
|
||||||
|
spacing: 4
|
||||||
|
|
||||||
Rectangle {
|
Row {
|
||||||
required property int index
|
spacing: 0
|
||||||
width: 28
|
Repeater {
|
||||||
height: 24
|
model: ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"]
|
||||||
radius: 4
|
Text {
|
||||||
color: {
|
required property var modelData
|
||||||
let d = clockText.now;
|
width: 32
|
||||||
let first = new Date(d.getFullYear(), d.getMonth(), 1);
|
horizontalAlignment: Text.AlignHCenter
|
||||||
let startDay = (first.getDay() + 6) % 7;
|
text: modelData
|
||||||
let dayNum = index - startDay + 1;
|
color: Theme.base03
|
||||||
let daysInMonth = new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();
|
font.family: "FiraMono Nerd Font"
|
||||||
return (dayNum === d.getDate() && dayNum >= 1 && dayNum <= daysInMonth)
|
font.pixelSize: 13
|
||||||
? Theme.base02 : "transparent";
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Text {
|
Grid {
|
||||||
anchors.centerIn: parent
|
columns: 7
|
||||||
text: {
|
spacing: 0
|
||||||
let d = clockText.now;
|
|
||||||
let first = new Date(d.getFullYear(), d.getMonth(), 1);
|
Repeater {
|
||||||
let startDay = (first.getDay() + 6) % 7;
|
id: calRepeater
|
||||||
let dayNum = parent.index - startDay + 1;
|
model: 42
|
||||||
let daysInMonth = new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();
|
|
||||||
return (dayNum >= 1 && dayNum <= daysInMonth) ? dayNum.toString() : "";
|
Rectangle {
|
||||||
|
required property int index
|
||||||
|
width: 32
|
||||||
|
height: 26
|
||||||
|
radius: 4
|
||||||
|
color: {
|
||||||
|
let d = clockText.now;
|
||||||
|
let first = new Date(d.getFullYear(), d.getMonth(), 1);
|
||||||
|
let startDay = (first.getDay() + 6) % 7;
|
||||||
|
let dayNum = index - startDay + 1;
|
||||||
|
let daysInMonth = new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();
|
||||||
|
return (dayNum === d.getDate() && dayNum >= 1 && dayNum <= daysInMonth)
|
||||||
|
? Theme.base02 : "transparent";
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: {
|
||||||
|
let d = clockText.now;
|
||||||
|
let first = new Date(d.getFullYear(), d.getMonth(), 1);
|
||||||
|
let startDay = (first.getDay() + 6) % 7;
|
||||||
|
let dayNum = parent.index - startDay + 1;
|
||||||
|
let daysInMonth = new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();
|
||||||
|
return (dayNum >= 1 && dayNum <= daysInMonth) ? dayNum.toString() : "";
|
||||||
|
}
|
||||||
|
color: {
|
||||||
|
let d = clockText.now;
|
||||||
|
let first = new Date(d.getFullYear(), d.getMonth(), 1);
|
||||||
|
let startDay = (first.getDay() + 6) % 7;
|
||||||
|
let dayNum = parent.index - startDay + 1;
|
||||||
|
return (dayNum === d.getDate()) ? Theme.base05 : Theme.base04;
|
||||||
|
}
|
||||||
|
font.family: "FiraMono Nerd Font"
|
||||||
|
font.pixelSize: 13
|
||||||
|
}
|
||||||
}
|
}
|
||||||
color: {
|
|
||||||
let d = clockText.now;
|
|
||||||
let first = new Date(d.getFullYear(), d.getMonth(), 1);
|
|
||||||
let startDay = (first.getDay() + 6) % 7;
|
|
||||||
let dayNum = parent.index - startDay + 1;
|
|
||||||
return (dayNum === d.getDate()) ? Theme.base05 : Theme.base04;
|
|
||||||
}
|
|
||||||
font.family: "FiraMono Nerd Font"
|
|
||||||
font.pixelSize: 11
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: 7 * 28
|
width: 7 * 32 + 16
|
||||||
height: 1
|
height: 1
|
||||||
color: Theme.base02
|
color: Theme.base02
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
width: 7 * 28
|
width: 7 * 32 + 16
|
||||||
Text {
|
Text {
|
||||||
text: "Notifications"
|
text: "Notifications"
|
||||||
color: Theme.base05
|
color: Theme.base05
|
||||||
|
|
@ -1981,7 +2004,7 @@ in
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
spacing: 4
|
spacing: 4
|
||||||
width: 7 * 28
|
width: 7 * 32 + 16
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
visible: bar.notifServer.trackedNotifications.values.length === 0
|
visible: bar.notifServer.trackedNotifications.values.length === 0
|
||||||
|
|
@ -1998,7 +2021,7 @@ in
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: notifItem
|
id: notifItem
|
||||||
required property var modelData
|
required property var modelData
|
||||||
width: 7 * 28
|
width: 7 * 32 + 16
|
||||||
height: notifCol.height + 12
|
height: notifCol.height + 12
|
||||||
radius: 6
|
radius: 6
|
||||||
color: Theme.base01
|
color: Theme.base01
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue