Select Codex icon by surface background

This commit is contained in:
Ryan Hughes
2026-06-14 20:14:09 -04:00
parent e0eaf8eea8
commit 8d490d525e
2 changed files with 13 additions and 7 deletions
@@ -93,6 +93,12 @@ ShellRoot {
if (typeof item.setting === "function") {
root.assertEqual(item.setting("missing", "fallback"), "fallback", entry.id + " exposes setting fallback")
}
if (entry.id === "omarchy.model-usage" && typeof item.iconSourceForProvider === "function") {
var darkIcon = String(item.iconSourceForProvider({ providerId: "codex" }, Qt.color("#1a1b26")))
var lightIcon = String(item.iconSourceForProvider({ providerId: "codex" }, Qt.color("#ffffff")))
root.assertTrue(darkIcon.indexOf("codex.svg") >= 0 && darkIcon.indexOf("codex-light.svg") < 0, entry.id + " uses the dark-theme Codex icon on dark surfaces")
root.assertTrue(lightIcon.indexOf("codex-light.svg") >= 0, entry.id + " uses the light-theme Codex icon on light surfaces")
}
safeCall(item, "refresh", entry)
safeCall(item, "close", entry)