mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
Fix miscalculation of list width in presence of empty particles
This commit is contained in:
parent
c44c66c83f
commit
53dec73ed2
3 changed files with 10 additions and 6 deletions
|
@ -71,7 +71,8 @@ dynlist_expose(const struct exposable *exposable, pixman_image_t *pix, int x, in
|
|||
for (size_t i = 0; i < e->count; i++) {
|
||||
const struct exposable *ee = e->exposables[i];
|
||||
ee->expose(ee, pix, x + left_spacing, y, height);
|
||||
x += left_spacing + e->widths[i] + right_spacing;
|
||||
if (e->widths[i] > 0)
|
||||
x += left_spacing + e->widths[i] + right_spacing;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,8 +96,8 @@ on_mouse(struct exposable *exposable, struct bar *bar,
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
px += e->left_spacing + e->exposables[i]->width + e->right_spacing;
|
||||
if (e->exposables[i]->width > 0)
|
||||
px += e->left_spacing + e->exposables[i]->width + e->right_spacing;
|
||||
}
|
||||
|
||||
LOG_DBG("on_mouse missed all sub-particles");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue