I'm developing another image viewer using Python and Gtk and the viewer is currently very simple: it consists of a GtkWindow
with a GtkTreeView
on the left side displaying the list of my images, and a GtkImage
on the right side, displaying the actual image. So far, so good.
Now, I would like to go fullscreen, and display only the image with a black background, etc.
I can see several ways of doing this:
- I can hide() the window, and display a big
GtkImage
instead, but I'm loosing all the stuff that I setup on the window before (signals for example), and I'm hiding the window which goes fullscreen, which is a bit weird; - I can hide() the content of the window, remove the content of the window (which can have only one child, as far as I know?), and put a
GtkImage
inside instead (and do the reverse on exiting fullscreen); - I can try to play with the containers inside my window, and hiding/showing their content when the window is going fullscreen/exiting fullscreen. More precisely, I was thinking of adding another
GtkHBox
as a direct child of my window, with two child, and displaying only the first one on "normal" mode, and only the second one on fullscreen.
That all seem a bit hacky, so I wonder what would be the recommended way to handle this kind of situation. Thanks!