Node preview fixes

This commit is contained in:
luboslenco
2025-09-27 14:01:12 +02:00
parent bc6d05279e
commit 3daff6f5ef
3 changed files with 16 additions and 12 deletions
+2 -1
View File
@@ -746,7 +746,8 @@ void ui_node_draw(ui_node_t *node, ui_node_canvas_t *canvas) {
gpu_texture_t *image = ui_nodes_preview_image(node);
if (image != NULL) {
draw_set_color(0xffffffff);
draw_scaled_image(image, nx, ny - w, w, w);
float ph = w * (image->height / (float)image->width);
draw_scaled_image(image, nx, ny - ph, w, ph);
}
}