From the 2026-06-15 on-box hardware test (all 6 prior fixes confirmed; these are the new findings, baked into the fork source rather than shipped as pacman-hook patches, per the Phase-2 "we own the shell" approach): - F-W1 (Weather.qml): fetch at startup. Stock only called reload() on a config CHANGE, so a saved location blanked after reboot and an empty/auto location never populated on a fresh boot. Add Component.onCompleted: reload() and switch the hourly Timer to reload() (re-detects auto/IP too). - F-W3 (Weather.qml): 7-day forecast showed "undefined°" in °F mode — only maxTempC/minTempC were stored. Store rounded maxTempF/minTempF (and round °C). - F-W2 (Weather.qml): empty/auto-IP location never populated — the in-shell ipinfo.io fetch didn't set loc (provider-specific; the city path works via the same Requests.get). Repair attempt: defensive JSON parse + error callback + fallback to geojs.io. Compiled Requests module not inspectable, so this is best-effort; a saved city still works regardless. - F-D1a (modules/dashboard/*.qml): square the 25 card radii bound to the compiled Tokens.rounding.* Material defaults (which ignore shell.json rounding.scale=0) so the dashboard matches the square redesign. - F-D1b (Glyphs.qml): remap the weather glyphs to the Material-weather family (every codepoint verified present in JetBrainsMono Nerd Font Mono); the old Font-Awesome codepoints were absent (rendered "?") and thunderstorm / snowing_heavy were unmapped. - F-T1 (NsBar.qml): gate the system-tray pill on SystemTray.items count so it only shows when an app registers a tray icon (was opening an empty panel). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
208 lines
5.9 KiB
QML
208 lines
5.9 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Caelestia.Blobs
|
|
import Caelestia.Config
|
|
import Caelestia.Services
|
|
import qs.components
|
|
import qs.services
|
|
|
|
Item {
|
|
id: root
|
|
|
|
property bool open
|
|
readonly property real padding: Tokens.padding.large
|
|
|
|
implicitWidth: btn.implicitWidth * 0.9
|
|
implicitHeight: btn.implicitHeight * 0.9
|
|
|
|
BlobGroup {
|
|
id: blobGroup
|
|
|
|
color: Colours.palette.m3surfaceContainerHighest
|
|
smoothing: root.Tokens.rounding.medium
|
|
cornerFill: false
|
|
|
|
Behavior on color {
|
|
CAnim {}
|
|
}
|
|
}
|
|
|
|
BlobRect {
|
|
id: btnRect
|
|
|
|
anchors.fill: parent
|
|
anchors.margins: !btn.pressed && btn.containsMouse ? -Tokens.padding.extraSmall : 0
|
|
group: blobGroup
|
|
radius: 0 // nosignal: square dashboard cards to match the redesign (F-D1)
|
|
|
|
Behavior on anchors.margins {
|
|
Anim {}
|
|
}
|
|
}
|
|
|
|
BlobRect {
|
|
id: rect
|
|
|
|
anchors.right: parent.right
|
|
anchors.top: parent.top
|
|
|
|
implicitWidth: parent.width
|
|
implicitHeight: parent.height
|
|
|
|
group: blobGroup
|
|
radius: 0 // nosignal: square dashboard cards to match the redesign (F-D1)
|
|
deformScale: 0.00001
|
|
|
|
states: State {
|
|
name: "open"
|
|
when: root.open
|
|
|
|
PropertyChanges {
|
|
rect.anchors.rightMargin: root.width - root.Tokens.spacing.small
|
|
rect.anchors.topMargin: -root.Tokens.padding.medium
|
|
rect.implicitWidth: Math.max(layout.implicitWidth, placeholder.implicitWidth) + root.padding * 2
|
|
rect.implicitHeight: Math.max(layout.implicitHeight, placeholder.implicitHeight) + root.padding * 2
|
|
content.opacity: 1
|
|
}
|
|
}
|
|
|
|
transitions: Transition {
|
|
Anim {
|
|
properties: "rightMargin,implicitWidth"
|
|
}
|
|
Anim {
|
|
properties: "topMargin,implicitHeight"
|
|
easing: root.Tokens.anim.expressiveFastSpatial
|
|
}
|
|
Anim {
|
|
property: "opacity"
|
|
type: Anim.DefaultEffects
|
|
}
|
|
}
|
|
|
|
Behavior on implicitWidth {
|
|
Anim {}
|
|
}
|
|
|
|
Behavior on implicitHeight {
|
|
Anim {}
|
|
}
|
|
|
|
Item {
|
|
id: content
|
|
|
|
anchors.fill: parent
|
|
clip: true
|
|
opacity: 0
|
|
state: Lyrics.loading || !Lyrics.hasLyrics ? "" : "hasLyrics"
|
|
|
|
states: State {
|
|
name: "hasLyrics"
|
|
|
|
PropertyChanges {
|
|
layout.opacity: 1
|
|
placeholder.opacity: 0
|
|
}
|
|
}
|
|
|
|
transitions: [
|
|
Transition {
|
|
from: "hasLyrics"
|
|
|
|
SequentialAnimation {
|
|
Anim {
|
|
target: layout
|
|
property: "opacity"
|
|
type: Anim.FastEffects
|
|
}
|
|
Anim {
|
|
target: placeholder
|
|
property: "opacity"
|
|
type: Anim.DefaultEffects
|
|
}
|
|
}
|
|
},
|
|
Transition {
|
|
to: "hasLyrics"
|
|
|
|
SequentialAnimation {
|
|
Anim {
|
|
target: placeholder
|
|
property: "opacity"
|
|
type: Anim.FastEffects
|
|
}
|
|
Anim {
|
|
target: layout
|
|
property: "opacity"
|
|
type: Anim.DefaultEffects
|
|
}
|
|
}
|
|
}
|
|
]
|
|
|
|
ColumnLayout {
|
|
id: layout
|
|
|
|
anchors.centerIn: parent
|
|
spacing: Tokens.spacing.extraSmall
|
|
opacity: 0
|
|
|
|
StyledText {
|
|
text: qsTr("Backend: %1").arg(LyricsBackend.toString(Lyrics.backend))
|
|
color: Colours.palette.m3onSurfaceVariant
|
|
animate: true
|
|
}
|
|
|
|
StyledText {
|
|
Layout.maximumWidth: Tokens.sizes.dashboard.mediaTabWidth / 2
|
|
text: qsTr("Selected candidate: %1 | %2 | %3").arg(Lyrics.selectedCandidate.title).arg(Lyrics.selectedCandidate.artist).arg(Lyrics.selectedCandidate.album)
|
|
color: Colours.palette.m3onSurfaceVariant
|
|
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
|
animate: true
|
|
}
|
|
|
|
StyledText {
|
|
text: qsTr("Offset: %1 ms").arg(Lyrics.offset)
|
|
color: Colours.palette.m3onSurfaceVariant
|
|
animate: true
|
|
}
|
|
}
|
|
|
|
Item {
|
|
id: placeholder
|
|
|
|
anchors.centerIn: parent
|
|
implicitWidth: placeholderText.implicitWidth
|
|
implicitHeight: placeholderText.implicitHeight
|
|
|
|
StyledText {
|
|
id: placeholderText
|
|
|
|
text: Lyrics.loading ? qsTr("Loading...") : qsTr("No lyrics found")
|
|
color: Colours.palette.m3onSurfaceVariant
|
|
font: Tokens.font.body.medium
|
|
animate: true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
MouseArea {
|
|
id: btn
|
|
|
|
anchors.centerIn: parent
|
|
implicitWidth: implicitHeight
|
|
implicitHeight: icon.implicitHeight + Tokens.padding.extraSmall * 2
|
|
cursorShape: Qt.PointingHandCursor
|
|
hoverEnabled: true
|
|
onClicked: root.open = !root.open
|
|
|
|
NsIcon {
|
|
id: icon
|
|
|
|
anchors.centerIn: parent
|
|
icon: "more_vert"
|
|
fontStyle: Tokens.font.icon.medium
|
|
}
|
|
}
|
|
}
|