╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ ui.zig ───────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
1867 }; 1868 for (0..art_grid.size.height) |y| { 1869 for (0..art_grid.size.width) |x| { 1870 const src = art_grid.cells.items[try art_grid.cells.at(.{ y, x })]; 1871 if (src.rune == null) continue; 1872 const idx = out.cells.at(.{ y, anchor_x + x }) catch continue; 1873 const dst = &out.cells.items[idx]; 1874 // composite the dimmed art behind every cell so it shows 1875 // through the whole UI: a blank cell becomes the art, while a 1876 // cell with a glyph keeps the glyph but takes the dimmed art as 1877 // its background (replacing whatever background it had, which 1878 // would otherwise obscure the art). 1879 if (cellIsBlank(dst.*)) { 1880 dst.* = src; 1881 dst.style.fg = sgrSafe(dimColor(dst.style.fg)); 1882 dst.style.bg = sgrSafe(dimColor(dst.style.bg)); 1883 } else { 1884 dst.style.bg = sgrSafe(dimColor(src.style.bg orelse src.style.fg)); 1885 } 1886 } 1887 } 1888 } 1889 return out; 1890 } 1891 }; 1892