mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-17 16:35:40 +02:00
exposable: add a 'width' member, set (at latest) in begin_expose()
This commit is contained in:
parent
a745436ee2
commit
ce68bdb59d
4 changed files with 26 additions and 22 deletions
|
@ -12,21 +12,21 @@ struct private {
|
|||
};
|
||||
|
||||
static int
|
||||
dynlist_begin_expose(const struct exposable *exposable, cairo_t *cr)
|
||||
dynlist_begin_expose(struct exposable *exposable, cairo_t *cr)
|
||||
{
|
||||
const struct private *e = exposable->private;
|
||||
|
||||
int width = 0;
|
||||
exposable->width = 0;
|
||||
|
||||
for (size_t i = 0; i < e->count; i++) {
|
||||
struct exposable *ee = e->exposables[i];
|
||||
e->widths[i] = ee->begin_expose(ee, cr);
|
||||
|
||||
width += e->left_spacing + e->widths[i] + e->right_spacing;
|
||||
exposable->width += e->left_spacing + e->widths[i] + e->right_spacing;
|
||||
}
|
||||
|
||||
width -= e->left_spacing + e->right_spacing;
|
||||
return width;
|
||||
exposable->width -= e->left_spacing + e->right_spacing;
|
||||
return exposable->width;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue