From ec5d88d9f5c123b562cc91101342687c707b2753 Mon Sep 17 00:00:00 2001 From: Felix Kratz Date: Fri, 27 Oct 2023 18:53:03 +0200 Subject: [PATCH] allow negative image paddings and y_offsets --- src/image.c | 6 +++--- src/image.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/image.c b/src/image.c index ba87ab6..51d3270 100644 --- a/src/image.c +++ b/src/image.c @@ -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, diff --git a/src/image.h b/src/image.h index bbdeddf..8f4b624 100644 --- a/src/image.h +++ b/src/image.h @@ -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);