Option to shrink panel: fix taskbar sizing

This commit is contained in:
o9000
2016-10-09 15:21:56 +02:00
parent 7c54f2acf7
commit 0d861ebd97
3 changed files with 26 additions and 0 deletions

View File

@@ -224,6 +224,13 @@ int compute_desired_size(Area *a)
return a->_compute_desired_size(a);
if (a->size_mode == LAYOUT_FIXED)
fprintf(stderr, YELLOW "Area %s does not set desired size!" RESET "\n", a->name);
return container_compute_desired_size(a);
}
int container_compute_desired_size(Area *a)
{
if (!a->on_screen)
return 0;
int result = 2 * a->paddingxlr + (panel_horizontal ? left_right_border_width(a) : top_bottom_border_width(a));
int children_count = 0;
for (GList *l = a->children; l != NULL; l = l->next) {