]> git.mdlowis.com Git - proto/labwc.git/commit
img: remove padding_x from lab_img_render()
authortokyo4j <hrak1529@gmail.com>
Thu, 9 Jan 2025 08:20:08 +0000 (17:20 +0900)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Fri, 24 Jan 2025 22:27:21 +0000 (07:27 +0900)
commit45f73b58a114df220d110bbf00188a7412a58352
treea0884cd33a8e9c5f3dc498c0b281d77d5fde5945
parenta0cf6bb068b35c44338bfa41cd176c83fd330a56
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.
include/common/scaled-img-buffer.h
include/img/img-svg.h
include/img/img.h
src/common/scaled-img-buffer.c
src/img/img-svg.c
src/img/img.c
src/ssd/ssd-part.c
src/ssd/ssd-titlebar.c