GNOME Bugzilla – Bug 693506
background: use GtkFlowBox for background picker
Last modified: 2021-06-09 16:10:46 UTC
This switches the background selector from icon view to the flow box.
Created attachment 235608 [details] [review] background: use EggFlowBox for background picker
Created attachment 235622 [details] [review] background: set the adjustment on the flow box
Review of attachment 235608 [details] [review]: I have 13 items in my ~/Pictures folder, and 12 in the Wallpapers section. When I scroll at the bottom of the Wallpapers section, and then switch to the Pictures section, the scrollbar isn't reset to the top, and the last item in the list (the 13th) isn't accessible. ::: configure.ac @@ +128,3 @@ # egg-list-box is a static library, so it must be shared among all panels # or it breaks GType registration +PKG_CHECK_MODULES(SHELL, $COMMON_MODULES x11 egg-list-box egg-flow-box polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION) egg-flow-box isn't a common module, only the background panel uses it, so it should only be linked from the background module (the line below). ::: shell/control-center.c @@ +277,3 @@ cc_shell_log_init (); + Why the extra line feed? @@ +280,2 @@ g_type_ensure (egg_list_box_get_type ()); + g_type_ensure (egg_flow_box_get_type ()); All this needs to move to background panel.
Review of attachment 235622 [details] [review]: You can merge this directly in the previous patch, the bug fix doesn't make sense on its own.
Nowadays it would be GtkFlowBox.
Review of attachment 235608 [details] [review]: ::: panels/background/cc-background-chooser-dialog.c @@ +445,3 @@ return NULL; + item = g_object_get_data (G_OBJECT (list->data), "item"); We should take a reference on 'item' to maintain parity with the earlier code because gtk_tree_model_get was doing that.
Created attachment 283636 [details] [review] background: Use GtkFlowBox for background picker Rebased on against master using GtkFlowbox. There are some alignment issues that need fixing. eg., only one item in 'Pictures', or items with different aspect ratios. Selected items are not marked with a blue. Probably something that needs to be addressed in the theme.
Review of attachment 283636 [details] [review]: Now that we don't have the white background from the icon view, we'll probably want to remove the shadow-type from the scrolled window, so the border goes away. There's also a resize that happens *after* the window is shown. Finally, a blue border to show the selected item better would be nice. ::: panels/background/cc-background-chooser-dialog.c @@ +469,3 @@ rgba.alpha = dropped[3] / 65535.; + if (bg_colors_source_add (chooser->priv->colors_source, &rgba, NULL) == FALSE) Here, we're losing the focus after drop, which is a pretty important part of the interaction.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new bug report at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/ Thank you for your understanding and your help.