Resizing Image in Gtk (Blueprint)

Hi all, so I am new here.

I am currently building a simple game with Gtk (libadwaita) and Rust, and I am using Blueprint for my UI framework.

The issue I am facing now is that I can’t easily resize the image I am putting in my UI I am using the Gtk.Picture Widget, and it is giving me a headache.

Please, how can I easily resize the image as I like, just like on the web (CSS), I can use
width: xval;
height: yval;
etc., but nothing seems to be working for me here.

Hi!

A better category for this question would be Platform - GNOME Discourse; more relevant people would see it there sooner.

Please mention what kind of image that is. Is it an asset (e.g. icon) that you create ahead of time when developing your game? Is it a user-selected file? Is it loaded from some untrusted location on the network?

What size do you want/expect the image to be?

1 Like

(I took the freedom to change category)

Hi @bugaevc

Don’t mind the late reply, kinda switched to the Gtk-image widget,
And that seems to work fine for me, when setting the sizes in rust as compare to setting it in Blueprint (can’t say why).

Also, will find time to move this to the discourse channel you spoke about when I am back to using this again.

Appreciate the response.