colour -> color, behaviour -> behavior, centre -> center, favourite -> favorite, and about twenty other pairs, applied consistently across comments, docs, error/UI copy, and a handful of QML identifiers that used the British spelling as their actual name: SystemSettings' serialiseValue/serialiseTable/normaliseGradient, Displays' normaliseModes, Wallpaper's normalisePolicy, SettingsBackup's serialiseHomeState, DateTime's ntpSynchronised property, Clipboard's _normalise helper, and ShortcutCapture's cancelled signal (with its onCancelled handler in ShortcutsPage.qml). Every call site and the two tests that assert on the literal source text (settings-ownership and settings-backup-live contracts) were updated in lockstep. Left untouched: config/dot/espanso/match/packages/misspell-en/ is a vendored third-party autocorrect dictionary -- its entries are typo corrections, not our prose, and rewriting them would fight the package's own purpose (and any future re-sync from upstream). The already-American `favorites` property (Home page pinned accessories) was never actually misspelled -- only nearby comments and error strings said "favourites" -- so no data migration was needed there. Claude-Session: https://claude.ai/code/session_01E6TJUAh41HaP25MVHWkhRZ
51 lines
1.3 KiB
QML
51 lines
1.3 KiB
QML
// A freedesktop symbolic icon, recolored to a Theme token.
|
|
//
|
|
// Adwaita's symbolic SVGs carry a hardcoded near-black fill (#2e3436) and Qt
|
|
// does not do GTK's runtime recoloring, so drawn as-is they are invisible on
|
|
// a Tokyo Night background — verified on this machine. The fix is to paint a
|
|
// themed rectangle through the icon's alpha channel.
|
|
|
|
import QtQuick
|
|
import QtQuick.Effects
|
|
import Quickshell
|
|
import Quickshell.Widgets
|
|
import qs.config
|
|
|
|
Item {
|
|
id: root
|
|
|
|
property string icon: ""
|
|
property string iconFallback: "dialog-information-symbolic"
|
|
property color tint: Theme.fg
|
|
property int size: 18
|
|
|
|
implicitWidth: root.size
|
|
implicitHeight: root.size
|
|
|
|
// Both inputs are invisible but layered, so they render into textures
|
|
// without ever being composited onto the panel themselves.
|
|
IconImage {
|
|
id: glyph
|
|
anchors.fill: parent
|
|
asynchronous: true
|
|
source: Quickshell.iconPath(root.icon, root.iconFallback)
|
|
visible: false
|
|
layer.enabled: true
|
|
}
|
|
|
|
Rectangle {
|
|
id: fill
|
|
anchors.fill: parent
|
|
color: root.tint
|
|
visible: false
|
|
layer.enabled: true
|
|
}
|
|
|
|
MultiEffect {
|
|
anchors.fill: parent
|
|
source: fill
|
|
maskEnabled: true
|
|
maskSource: glyph
|
|
}
|
|
}
|