Route the redesign's icons through JetBrains Mono Nerd Font instead of Material Symbols, for visual consistency with the JetBrains Mono text. - services/Glyphs.qml: Material-Symbol-name -> Nerd Font (Font Awesome range) codepoint map (via String.fromCharCode), covering bar/panel icons + the dynamic Icons.getX() returns; get() falls back to a "?" glyph. - components/NsIcon.qml: reactive icon component (input `icon` = name -> mapped glyph), so dynamic icons (volume/battery/play-pause) stay live. Uses the "Mono" NF variant so glyphs center in a fixed cell. - Converted all MaterialIcon usages in NsBar + the 9 panels to NsIcon. caelestia core (nexus/launcher/osd/lock) still uses Material Symbols — no breakage (mixed), to be converted next with an expanded Glyphs map. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
27 lines
897 B
QML
27 lines
897 B
QML
pragma ComponentBehavior: Bound
|
|
|
|
// NoSignal icon: renders a Nerd Font (JetBrainsMono NF) glyph from a Material
|
|
// Symbol name via the Glyphs map. Drop-in for MaterialIcon but the input is
|
|
// `icon` (the name) instead of `text`, so dynamic bindings stay reactive.
|
|
|
|
import QtQuick
|
|
import qs.services
|
|
|
|
Text {
|
|
id: root
|
|
|
|
property string icon: ""
|
|
property int size: 16
|
|
property real fill: 0 // API parity with MaterialIcon (unused for Nerd Font)
|
|
|
|
renderType: Text.NativeRendering
|
|
textFormat: Text.PlainText
|
|
text: Glyphs.get(root.icon)
|
|
// "Mono" variant centers each icon glyph in a fixed cell (the plain NF
|
|
// variant uses a wide advance, which left/right-shifts centered icons).
|
|
font.family: "JetBrainsMono Nerd Font Mono"
|
|
font.pixelSize: root.size
|
|
color: Theme.text
|
|
horizontalAlignment: Text.AlignHCenter
|
|
verticalAlignment: Text.AlignVCenter
|
|
}
|