mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
img: remove padding_x from lab_img_render()
padding_x in lab_img_render() was just to make sure window icons in the titlebar doesn't get too close to adjacent buttons and it didn't felt clean. To remove it from lab_img, this commit changes the size of window icon buffers from (window.button.width)x(window.button.height) to (window.button.width * 0.8)x(window.button.height) and horizontally slide it by (window.button.width * 0.1) to keep the horizontal padding. Note that the size of the hitbox for a window icon is kept the same and nothing is changed from user's perspective.
This commit is contained in:
parent
a0cf6bb068
commit
45f73b58a1
8 changed files with 20 additions and 30 deletions
|
|
@ -9,6 +9,6 @@ struct lab_data_buffer;
|
|||
RsvgHandle *img_svg_load(const char *filename);
|
||||
|
||||
struct lab_data_buffer *img_svg_render(RsvgHandle *svg, int w, int h,
|
||||
int padding, double scale);
|
||||
double scale);
|
||||
|
||||
#endif /* LABWC_IMG_SVG_H */
|
||||
|
|
|
|||
|
|
@ -59,11 +59,10 @@ void lab_img_add_modifier(struct lab_img *img, lab_img_modifier_func_t modifier)
|
|||
* @img: source image
|
||||
* @width: width of the created buffer
|
||||
* @height: height of the created buffer
|
||||
* @padding_x: horizontal padding around the rendered image in the buffer
|
||||
* @scale: scale of the created buffer
|
||||
*/
|
||||
struct lab_data_buffer *lab_img_render(struct lab_img *img,
|
||||
int width, int height, int padding_x, double scale);
|
||||
int width, int height, double scale);
|
||||
|
||||
/**
|
||||
* lab_img_destroy() - destroy lab_img
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue