]> git.mdlowis.com Git - proto/labwc.git/commitdiff
scaled-icon-buffer: prevent accidental downcasting of scale
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 9 Aug 2025 02:48:39 +0000 (04:48 +0200)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Sat, 9 Aug 2025 07:52:10 +0000 (16:52 +0900)
This causes blurry icons on non-integer scales and triggers
an assert within cairo when using a output scale < 1.

Fixes: #2983
src/common/scaled-icon-buffer.c

index 62cb301e4b50c8e1e1ab3757d724ed8fa4597961..49387bace75e65e696178b8a1db4855d9981f2b1 100644 (file)
@@ -45,7 +45,7 @@ choose_best_icon_buffer(struct scaled_icon_buffer *self, int icon_size, double s
 }
 
 static struct lab_data_buffer *
-img_to_buffer(struct lab_img *img, int width, int height, int scale)
+img_to_buffer(struct lab_img *img, int width, int height, double scale)
 {
        struct lab_data_buffer *buffer = lab_img_render(img, width, height, scale);
        lab_img_destroy(img);