exclude brackets in centering calculation (#351)

This commit is contained in:
Felix Kratz 2023-04-05 18:13:23 +02:00
parent 5bf36c407e
commit bfded17e5e

View file

@ -295,7 +295,9 @@ uint32_t bar_manager_length_for_bar_side(struct bar_manager* bar_manager, struct
uint32_t total_length = 0;
for (int i = 0; i < bar_manager->bar_item_count; i++) {
struct bar_item* bar_item = bar_manager->bar_items[i];
if (bar_item->position == side && bar_draws_item(bar, bar_item)) {
if (bar_item->position == side
&& bar_item->type != BAR_COMPONENT_GROUP
&& bar_draws_item(bar, bar_item) ) {
int item_length = (bar_manager->position == POSITION_LEFT
|| bar_manager->position == POSITION_RIGHT)
? bar_item_get_height(bar_item)