feat(nosignal): Nerd Font icon remap — nexus (Settings)
Convert caelestia's nexus Settings to Nerd Font icons (drop-in NsIcon). - NsIcon hardened into a MaterialIcon drop-in: accepts fontStyle (sizes from it, keeps the NF Mono family), plus no-op fill/grade/animate for API parity. - Glyphs map extended with caelestia core names: nexus static icons, nav/page icons (palette, wallpaper, dashboard, devices_other, extension, globe, info, monitor, shuffle, workspaces, ...), weather + app/device icons. - Converted all MaterialIcon in modules/nexus/ to NsIcon; fixed icon aliases (NavRow/SliderRow .text -> .icon); reverted IconButton font: (it has font, not fontStyle, and renders its own icon). Remaining core surfaces still Material Symbols (no breakage): launcher, osd, lock, sidebar, utilities — to convert next with any further Glyphs entries. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6a933aa260
commit
cf3c0d823d
18 changed files with 172 additions and 69 deletions
|
|
@ -12,7 +12,12 @@ Text {
|
|||
|
||||
property string icon: ""
|
||||
property int size: 16
|
||||
property real fill: 0 // API parity with MaterialIcon (unused for Nerd Font)
|
||||
// MaterialIcon API parity so NsIcon is a drop-in (these are no-ops here —
|
||||
// Nerd Font has no fill/grade variable axes; sizing comes from fontStyle).
|
||||
property real fill: 0
|
||||
property int grade: 0
|
||||
property bool animate: false
|
||||
property var fontStyle: null
|
||||
|
||||
renderType: Text.NativeRendering
|
||||
textFormat: Text.PlainText
|
||||
|
|
@ -20,7 +25,7 @@ Text {
|
|||
// "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
|
||||
font.pixelSize: root.fontStyle ? (root.fontStyle.pixelSize > 0 ? root.fontStyle.pixelSize : Math.round((root.fontStyle.pointSize || 12) * 1.33)) : root.size
|
||||
color: Theme.text
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
|
|||
|
|
@ -165,11 +165,11 @@ QtObject {
|
|||
anchors.centerIn: parent
|
||||
spacing: Tokens.padding.extraSmall
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "handyman"
|
||||
icon: "handyman"
|
||||
color: Colours.palette.m3outlineVariant
|
||||
font: Tokens.font.icon.extraLarge
|
||||
fontStyle: Tokens.font.icon.extraLarge
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@ ItemList {
|
|||
radius: Tokens.rounding.full
|
||||
color: device.active ? Colours.palette.m3primary : Colours.palette.m3secondaryContainer
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
id: devIcon
|
||||
|
||||
anchors.centerIn: parent
|
||||
text: root.iconName
|
||||
icon: root.iconName
|
||||
color: device.active ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondaryContainer
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
fill: device.active ? 1 : 0
|
||||
|
||||
Behavior on fill {
|
||||
|
|
@ -80,10 +80,10 @@ ItemList {
|
|||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
text: "check"
|
||||
NsIcon {
|
||||
icon: "check"
|
||||
color: Colours.palette.m3primary
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
opacity: device.active ? 1 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@ ConnectedRect {
|
|||
sourceComponent: ColumnLayout {
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: root.placeholderIcon
|
||||
icon: root.placeholderIcon
|
||||
color: Colours.palette.m3outline
|
||||
font: Tokens.font.icon.large
|
||||
fontStyle: Tokens.font.icon.large
|
||||
animate: true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import qs.modules.nexus.common
|
|||
ConnectedRect {
|
||||
id: root
|
||||
|
||||
property alias icon: icon.text
|
||||
property alias icon: icon.icon
|
||||
property alias label: label.text
|
||||
property alias status: status.text
|
||||
|
||||
|
|
@ -32,11 +32,11 @@ ConnectedRect {
|
|||
anchors.rightMargin: Tokens.padding.largeIncreased
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
id: icon
|
||||
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -63,10 +63,10 @@ ConnectedRect {
|
|||
}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
text: "chevron_right"
|
||||
NsIcon {
|
||||
icon: "chevron_right"
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import qs.modules.nexus.common
|
|||
ConnectedRect {
|
||||
id: root
|
||||
|
||||
property alias icon: icon.text
|
||||
property alias icon: icon.icon
|
||||
property alias label: label.text
|
||||
property alias valueLabel: valueLabel.text
|
||||
property real value
|
||||
|
|
@ -28,11 +28,11 @@ ConnectedRect {
|
|||
anchors.topMargin: Tokens.padding.large
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
id: icon
|
||||
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
|
|
|||
|
|
@ -86,11 +86,11 @@ VerticalFadeFlickable {
|
|||
radius: Tokens.rounding.full
|
||||
color: item.isCurrentPage ? Colours.palette.m3primary : Colours.palette.m3secondaryContainer
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenterOffset: 1
|
||||
|
||||
text: item.modelData.icon
|
||||
icon: item.modelData.icon
|
||||
color: item.isCurrentPage ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondaryContainer
|
||||
fontStyle: Tokens.font.icon.builders.medium.weight(Font.Medium).build()
|
||||
grade: 25
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ StyledRect {
|
|||
|
||||
spacing: Tokens.spacing.small
|
||||
|
||||
MaterialIcon {
|
||||
text: "search"
|
||||
NsIcon {
|
||||
icon: "search"
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,9 +97,9 @@ PageBase {
|
|||
anchors.rightMargin: Tokens.padding.largeIncreased
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
MaterialIcon {
|
||||
text: "tune"
|
||||
font: Tokens.font.icon.medium
|
||||
NsIcon {
|
||||
icon: "tune"
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
|
|
@ -123,10 +123,10 @@ PageBase {
|
|||
}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
text: "chevron_right"
|
||||
NsIcon {
|
||||
icon: "chevron_right"
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,13 +93,13 @@ PageBase {
|
|||
radius: Tokens.rounding.full
|
||||
color: device.connected ? Colours.palette.m3primary : Colours.palette.m3secondaryContainer
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
id: deviceIcon
|
||||
|
||||
anchors.centerIn: parent
|
||||
text: Icons.getBluetoothIcon(device.modelData?.icon ?? "")
|
||||
icon: Icons.getBluetoothIcon(device.modelData?.icon ?? "")
|
||||
color: device.connected ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondaryContainer
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
fill: device.connected ? 1 : 0
|
||||
opacity: device.textOpacity
|
||||
|
||||
|
|
@ -193,9 +193,9 @@ PageBase {
|
|||
Anim {}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
text: "add"
|
||||
font: Tokens.font.icon.medium
|
||||
NsIcon {
|
||||
icon: "add"
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
|||
|
|
@ -106,11 +106,11 @@ PageBase {
|
|||
width: parent.width - Tokens.padding.largeIncreased * 2
|
||||
spacing: Tokens.padding.extraSmall
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "map"
|
||||
icon: "map"
|
||||
color: Colours.palette.m3outlineVariant
|
||||
font: Tokens.font.icon.extraLarge
|
||||
fontStyle: Tokens.font.icon.extraLarge
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
|||
|
|
@ -131,10 +131,10 @@ PageBase {
|
|||
anchors.rightMargin: Tokens.padding.extraLarge
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
MaterialIcon {
|
||||
text: Icons.getNetworkIcon(network.modelData.strength)
|
||||
NsIcon {
|
||||
icon: Icons.getNetworkIcon(network.modelData.strength)
|
||||
color: network.modelData.active ? Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
opacity: network.textOpacity
|
||||
}
|
||||
|
||||
|
|
@ -165,10 +165,10 @@ PageBase {
|
|||
Component {
|
||||
id: iconComp
|
||||
|
||||
MaterialIcon {
|
||||
text: network.modelData.active ? "settings" : "lock"
|
||||
NsIcon {
|
||||
icon: network.modelData.active ? "settings" : "lock"
|
||||
color: network.modelData.active ? Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
opacity: network.textOpacity
|
||||
}
|
||||
}
|
||||
|
|
@ -218,9 +218,9 @@ PageBase {
|
|||
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
MaterialIcon {
|
||||
text: "add"
|
||||
font: Tokens.font.icon.medium
|
||||
NsIcon {
|
||||
icon: "add"
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ PageBase {
|
|||
sourceComponent: ColumnLayout {
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "hide_image"
|
||||
icon: "hide_image"
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font: Tokens.font.icon.extraLarge
|
||||
fontStyle: Tokens.font.icon.extraLarge
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
|||
|
|
@ -125,10 +125,10 @@ PageBase {
|
|||
anchors.rightMargin: Tokens.padding.largeIncreased
|
||||
spacing: Tokens.spacing.medium
|
||||
|
||||
MaterialIcon {
|
||||
text: Icons.getBluetoothIcon(newDevice.modelData?.icon ?? "")
|
||||
NsIcon {
|
||||
icon: Icons.getBluetoothIcon(newDevice.modelData?.icon ?? "")
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
opacity: newDevice.textOpacity
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,11 +72,11 @@ PageBase {
|
|||
anchors.centerIn: parent
|
||||
spacing: 0
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "delete"
|
||||
icon: "delete"
|
||||
color: forgetBtn.onColour
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
@ -126,11 +126,11 @@ PageBase {
|
|||
ColumnLayout {
|
||||
spacing: 0
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: root.connected ? "close" : "add"
|
||||
icon: root.connected ? "close" : "add"
|
||||
color: connectBtn.inactiveOnColour
|
||||
font: Tokens.font.icon.medium
|
||||
fontStyle: Tokens.font.icon.medium
|
||||
animate: true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ PageBase {
|
|||
anchors.centerIn: parent
|
||||
spacing: Tokens.padding.extraSmall
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "handyman"
|
||||
icon: "handyman"
|
||||
color: Colours.palette.m3outlineVariant
|
||||
font: Tokens.font.icon.extraLarge
|
||||
fontStyle: Tokens.font.icon.extraLarge
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
|||
|
|
@ -168,9 +168,9 @@ PageBase {
|
|||
anchors.centerIn: parent
|
||||
spacing: Tokens.spacing.extraSmall
|
||||
|
||||
MaterialIcon {
|
||||
NsIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "hide_image"
|
||||
icon: "hide_image"
|
||||
color: Colours.palette.m3outline
|
||||
fontStyle: Tokens.font.icon.extraLarge
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,105 @@ Singleton {
|
|||
"person": root.cp(0xf007),
|
||||
"profile": root.cp(0xf007),
|
||||
"installed": root.cp(0xf058),
|
||||
"deployed_code_alert": root.cp(0xf071)
|
||||
"deployed_code_alert": root.cp(0xf071),
|
||||
// caelestia core — static names
|
||||
"add": root.cp(0xf067),
|
||||
"arrow_forward": root.cp(0xf061),
|
||||
"bolt": root.cp(0xf0e7),
|
||||
"check": root.cp(0xf00c),
|
||||
"clock_arrow_up": root.cp(0xf017),
|
||||
"close": root.cp(0xf00d),
|
||||
"coffee": root.cp(0xf0f4),
|
||||
"delete": root.cp(0xf1f8),
|
||||
"drive_folder_upload": root.cp(0xf093),
|
||||
"expand_less": root.cp(0xf077),
|
||||
"favorite": root.cp(0xf004),
|
||||
"function": root.cp(0xf120),
|
||||
"handyman": root.cp(0xf0ad),
|
||||
"hard_drive": root.cp(0xf0a0),
|
||||
"hide_image": root.cp(0xf070),
|
||||
"history": root.cp(0xf1da),
|
||||
"home": root.cp(0xf015),
|
||||
"image": root.cp(0xf03e),
|
||||
"keyboard_arrow_down": root.cp(0xf078),
|
||||
"keyboard_arrow_up": root.cp(0xf077),
|
||||
"keyboard_capslock_badge": root.cp(0xf11c),
|
||||
"list": root.cp(0xf03a),
|
||||
"looks_one": root.cp(0xf2db),
|
||||
"lyrics": root.cp(0xf001),
|
||||
"map": root.cp(0xf279),
|
||||
"memory_alt": root.cp(0xf2db),
|
||||
"more_vert": root.cp(0xf142),
|
||||
"open_in_new": root.cp(0xf08e),
|
||||
"person_add": root.cp(0xf234),
|
||||
"person_edit": root.cp(0xf007),
|
||||
"queue_music": root.cp(0xf001),
|
||||
"scan_delete": root.cp(0xf1f8),
|
||||
"screen_record": root.cp(0xf03d),
|
||||
"search": root.cp(0xf002),
|
||||
"select_window": root.cp(0xf2d0),
|
||||
"sentiment_sad": root.cp(0xf119),
|
||||
"sentiment_stressed": root.cp(0xf119),
|
||||
"swap_vert": root.cp(0xf0ec),
|
||||
"upload": root.cp(0xf093),
|
||||
"warning": root.cp(0xf071),
|
||||
"web_asset_off": root.cp(0xf2d0),
|
||||
"wifi_find": root.cp(0xf1eb),
|
||||
// weather (Icons.getWeatherIcon)
|
||||
"clear_day": root.cp(0xf185),
|
||||
"clear_night": root.cp(0xf186),
|
||||
"partly_cloudy_day": root.cp(0xf6c4),
|
||||
"cloudy": root.cp(0xf0c2),
|
||||
"cloud": root.cp(0xf0c2),
|
||||
"rainy": root.cp(0xf73d),
|
||||
"cloudy_snowing": root.cp(0xf2dc),
|
||||
"foggy": root.cp(0xf75f),
|
||||
"air": root.cp(0xf72e),
|
||||
// apps / devices (Icons.get*)
|
||||
"code": root.cp(0xf121),
|
||||
"forum": root.cp(0xf086),
|
||||
"communication": root.cp(0xf075),
|
||||
"folder": root.cp(0xf07b),
|
||||
"files": root.cp(0xf07b),
|
||||
"build": root.cp(0xf0ad),
|
||||
"construction": root.cp(0xf0ad),
|
||||
"edit_note": root.cp(0xf044),
|
||||
"content_paste": root.cp(0xf0ea),
|
||||
"checklist": root.cp(0xf46d),
|
||||
"archive": root.cp(0xf187),
|
||||
"host": root.cp(0xf233),
|
||||
"monitor_heart": root.cp(0xf108),
|
||||
"release_alert": root.cp(0xf071),
|
||||
"music_cast": root.cp(0xf001),
|
||||
"music_video": root.cp(0xf001),
|
||||
"photo_library": root.cp(0xf03e),
|
||||
"print": root.cp(0xf02f),
|
||||
"phone": root.cp(0xf095),
|
||||
"recording": root.cp(0xf03d),
|
||||
"screenshot": root.cp(0xf030),
|
||||
"screenshot_monitor": root.cp(0xf030),
|
||||
"security": root.cp(0xf132),
|
||||
"settings": root.cp(0xf013),
|
||||
// nexus nav / page icons
|
||||
"apps": root.cp(0xf00a),
|
||||
"arrow_back": root.cp(0xf060),
|
||||
"dashboard": root.cp(0xf0e4),
|
||||
"devices_other": root.cp(0xf109),
|
||||
"dock_to_bottom": root.cp(0xf2d1),
|
||||
"dock_to_right": root.cp(0xf0db),
|
||||
"extension": root.cp(0xf12e),
|
||||
"globe": root.cp(0xf0ac),
|
||||
"info": root.cp(0xf05a),
|
||||
"monitor": root.cp(0xf108),
|
||||
"palette": root.cp(0xf53f),
|
||||
"refresh": root.cp(0xf021),
|
||||
"shuffle": root.cp(0xf074),
|
||||
"signal_cellular_alt": root.cp(0xf012),
|
||||
"system_update_alt": root.cp(0xf019),
|
||||
"update": root.cp(0xf021),
|
||||
"wallpaper": root.cp(0xf03e),
|
||||
"workspaces": root.cp(0xf009),
|
||||
"dock": root.cp(0xf2d1)
|
||||
}
|
||||
|
||||
function get(name: string): string {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue