mirror of
https://github.com/FelixKratz/SketchyBar
synced 2024-11-29 06:40:27 +00:00
add scroll fields to query response (#520)
This commit is contained in:
parent
3946005f6b
commit
4194da0bd2
2 changed files with 5 additions and 1 deletions
|
@ -882,9 +882,10 @@ void bar_item_serialize(struct bar_item* bar_item, FILE* rsp) {
|
||||||
"\t\t\"associated_display_mask\": %u,\n"
|
"\t\t\"associated_display_mask\": %u,\n"
|
||||||
"\t\t\"ignore_association\": \"%s\",\n"
|
"\t\t\"ignore_association\": \"%s\",\n"
|
||||||
"\t\t\"y_offset\": %d,\n"
|
"\t\t\"y_offset\": %d,\n"
|
||||||
"\t\t\"width\": %d,\n"
|
|
||||||
"\t\t\"padding_left\": %d,\n"
|
"\t\t\"padding_left\": %d,\n"
|
||||||
"\t\t\"padding_right\": %d,\n"
|
"\t\t\"padding_right\": %d,\n"
|
||||||
|
"\t\t\"scroll_texts\": \"%s\",\n"
|
||||||
|
"\t\t\"width\": %d,\n"
|
||||||
"\t\t\"background\": {\n",
|
"\t\t\"background\": {\n",
|
||||||
bar_item->name,
|
bar_item->name,
|
||||||
type,
|
type,
|
||||||
|
@ -896,6 +897,7 @@ void bar_item_serialize(struct bar_item* bar_item, FILE* rsp) {
|
||||||
bar_item->y_offset,
|
bar_item->y_offset,
|
||||||
bar_item->background.padding_left,
|
bar_item->background.padding_left,
|
||||||
bar_item->background.padding_right,
|
bar_item->background.padding_right,
|
||||||
|
format_bool(bar_item->scroll_texts),
|
||||||
bar_item->has_const_width ? bar_item->custom_width : -1);
|
bar_item->has_const_width ? bar_item->custom_width : -1);
|
||||||
|
|
||||||
background_serialize(&bar_item->background, "\t\t\t", rsp, true);
|
background_serialize(&bar_item->background, "\t\t\t", rsp, true);
|
||||||
|
|
|
@ -389,6 +389,7 @@ void text_serialize(struct text* text, char* indent, FILE* rsp) {
|
||||||
"%s\"y_offset\": %d,\n"
|
"%s\"y_offset\": %d,\n"
|
||||||
"%s\"font\": \"%s:%s:%.2f\",\n"
|
"%s\"font\": \"%s:%s:%.2f\",\n"
|
||||||
"%s\"width\": %d,\n"
|
"%s\"width\": %d,\n"
|
||||||
|
"%s\"scroll_duration\": %d,\n"
|
||||||
"%s\"align\": \"%s\",\n"
|
"%s\"align\": \"%s\",\n"
|
||||||
"%s\"background\": {\n",
|
"%s\"background\": {\n",
|
||||||
indent, text->string,
|
indent, text->string,
|
||||||
|
@ -401,6 +402,7 @@ void text_serialize(struct text* text, char* indent, FILE* rsp) {
|
||||||
indent, text->y_offset,
|
indent, text->y_offset,
|
||||||
indent, text->font.family, text->font.style, text->font.size,
|
indent, text->font.family, text->font.style, text->font.size,
|
||||||
indent, text->custom_width,
|
indent, text->custom_width,
|
||||||
|
indent, text->scroll_duration,
|
||||||
indent, align, indent );
|
indent, align, indent );
|
||||||
|
|
||||||
char deeper_indent[strlen(indent) + 2];
|
char deeper_indent[strlen(indent) + 2];
|
||||||
|
|
Loading…
Reference in a new issue