nosignal-shell/modules/nexus/navpane/SearchBar.qml
28allday cf3c0d823d 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>
2026-06-14 11:16:01 +01:00

81 lines
2 KiB
QML

import QtQuick
import QtQuick.Layouts
import Caelestia.Config
import qs.components
import qs.components.controls
import qs.services
import qs.modules.nexus
StyledRect {
id: root
required property NexusState nState
implicitHeight: searchLayout.implicitHeight + Tokens.padding.medium * 2
radius: Tokens.rounding.full
color: Colours.tPalette.m3surfaceContainerLowest
border.color: Colours.palette.m3outlineVariant
Behavior on border.color {
CAnim {}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.IBeamCursor
onClicked: searchField.focus = true
}
RowLayout {
id: searchLayout
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.margins: Tokens.padding.large
spacing: Tokens.spacing.small
NsIcon {
icon: "search"
color: Colours.palette.m3onSurfaceVariant
fontStyle: Tokens.font.icon.medium
}
StyledTextField {
id: searchField
Layout.fillWidth: true
Layout.fillHeight: true
placeholderText: qsTr("Search settings")
placeholderTextColor: Colours.palette.m3onSurfaceVariant
color: Colours.palette.m3onSurfaceVariant
font: Tokens.font.body.large
Binding {
target: root.nState
property: "searchOpen"
value: searchField.text.length > 0
}
}
IconButton {
icon: "close"
font: Tokens.font.icon.medium
type: IconButton.Text
padding: Tokens.padding.extraSmall
isRound: true
onClicked: searchField.clear()
opacity: searchField.text.length > 0 ? 1 : 0
Behavior on opacity {
Anim {
type: Anim.DefaultEffects
}
}
}
}
}