Skip to content

Commit

Permalink
Bug fix: Re-size images in GTK3
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
caclark committed May 4, 2017
1 parent d72088e commit 101f1ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/img-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 101f1ba

Please sign in to comment.