mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-18 16:55:40 +02:00
Basic vertical rendering
- Add height attribute to most particles for height generation on the fly
This commit is contained in:
parent
37b5b02fc4
commit
60c18246d8
23 changed files with 286 additions and 158 deletions
|
@ -41,13 +41,19 @@ begin_expose(struct exposable *exposable)
|
|||
{
|
||||
struct eprivate *e = exposable->private;
|
||||
|
||||
int width = e->exposable->begin_expose(e->exposable);
|
||||
e->exposable->begin_expose(e->exposable);
|
||||
int width = e->exposable->width;
|
||||
int height = e->exposable->height;
|
||||
assert(width >= 0);
|
||||
|
||||
if (width > 0)
|
||||
width += exposable->particle->left_margin + exposable->particle->right_margin;
|
||||
if (height > 0)
|
||||
height += exposable->particle->top_margin + exposable->particle->bottom_margin;
|
||||
|
||||
exposable->width = width;
|
||||
exposable->height = height;
|
||||
|
||||
return exposable->width;
|
||||
}
|
||||
|
||||
|
@ -56,7 +62,7 @@ expose(const struct exposable *exposable, pixman_image_t *pix, int x, int y, int
|
|||
{
|
||||
struct eprivate *e = exposable->private;
|
||||
|
||||
exposable_render_deco(exposable, pix, x, y, height);
|
||||
exposable_render_deco(exposable, pix, x, y);
|
||||
e->exposable->expose(
|
||||
e->exposable, pix, x + exposable->particle->left_margin, y, height);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue