Basic vertical rendering

- Add height attribute to most particles for height generation on the fly
This commit is contained in:
Kyle Gunger 2023-01-18 03:43:35 -05:00
parent 37b5b02fc4
commit 60c18246d8
23 changed files with 286 additions and 158 deletions

View file

@ -207,7 +207,7 @@ content(struct module *mod)
}
mtx_unlock(&mod->lock);
return dynlist_exposable_new(parts, list_count, 0, 0);
return dynlist_exposable_new(parts, list_count, mod->bar->is_vertical(mod->bar), 0, 0);
}
static int

View file

@ -259,7 +259,7 @@ content(struct module *mod)
tag_set_destroy(&tags);
mtx_unlock(&mod->lock);
return dynlist_exposable_new(tag_parts, p->devices.length + 1, 0, 0);
return dynlist_exposable_new(tag_parts, p->devices.length + 1, mod->bar->is_vertical(mod->bar), 0, 0);
}
static int

View file

@ -120,7 +120,7 @@ content(struct module *module)
tag_set_destroy(&tags);
mtx_unlock(&module->lock);
return dynlist_exposable_new(exposable, i, 0, 0);
return dynlist_exposable_new(exposable, module->bar->is_vertical(module->bar), i, 0, 0);
}
static struct dwl_tag *

View file

@ -149,7 +149,7 @@ content(struct module *mod)
}
mtx_unlock(&mod->lock);
return dynlist_exposable_new(toplevels, show_count, 0, 0);
return dynlist_exposable_new(toplevels, show_count, mod->bar->is_vertical(mod->bar), 0, 0);
}
static bool

View file

@ -904,7 +904,7 @@ content(struct module *mod)
mtx_unlock(&mod->lock);
return dynlist_exposable_new(
particles, particle_count, m->left_spacing, m->right_spacing);
particles, particle_count, mod->bar->is_vertical(mod->bar), m->left_spacing, m->right_spacing);
}
/* Maps workspace name to a content particle. */

View file

@ -856,7 +856,7 @@ content(struct module *module)
struct private *private = module->private;
if (private->data == NULL)
return dynlist_exposable_new(NULL, 0, 0, 0);
return dynlist_exposable_new(NULL, 0, module->bar->is_vertical(module->bar), 0, 0);
mtx_lock(&module->lock);
@ -915,7 +915,7 @@ content(struct module *module)
mtx_unlock(&module->lock);
return dynlist_exposable_new(exposables, exposables_length, 0, 0);
return dynlist_exposable_new(exposables, exposables_length, module->bar->is_vertical(module->bar), 0, 0);
}
static int

View file

@ -158,7 +158,7 @@ content(struct module *mod)
tll_free(partitions);
return dynlist_exposable_new(
exposables, idx, m->left_spacing, m->right_spacing);
exposables, idx, mod->bar->is_vertical(mod->bar), m->left_spacing, m->right_spacing);
}
static void

View file

@ -178,7 +178,7 @@ content(struct module *mod)
}
mtx_unlock(&m->mod->lock);
return dynlist_exposable_new(tag_parts, 32 + seat_count, 0, 0);
return dynlist_exposable_new(tag_parts, 32 + seat_count, mod->bar->is_vertical(mod->bar), 0, 0);
}
static bool

View file

@ -90,7 +90,7 @@ content(struct module *mod)
mtx_unlock(&mod->lock);
return dynlist_exposable_new(
particles, m->num_existing_inputs, m->left_spacing, m->right_spacing);
particles, m->num_existing_inputs, mod->bar->is_vertical(mod->bar), m->left_spacing, m->right_spacing);
}
static bool