From 101f1babf7d1381d8249d2f474e9408e89da533b Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Thu, 4 May 2017 19:06:48 +0100 Subject: [PATCH] Bug fix: Re-size images in GTK3 When compiled with GTK3 if an image is opened with "View in new window" the minimum window size is determined by the image size and screen size etc. If a file selection is opened, the minimum window size is set by the first image displayed. This feature is determined by a call to gtk_widget_set_size_request(). When compiled with GTK2, the call to gtk_widget_set_size_request() seems to be ignored, and the window can be resized at will. The GTK2 style is much more practical, so the call to gtk_widget_set_size_request() is ignored in GTK3. --- src/img-view.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/img-view.c b/src/img-view.c index d31853cc..00aff7e9 100644 --- a/src/img-view.c +++ b/src/img-view.c @@ -906,7 +906,9 @@ static ViewWindow *real_view_window_new(FileData *fd, GList *list, CollectionDat req_size.height = h; gtk_widget_size_allocate(GTK_WIDGET(vw->window), &req_size); +#if !GTK_CHECK_VERSION(3,0,0) gtk_widget_set_size_request(vw->imd->pr, w, h); +#endif gtk_widget_show(vw->window); -- 2.20.1