Formally add vertical lists

+ Add vertical as a bool to config verification
+ Fix minor bug with displaying vertical lists
This commit is contained in:
Kyle Gunger 2023-01-27 00:10:26 -05:00
parent eb296c08e4
commit 0ab621c82b
No known key found for this signature in database
GPG key ID: AAC200B8080E15D6
2 changed files with 5 additions and 3 deletions

View file

@ -101,7 +101,7 @@ expose(const struct exposable *exposable, pixman_image_t *pix, int x, int y, int
for (size_t i = 0; i < e->count; i++) { for (size_t i = 0; i < e->count; i++) {
const struct exposable *ee = e->exposables[i]; const struct exposable *ee = e->exposables[i];
ee->expose(ee, pix, x, y + pre_spacing, height); ee->expose(ee, pix, x, y + pre_spacing, height);
x += pre_spacing + e->heights[i] + post_spacing; y += pre_spacing + e->heights[i] + post_spacing;
} }
} else { } else {
x -= pre_spacing; x -= pre_spacing;
@ -245,8 +245,9 @@ verify_conf(keychain_t *chain, const struct yml_node *node)
static const struct attr_info attrs[] = { static const struct attr_info attrs[] = {
{"items", true, &conf_verify_particle_list_items}, {"items", true, &conf_verify_particle_list_items},
{"spacing", false, &conf_verify_unsigned}, {"spacing", false, &conf_verify_unsigned},
{"left-spacing", false, &conf_verify_unsigned}, {"pre-spacing", false, &conf_verify_unsigned},
{"right-spacing", false, &conf_verify_unsigned}, {"post-spacing", false, &conf_verify_unsigned},
{"vertical", false, &conf_verify_bool},
PARTICLE_COMMON_ATTRS, PARTICLE_COMMON_ATTRS,
}; };

View file

@ -352,6 +352,7 @@ verify_conf(keychain_t *chain, const struct yml_node *node)
{"fill", true, &conf_verify_particle}, {"fill", true, &conf_verify_particle},
{"empty", true, &conf_verify_particle}, {"empty", true, &conf_verify_particle},
{"indicator", true, &conf_verify_particle}, {"indicator", true, &conf_verify_particle},
{"verticl", false, &conf_verify_bool},
PARTICLE_COMMON_ATTRS, PARTICLE_COMMON_ATTRS,
}; };