Each pill now starts with the app's icon: the same coloured tile with a letter that the dock draws for that app id, so an app looks the same in both. The app id comes from windows.all (the task-bar rows carry only titles); windows without one fall back to a title-keyed tile. Pills narrower than 72px show just the centred icon. The tile drawing moves into lib/dock (app_icon, app_glyph) and the dock uses it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hm1XqzhrA4N8FyhuRa
This commit is contained in:
5 files changed
+105
-12
No files matched your search
@@ -110,8 +110,12 @@ test "task list module draws the host's windows and asks to focus one" {
|
||||
t.int(1)
|
||||
t.end_row()
|
||||
publish(Windows, t)
|
||||
// Icons come from each window's app id (served by `windows.all`); without one, from the title.
|
||||
set_windows([{ id: 9UL, title: "foot", app_id: "org.chandra.term", focused: false }])
|
||||
let ops = p.render(400, 36, test_tokens())
|
||||
assert_eq(texts_of(ops), ["Kate — notes", "foot"])
|
||||
// each pill: the app icon's glyph, then the title
|
||||
assert_eq(texts_of(ops), ["K", "Kate — notes", "T", "foot"])
|
||||
set_windows([])
|
||||
assert_true(p.on_event(false, PointerDown(146 + 10, 10)) || true)
|
||||
assert_eq(drain(), [FocusWindow(9)])
|
||||
p.unload()
|
||||
|
||||
Reference in new issue
Block a user