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>
79 lines
2.1 KiB
QML
79 lines
2.1 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import Quickshell
|
|
import Quickshell.Services.Mpris
|
|
import Caelestia.Config
|
|
import qs.components
|
|
import qs.components.controls
|
|
import qs.services
|
|
|
|
Item {
|
|
ColumnLayout {
|
|
id: layout
|
|
|
|
anchors.fill: parent
|
|
anchors.leftMargin: Tokens.padding.medium
|
|
spacing: Tokens.spacing.medium
|
|
|
|
RowLayout {
|
|
Layout.bottomMargin: -Tokens.spacing.medium
|
|
spacing: Tokens.spacing.medium
|
|
z: 1
|
|
|
|
NsIcon {
|
|
Layout.topMargin: Math.round(fontInfo.pointSize * 0.12)
|
|
icon: "lyrics"
|
|
fontStyle: Tokens.font.icon.medium
|
|
}
|
|
|
|
StyledText {
|
|
Layout.fillWidth: true
|
|
text: qsTr("Lyrics")
|
|
font: Tokens.font.title.medium
|
|
}
|
|
|
|
LyricsInfo {}
|
|
}
|
|
|
|
LyricList {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
}
|
|
|
|
SplitButton {
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
type: SplitButton.Tonal
|
|
disabled: !Players.list.length
|
|
active: menuItems.find(m => m.modelData === Players.active) ?? menuItems[0] ?? null
|
|
menu.onItemSelected: item => Players.manualActive = (item as PlayerItem).modelData
|
|
|
|
menuItems: playerList.instances
|
|
fallbackIcon: "music_off"
|
|
fallbackText: qsTr("No players")
|
|
|
|
minLeftWidth: layout.width - expandBtn.implicitWidth - spacing
|
|
label.Layout.maximumWidth: minLeftWidth - iconLabel.implicitWidth - textRow.spacing - textRow.anchors.horizontalCenterOffset / 2 - horizontalPadding * 2
|
|
label.elide: Text.ElideRight
|
|
|
|
stateLayer.disabled: true
|
|
menuOnTop: true
|
|
|
|
Variants {
|
|
id: playerList
|
|
|
|
model: Players.list
|
|
|
|
PlayerItem {}
|
|
}
|
|
}
|
|
}
|
|
|
|
component PlayerItem: MenuItem {
|
|
required property MprisPlayer modelData
|
|
|
|
icon: modelData === Players.active ? "check" : ""
|
|
text: Players.getIdentity(modelData)
|
|
activeIcon: "animated_images"
|
|
}
|
|
}
|