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 742520 - Scroll the view, not the list
Scroll the view, not the list
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Notifications
git master
Other Linux
: Normal normal
: ---
Assigned To: Marek Kašík
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-07 12:32 UTC by Allan Day
Modified: 2015-01-20 14:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Scroll the view not just the list (11.70 KB, patch)
2015-01-16 11:45 UTC, Marek Kašík
needs-work Details | Review
screenshot of the result (43.48 KB, image/png)
2015-01-16 11:45 UTC, Marek Kašík
  Details
Scroll the view not just the list (15.18 KB, patch)
2015-01-20 12:43 UTC, Marek Kašík
committed Details | Review

Description Allan Day 2015-01-07 12:32:19 UTC
The list of apps has a scroll bar attached. Since the list isn't very tall, this can be a bit uncomfortable, and isn't very inviting.

Scrolling the view instead would give more room for viewing the list, and would provide a larger scroll area, making the list easier to use. It would probably be a good idea to increase the height of the panel at the same time.

See: https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/notifications/notifications-wireframes.png
Comment 1 Marek Kašík 2015-01-16 11:45:04 UTC
Created attachment 294673 [details] [review]
Scroll the view not just the list

This patch implements the proposed change.
Comment 2 Marek Kašík 2015-01-16 11:45:30 UTC
Created attachment 294674 [details]
screenshot of the result
Comment 3 Rui Matos 2015-01-16 14:10:20 UTC
Review of attachment 294673 [details] [review]:

::: panels/notifications/cc-notifications-panel.c
@@ +137,1 @@
   gtk_container_add (GTK_CONTAINER (panel), w);

We need to gtk_container_set_focus_vadjustment() here so that keynav makes the panel scroll properly.

::: panels/notifications/notifications.ui
@@ +7,3 @@
+    <property name="can_focus">True</property>
+    <property name="hscrollbar_policy">never</property>
+    <property name="shadow_type">in</property>

I'm not a designer but this shadow shouldn't be here since it adds a frame around the whole panel which is just visual noise

@@ +80,2 @@
             <child>
+              <object class="GtkListBox" id="ccnotify-app-listbox">

The list box, OTOH, should have a GtkFrame around it like other panels do, e.g. the sharing panel.
Comment 4 Marek Kašík 2015-01-20 12:43:15 UTC
Created attachment 294972 [details] [review]
Scroll the view not just the list

(In reply to comment #3)
> Review of attachment 294673 [details] [review]:
> 
> ::: panels/notifications/cc-notifications-panel.c
> @@ +137,1 @@
>    gtk_container_add (GTK_CONTAINER (panel), w);
> 
> We need to gtk_container_set_focus_vadjustment() here so that keynav makes the
> panel scroll properly.

Done + added handling of "keynav-failed" signal.


> ::: panels/notifications/notifications.ui
> @@ +7,3 @@
> +    <property name="can_focus">True</property>
> +    <property name="hscrollbar_policy">never</property>
> +    <property name="shadow_type">in</property>
> 
> I'm not a designer but this shadow shouldn't be here since it adds a frame
> around the whole panel which is just visual noise

Set to none.


> @@ +80,2 @@
>              <child>
> +              <object class="GtkListBox" id="ccnotify-app-listbox">
> 
> The list box, OTOH, should have a GtkFrame around it like other panels do, e.g.
> the sharing panel.

Added.
Comment 5 Rui Matos 2015-01-20 13:31:20 UTC
Review of attachment 294972 [details] [review]:

works great, it's just missing freeing the sections lists on dispose(), with that fixed
Comment 6 Marek Kašík 2015-01-20 14:18:21 UTC
Comment on attachment 294972 [details] [review]
Scroll the view not just the list

(In reply to comment #5)
> Review of attachment 294972 [details] [review]:
> 
> works great, it's just missing freeing the sections lists on dispose(), with
> that fixed

Thank you for the review. I've add the freeing there and pushed it to master.