GNOME Bugzilla – Bug 762548
background, online-accounts: Non-resizable dialogs have become smaller
Last modified: 2016-03-15 12:53:07 UTC
Created attachment 322004 [details] screenshot The choose background dialog is much wider than it is tall. This makes it look unbalanced and a bit silly. It is also awkward to use, since you can't see many backgrounds at the same time. Can we make it taller?
(In reply to Allan Day from comment #0) > The choose background dialog is much wider than it is tall. This makes it > look unbalanced and a bit silly. It is also awkward to use, since you can't > see many backgrounds at the same time. > > Can we make it taller? Sure, we can.
I am willing to argue that this is a change in gtk+'s behaviour when setting the size of a window. I have also seen this in apps like gnome-photos that try to remember the window size from the last run where the size saved via gtk-3.18.x is not respected by gtk+ 3.19.x. In this case, the dialog used to be tall enough to show at least two full rows instead of one and a half as it is now. We can surely make it taller than two rows or use a different logic to determine the height, but would be nice to try to fix the gtk+ issue as well. Here is how we set the size: https://git.gnome.org/browse/gnome-control-center/tree/panels/background/cc-background-chooser-dialog.c#n110 Right now, setting a size that is 1.2 times that of the parent doesn't give a dialog that is taller than the parent. /me goes to write a reproducer
Please pair gtk_window_get_size with gtk_window_set_default_size
(In reply to Matthias Clasen from comment #3) > Please pair gtk_window_get_size with gtk_window_set_default_size Indeed, that is very likely the issue here. However, Windows are taller even with paired gtk_window_get_size and gtk_window_set_default_size calls. I filed bug 762920 for that.
Created attachment 322763 [details] [review] background: Ensure that the chooser is tall enough with newer GTK+
Created attachment 322764 [details] [review] background: Add a comment explaining a hack
(In reply to Matthias Clasen from comment #3) > Please pair gtk_window_get_size with gtk_window_set_default_size Now I remember why the code doesn't use gtk_window_set_default_size: it doesn't work with non-resizable GtkWindows.
Review of attachment 322763 [details] [review]: ::: panels/background/cc-background-chooser-dialog.c @@ +113,2 @@ gtk_window_get_size (parent, &width, &height); + gtk_widget_set_size_request (GTK_WIDGET (chooser), -1, (gint) (1.1 * height)); The point of the old value was to make sure that the dialogue didn't cover the Settings window. The commit message doesn't explain why the change is necessary though, or explain why that's needed.
Review of attachment 322764 [details] [review]: Sure.
Let's wait for things like bug 762974 to be resolved. Olivier is also considering the option of making gtk_window_set_default_size work for non-resizable windows.
I will also note that we need similar fixes to the online accounts dialogs.
Created attachment 323308 [details] [review] background: Ensure that the chooser is tall enough with newer GTK+
Review of attachment 322764 [details] [review]: Thanks to ofourdan, we no longer need this hack (see the other patch). Hence, no need to document it. :)
Created attachment 323313 [details] [review] online-accounts: Fix the add account dialog's size with newer GTK+
By the way, the commit messages are probably horrible, and the online-accounts patch needs matching changes in the gnome-online-accounts side.
Created attachment 323315 [details] [review] wacom: Use the right API for setting the window width
Review of attachment 323308 [details] [review]: Sure.
Review of attachment 323313 [details] [review]: Yep.
Review of attachment 323315 [details] [review]: Sure.
And don't forget to bump the required version of GTK+ in the configure.ac file.
(In reply to Bastien Nocera from comment #20) > And don't forget to bump the required version of GTK+ in the configure.ac > file. The gtk+ version hasn't been bumped since the last release, which was before ofourdan's changes. When I spoke with him about this last week, he was a bit reluctant to bump it only for this.
Keeping it open for the corresponding gnome-online-accounts patches.
Created attachment 323902 [details] [review] Fix the dialogs' dimensions with newer GTK+
Created attachment 323903 [details] [review] telepathy: Ensure that the dialog is not unnecessarily tall
Created attachment 323904 [details] [review] oauth, oauth2: Stop the web view from leaking out of the dialog
Created attachment 323905 [details] [review] build: Bump minimum GTK+ version to 3.19.12 We now have a new enough gtk+ version that we can require.
Comment on attachment 323902 [details] [review] Fix the dialogs' dimensions with newer GTK+ Pushed to g-o-a master.
Comment on attachment 323903 [details] [review] telepathy: Ensure that the dialog is not unnecessarily tall Pushed to g-o-a master.
Comment on attachment 323904 [details] [review] oauth, oauth2: Stop the web view from leaking out of the dialog Pushed to g-o-a master.
gtk 3.19.12 has been released, so I think you can push the last patch here and close this bug