GtkPicture not filling window size

i’m using gtkpicture to draw an image (that is 512x512) in a window of the same size, as a background. the image file doesn’t fill the space at all, leaving blank space on the sides. can someone help me out here? thanks.

Hi,

What is 512x512? the whole window (including the headerbar), or the Picture itself?
Do you force the window to be 512x512, or is it allowed to resize?

If the window is 512x512, the headerbar will use a part of it so the Picture will have less vertical space, thus the blanks on the sides.

You can request the Picture itself to be 512x512 instead, with Gtk.Widget.set_size_request.

If you really want the full window to be 512x512, then you may request a different content-fit for the Picture, like GTK_CONTENT_FIT_FILL or GTK_CONTENT_FIT_COVER.

nvm, just wsl sucking at displaying x11 gtk windows

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.