mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
particle/string: constructor now takes an 'on_click_template'
This commit is contained in:
parent
5164d1d6ea
commit
9e5dbfe27d
3 changed files with 10 additions and 5 deletions
4
config.c
4
config.c
|
@ -193,6 +193,7 @@ particle_string_from_config(const struct yml_node *node,
|
|||
const struct yml_node *margin = yml_get_value(node, "margin");
|
||||
const struct yml_node *left_margin = yml_get_value(node, "left_margin");
|
||||
const struct yml_node *right_margin = yml_get_value(node, "right_margin");
|
||||
const struct yml_node *on_click = yml_get_value(node, "on_click");
|
||||
|
||||
assert(text != NULL && yml_is_scalar(text));
|
||||
|
||||
|
@ -208,7 +209,8 @@ particle_string_from_config(const struct yml_node *node,
|
|||
return particle_string_new(
|
||||
yml_value_as_string(text),
|
||||
font != NULL ? font_from_config(font) : font_clone(parent_font),
|
||||
fg_color, left, right);
|
||||
fg_color, left, right,
|
||||
on_click != NULL ? yml_value_as_string(on_click) : NULL);
|
||||
}
|
||||
|
||||
static struct particle * particle_from_config(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue