0
votes

How do you make the main window of a GTK application fit to screen?

I'm using a GTK application that displays two input images: when the images are small everything is fine, but when the images get bigger the whole GTK window becomes too large and goes out of the bound of the screen.

In the C++ code I have:

GtkWidget *main_window;

I want to know how to tell GTK to make the main_window always fit to screen

Any help will be highly appreciated

1

1 Answers

0
votes

The window will respect it's child size requisition. That's why you have to scale your image. It can be done like this