diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/Band.zig | 5 | ||||
| -rw-r--r-- | core/Pick.zig | 3 | ||||
| -rw-r--r-- | core/TagState.zig | 6 | ||||
| -rw-r--r-- | core/draw.zig | 13 |
4 files changed, 7 insertions, 20 deletions
diff --git a/core/Band.zig b/core/Band.zig index 2fcf4a3b..31205d87 100644 --- a/core/Band.zig +++ b/core/Band.zig @@ -595,12 +595,13 @@ test "a pane whose body would drop below four rows under its band borrows them f const r = p.view().rects[low]; try std.testing.expect(r.h > before); try std.testing.expect(r.h -| pane.tag_rows >= 4); - // The other panes dim; the one out of rest does not. + // No pane dims out of rest (UX D9): the others look as at rest. var frame = std.heap.ArenaAllocator.init(std.testing.allocator); defer frame.deinit(); const s = try p.render(frame.allocator()); const other = p.view().rects[top]; - try std.testing.expect(s.at(other.x + 3, other.y).style.dim); + try std.testing.expect(!s.at(other.x + 3, other.y).style.dim); + try std.testing.expect(!s.at(other.x + 3, other.y + 1).style.dim); try std.testing.expect(!s.at(r.x + 3, r.y).style.dim); p.update(.{ .key = .{ .cp = Key.escape } }); try std.testing.expectEqual(before, p.view().rects[low].h); diff --git a/core/Pick.zig b/core/Pick.zig index f4e26527..321b16b7 100644 --- a/core/Pick.zig +++ b/core/Pick.zig @@ -260,10 +260,9 @@ fn unroll(p: *Pardes, pk: *Pick, query: []const u8) void { s.rows = .{ .at = @intCast(@min(pk.at, std.math.maxInt(u16))) }; pk.unrolled = true; pk.shown = no_row; - // The whole window previews a theme: no pane dimmed (SPEC §3.6). + // The whole window previews a theme. if (pk.source == .themes) s.previewing = .full; if (p.paneBySerial(pk.landing)) |id| { - s.previewing.set(id); const pane = p.panes[id].?; pk.aside_row = pane.body.cur_row; pk.aside_col = pane.body.cur_col; diff --git a/core/TagState.zig b/core/TagState.zig index 938a45d1..8bead506 100644 --- a/core/TagState.zig +++ b/core/TagState.zig @@ -79,9 +79,9 @@ miss: u8 = 0, /// The leaf each group ran last, by its key (bindings.groups): the cursor /// starts there and the rolled level underlines it (SPEC §4.3). used: [bindings.ngroups]u8 = @splat(0), -/// The panes showing a preview of what the state would do (a picker's -/// landing pane, a pane an action draws ghosts in), by slot: not dimmed -/// while the others are (SPEC §3.6). Set by the state that previews. +/// `.full` while the whole window previews a theme (a themes picker's +/// row, `:theme `'s): its own again at rest. No pane dims out of rest +/// (UX D9), so no pane's own bit is read. previewing: std.StaticBitSet(pardes.MAX_PANES) = .empty, /// describe-key (SPEC §4.5), in the tag of pane `id`: the next keys are diff --git a/core/draw.zig b/core/draw.zig index 179b7cfc..17ac7514 100644 --- a/core/draw.zig +++ b/core/draw.zig @@ -361,19 +361,6 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface { for (s.regionList()) |region| { if (region.kind == .notice) try joinNotice(p, s, arena, region); } - // A tag out of rest: the other panes dim a little so the eye goes to - // it, but a pane showing a preview (walk UI SPEC §3.6). - if (TagState.hostOf(p)) |host| for (p.panes, 0..) |slot, id| { - if (slot == null or id == host or v.tag_state.previewing.isSet(id)) continue; - const r = v.rects[id]; - for (r.y..r.y + r.h) |y| for (r.x..r.x + r.w) |x| { - s.at(@intCast(x), @intCast(y)).style.dim = true; - }; - for ([_]*pardes.Layer{ &s.body_layers[id], &s.tag_layers[id] }) |layer| for (layer.cells[0 .. @as(usize, layer.cols) * layer.rows]) |*cell| { - cell.style.dim = true; - }; - }; - try paintHeaders(p, s); try paintNoticeRow(p, s); |
