Convert remaining reachable surfaces to NsIcon (launcher, utilities, windowinfo,
sidebar, dashboard, notification toast, shared controls IconTextButton/Menu/
SplitButton/ToggleButton/CollapsibleSection/CustomSpinBox, CoverArt). Handles
the `sourceComponent: MaterialIcon {` form and icon-via-alias controls.
- IconTextButton: alias -> plain `icon` property + bound NsIcon (cross-file alias
to a custom property was rejected).
- Reverted IconButton `font:` (the controls-wide font->fontStyle sweep wrongly
hit ButtonBase, which uses font not fontStyle).
- Glyphs map: +31 names (dashboard/utilities/launcher leftovers) — no "?" glyphs.
Old collapsed bar + old lock sub-components left as-is (unused, never render).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
57 lines
1.5 KiB
QML
57 lines
1.5 KiB
QML
import QtQuick
|
|
import Caelestia.Config
|
|
import qs.components
|
|
import qs.services
|
|
|
|
Item {
|
|
id: root
|
|
|
|
anchors.centerIn: parent
|
|
|
|
implicitWidth: icon.implicitWidth + info.implicitWidth + info.anchors.leftMargin
|
|
implicitHeight: Math.max(icon.implicitHeight, info.implicitHeight) + Tokens.padding.largeIncreased * 2
|
|
|
|
Component.onCompleted: Weather.reload()
|
|
|
|
NsIcon {
|
|
id: icon
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.left: parent.left
|
|
|
|
animate: true
|
|
icon: Weather.icon
|
|
color: Colours.palette.m3secondary
|
|
fontStyle: Tokens.font.icon.builders.extraLarge.scale(1.6).build()
|
|
}
|
|
|
|
Column {
|
|
id: info
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.left: icon.right
|
|
anchors.leftMargin: Tokens.spacing.largeIncreased
|
|
|
|
spacing: Tokens.spacing.extraSmall
|
|
|
|
StyledText {
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
animate: true
|
|
text: Weather.temp
|
|
color: Colours.palette.m3primary
|
|
font: Tokens.font.headline.builders.medium.width(110).weight(Font.DemiBold).build()
|
|
}
|
|
|
|
StyledText {
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
animate: true
|
|
text: Weather.description
|
|
font: Tokens.font.body.small
|
|
|
|
elide: Text.ElideRight
|
|
width: Math.min(implicitWidth, root.parent.width - icon.implicitWidth - info.anchors.leftMargin - Tokens.padding.extraLargeIncreased)
|
|
}
|
|
}
|
|
}
|