mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-23 11:53:02 +00:00
bracket optimization
This commit is contained in:
parent
dc2ce74817
commit
ee0d08c8db
2 changed files with 3 additions and 2 deletions
|
@ -224,7 +224,7 @@ uint32_t bar_item_get_length(struct bar_item* bar_item) {
|
|||
return text_get_length(&bar_item->icon)
|
||||
+ text_get_length(&bar_item->label)
|
||||
+ (bar_item->has_graph ? graph_get_length(&bar_item->graph) : 0)
|
||||
+ (bar_item->has_alias ? alias_get_length(&bar_item->alias) : 0);
|
||||
+ (bar_item->has_alias ? alias_get_length(&bar_item->alias) : 0) + 1;
|
||||
}
|
||||
|
||||
uint32_t bar_item_get_height(struct bar_item* bar_item) {
|
||||
|
|
|
@ -41,7 +41,8 @@ uint32_t group_get_length(struct group* group) {
|
|||
uint32_t length = 0;
|
||||
for (int i = 1; i < group->num_members; i++) {
|
||||
if (!group->members[i]->nospace || (group->members[i]->nospace && i == group->num_members - 1))
|
||||
length += bar_item_get_length(group->members[i]);
|
||||
if (group->members[i]->drawing)
|
||||
length += bar_item_get_length(group->members[i]);
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue