feat: add Shade/Unshade/ToggleShade actions

This builds on the work of @Consolatis in #1018.

Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
This commit is contained in:
Consolatis 2023-08-08 03:39:35 +02:00 committed by Johan Malm
parent 722a802de0
commit e05bedb140
19 changed files with 218 additions and 47 deletions

View file

@ -168,8 +168,9 @@ build_grid(struct overlap_bitmap *bmp, struct view *view)
bmp->rows[nr_rows++] = y;
}
x = v->pending.x + v->pending.width + margin.right;
y = v->pending.y + v->pending.height + margin.bottom;
x = v->pending.x + margin.right + v->pending.width;
y = v->pending.y + margin.bottom
+ view_effective_height(v, /* use_pending */ true);
/* Add a column if the right view edge is in the usable region */
if (x > usable.x && x < usable_right) {
@ -259,8 +260,9 @@ build_overlap(struct overlap_bitmap *bmp, struct view *view)
struct border margin = ssd_get_margin(v->ssd);
int lx = v->pending.x - margin.left;
int ly = v->pending.y - margin.top;
int hx = v->pending.x + v->pending.width + margin.right;
int hy = v->pending.y + v->pending.height + margin.bottom;
int hx = v->pending.x + margin.right + v->pending.width;
int hy = v->pending.y + margin.bottom
+ view_effective_height(v, /* use_pending */ true);
/*
* Find the first and last row and column intervals spanned by