forked from external/yambar
particles: all particles can have a decoration
This commit is contained in:
parent
311193751c
commit
307a1f5ec8
2 changed files with 3 additions and 3 deletions
|
@ -22,12 +22,13 @@ struct particle_info {
|
|||
size_t attr_count; /* TODO: reomve, NULL-terminate attr list instead */
|
||||
const struct attr_info attrs[];
|
||||
|
||||
#define PARTICLE_COMMON_ATTRS_COUNT 4
|
||||
#define PARTICLE_COMMON_ATTRS_COUNT 5
|
||||
#define PARTICLE_COMMON_ATTRS \
|
||||
{"margin", false, &conf_verify_int}, \
|
||||
{"left-margin", false, &conf_verify_int}, \
|
||||
{"right-margin", false, &conf_verify_int}, \
|
||||
{"on-click", false, &conf_verify_string}, \
|
||||
{"deco", false, &conf_verify_decoration}, \
|
||||
{NULL, false, NULL}
|
||||
|
||||
};
|
||||
|
|
|
@ -173,13 +173,12 @@ from_conf(const struct yml_node *node, const struct font *parent_font,
|
|||
|
||||
const struct particle_info plugin_info = {
|
||||
.from_conf = &from_conf,
|
||||
.attr_count = PARTICLE_COMMON_ATTRS_COUNT + 5,
|
||||
.attr_count = PARTICLE_COMMON_ATTRS_COUNT + 4,
|
||||
.attrs = {
|
||||
{"text", true, &conf_verify_string},
|
||||
{"max", false, &conf_verify_int},
|
||||
{"font", false, &conf_verify_font},
|
||||
{"foreground", false, &conf_verify_color},
|
||||
{"deco", false, &conf_verify_decoration},
|
||||
PARTICLE_COMMON_ATTRS,
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue