After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736366 - background chooser resizes
background chooser resizes
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Background
unspecified
Other All
: Normal normal
: ---
Assigned To: Debarshi Ray
Control-Center Maintainers
: 737924 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-09-10 00:04 UTC by Matthias Clasen
Modified: 2014-10-05 16:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
background: Bring back the horizontal size request on the grid (1.21 KB, patch)
2014-09-10 16:20 UTC, Debarshi Ray
needs-work Details | Review
background: Remove a useless horizontal size request (1.48 KB, patch)
2014-09-10 16:38 UTC, Debarshi Ray
committed Details | Review
background: Use a stack with three views for the chooser dialog (24.28 KB, patch)
2014-09-11 16:06 UTC, Debarshi Ray
accepted-commit_now Details | Review
background: Use a stack with three views for the chooser dialog (25.78 KB, patch)
2014-09-12 11:18 UTC, Debarshi Ray
committed Details | Review

Description Matthias Clasen 2014-09-10 00:04:08 UTC
In this freshly installed vm, there's nothing in the Pictures folder. When I switch from the wallpaper tab to pictures and then to colors, the dialog gets first smaller, and then bigger again. It would be better if it didn't change size.
Comment 1 Debarshi Ray 2014-09-10 09:07:55 UTC
Yes, I saw it recently on Continuous. On my list of fixes for 3.13.92.
Comment 2 Debarshi Ray 2014-09-10 15:42:35 UTC
This is a fallout of removing the size_request on the grid in:

commit 130dd418b83a98c2f42343ef56862488daf2509c
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Apr 14 11:33:01 2014 +0200

    background: Make whole dialog visible on small screens
    
    When using a small screen, make sure that the whole of the dialogue
    is visible, including the confirmation buttons. This means that the
    dialogue will be maximised when on smaller screens (just like its
    parent), and that we won't set a number of columns for the icon
    view.
    
    We will also stop making the dialogue much bigger than the
    Settings window itself.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692495
Comment 3 Debarshi Ray 2014-09-10 16:20:31 UTC
Created attachment 285835 [details] [review]
background: Bring back the horizontal size request on the grid
Comment 4 Bastien Nocera 2014-09-10 16:36:38 UTC
Review of attachment 285835 [details] [review]:

::: panels/background/cc-background-chooser-dialog.c
@@ +450,3 @@
   gtk_grid_set_column_spacing (GTK_GRID (grid), 0);
   gtk_container_add (GTK_CONTAINER (vbox), grid);
+  gtk_widget_set_size_request (grid, 853, -1);

No, that doesn't take into account the small monitor problem, or the size of the parent settings window.

Using multiple views is a good idea, which you mentioned on IRC, but in the meanwhile, disabling the pictures "tab" when there's no items in there should be enough.

Or if we have a placeholder, take the size of the (populated) icon view before switching, and apply it as size request to the placeholder (and undo it when you switch away from the pictures "tab").
Comment 5 Debarshi Ray 2014-09-10 16:38:47 UTC
Created attachment 285836 [details] [review]
background: Remove a useless horizontal size request
Comment 6 Bastien Nocera 2014-09-10 16:41:17 UTC
Review of attachment 285836 [details] [review]:

Fine by me.
Comment 7 Debarshi Ray 2014-09-11 16:06:54 UTC
Created attachment 285933 [details] [review]
background: Use a stack with three views for the chooser dialog
Comment 8 Bastien Nocera 2014-09-11 17:48:20 UTC
Review of attachment 285933 [details] [review]:

Looks good, hopefully not too many regressions... :)

::: panels/background/cc-background-chooser-dialog.h
@@ +51,2 @@
 GType                  cc_background_chooser_dialog_get_type               (void) G_GNUC_CONST;
+GtkWidget *            cc_background_chooser_dialog_new                    (GtkWindow *transient_for);

Did you also have a patch for the test application?
Comment 9 Debarshi Ray 2014-09-12 11:18:37 UTC
Created attachment 286022 [details] [review]
background: Use a stack with three views for the chooser dialog

I am so sorry. I forgot to git add cc-background-panel.c and test-chooser-dialog.c I have done that now.
Comment 10 Bastien Nocera 2014-09-12 11:21:51 UTC
Review of attachment 286022 [details] [review]:

Looks good.
Comment 11 Debarshi Ray 2014-10-05 16:36:09 UTC
*** Bug 737924 has been marked as a duplicate of this bug. ***