allow negative image paddings and y_offsets

This commit is contained in:
Felix Kratz 2023-10-27 18:53:03 +02:00
parent f60b9d6d5c
commit ec5d88d9f5
2 changed files with 6 additions and 6 deletions

View file

@ -316,19 +316,19 @@ bool image_parse_sub_domain(struct image* image, FILE* rsp, struct token propert
ANIMATE(image_set_padding_left,
image,
image->padding_left,
token_to_uint32t(get_token(&message)));
token_to_int(get_token(&message)));
}
else if (token_equals(property, PROPERTY_PADDING_RIGHT)) {
ANIMATE(image_set_padding_right,
image,
image->padding_right,
token_to_uint32t(get_token(&message)));
token_to_int(get_token(&message)));
}
else if (token_equals(property, PROPERTY_YOFFSET)) {
ANIMATE(image_set_yoffset,
image,
image->y_offset,
token_to_uint32t(get_token(&message)));
token_to_int(get_token(&message)));
}
else if (token_equals(property, PROPERTY_BORDER_WIDTH)) {
ANIMATE_FLOAT(image_set_border_width,

View file

@ -22,9 +22,9 @@ struct image {
float border_width;
uint32_t corner_radius;
uint32_t padding_left;
uint32_t padding_right;
uint32_t y_offset;
int padding_left;
int padding_right;
int y_offset;
};
void image_init(struct image* image);