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 673869 - Upstream some ubuntu design changes
Upstream some ubuntu design changes
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: shell
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 645461 651572 657560 666000 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-04-10 21:04 UTC by William Jon McCann
Modified: 2012-05-21 17:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Increase icon size to 48px (893 bytes, patch)
2012-04-10 21:04 UTC, William Jon McCann
accepted-commit_now Details | Review
Increase default window size (4.76 KB, patch)
2012-04-10 21:04 UTC, William Jon McCann
needs-work Details | Review
Add horizontal separators between sections (1.28 KB, patch)
2012-04-10 21:04 UTC, William Jon McCann
accepted-commit_now Details | Review
Fit three columns of search results (1.75 KB, patch)
2012-04-10 22:05 UTC, William Jon McCann
needs-work Details | Review
screenshot (80.83 KB, image/png)
2012-04-11 13:58 UTC, William Jon McCann
  Details
Hide window titlebar when maximized (948 bytes, patch)
2012-04-12 20:03 UTC, William Jon McCann
none Details | Review
Increase default window size (6.66 KB, patch)
2012-05-01 01:04 UTC, William Jon McCann
none Details | Review
Add horizontal separators between sections (1.26 KB, patch)
2012-05-01 01:04 UTC, William Jon McCann
none Details | Review
Fit three columns of search results (1.75 KB, patch)
2012-05-01 01:04 UTC, William Jon McCann
none Details | Review
Hide window titlebar when maximized (929 bytes, patch)
2012-05-01 01:04 UTC, William Jon McCann
none Details | Review
Increase default window size (7.54 KB, patch)
2012-05-01 17:15 UTC, William Jon McCann
needs-work Details | Review
Add horizontal separators between sections (1.26 KB, patch)
2012-05-01 17:15 UTC, William Jon McCann
accepted-commit_now Details | Review
Fit three columns of search results (1.75 KB, patch)
2012-05-01 17:15 UTC, William Jon McCann
needs-work Details | Review
Hide window titlebar when maximized (929 bytes, patch)
2012-05-01 17:15 UTC, William Jon McCann
reviewed Details | Review
Increase icon size to 48px (889 bytes, patch)
2012-05-08 02:52 UTC, William Jon McCann
committed Details | Review
Increase default window size (9.25 KB, patch)
2012-05-08 02:52 UTC, William Jon McCann
none Details | Review
Add horizontal separators between sections (1.26 KB, patch)
2012-05-08 02:52 UTC, William Jon McCann
committed Details | Review
Fit three columns of search results (3.44 KB, patch)
2012-05-08 02:52 UTC, William Jon McCann
committed Details | Review
Hide window titlebar when maximized (994 bytes, patch)
2012-05-08 02:52 UTC, William Jon McCann
committed Details | Review
Use menubar style class for toolbar (1.20 KB, patch)
2012-05-08 02:52 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2012-04-10 21:04:04 UTC
Some of the changes Ubuntu has made to the overview are pretty nice. Namely:
 * Increasing the icon size to the more standard GNOME 3 size of 48px
 * Making the window size a bit bigger by default and a bit smarter about small screens
 * Using separators between sections to help distinguish the grids of icons
Comment 1 William Jon McCann 2012-04-10 21:04:27 UTC
Created attachment 211793 [details] [review]
Increase icon size to 48px
Comment 2 William Jon McCann 2012-04-10 21:04:29 UTC
Created attachment 211794 [details] [review]
Increase default window size

And be smarter about small screen sizes.

Based on patch from Ubuntu
Comment 3 William Jon McCann 2012-04-10 21:04:31 UTC
Created attachment 211795 [details] [review]
Add horizontal separators between sections

Based on patch from Ubuntu
Comment 4 William Jon McCann 2012-04-10 22:05:31 UTC
Created attachment 211796 [details] [review]
Fit three columns of search results

And center labels vertically that have no search matching text.
Comment 5 William Jon McCann 2012-04-11 13:58:05 UTC
Created attachment 211828 [details]
screenshot
Comment 6 Bastien Nocera 2012-04-11 14:03:15 UTC
Review of attachment 211794 [details] [review]:

You should be using the startup notification data to know where from the application was launched, not using gdk_device_manager_get_client_pointer().
This also means that:
- moving the shell from a big screen to a small one won't work (external monitor to internal one)
- lowering the resolution of the display won't change the shell's size
All that to basically paper over the fact that there are bug in GtkIconView which make it impossible to know the realized height of the full scrolled view.
Comment 7 Bastien Nocera 2012-04-11 14:03:34 UTC
Review of attachment 211793 [details] [review]:

Looks good.
Comment 8 Bastien Nocera 2012-04-11 14:04:03 UTC
Review of attachment 211795 [details] [review]:

Looks fine.
Comment 9 Bastien Nocera 2012-04-11 14:05:28 UTC
Review of attachment 211796 [details] [review]:

Looks good too. Could you mention the new default shell width from the other patch, or better, make this new width a calculation based on that new width?
Comment 10 William Jon McCann 2012-04-12 20:03:29 UTC
Created attachment 211955 [details] [review]
Hide window titlebar when maximized
Comment 11 Volker Sobek (weld) 2012-04-23 21:03:53 UTC
*** Bug 666000 has been marked as a duplicate of this bug. ***
Comment 12 William Jon McCann 2012-05-01 01:04:38 UTC
Created attachment 213154 [details] [review]
Increase default window size

And be smarter about small screen sizes.

Based on patch from Ubuntu
Comment 13 William Jon McCann 2012-05-01 01:04:44 UTC
Created attachment 213155 [details] [review]
Add horizontal separators between sections

Based on patch from Ubuntu
Comment 14 William Jon McCann 2012-05-01 01:04:46 UTC
Created attachment 213156 [details] [review]
Fit three columns of search results

And center labels vertically that have no search matching text.
Comment 15 William Jon McCann 2012-05-01 01:04:49 UTC
Created attachment 213157 [details] [review]
Hide window titlebar when maximized
Comment 16 Matthias Clasen 2012-05-01 02:01:07 UTC
*** Bug 654977 has been marked as a duplicate of this bug. ***
Comment 17 Matthias Clasen 2012-05-01 02:01:44 UTC
*** Bug 657560 has been marked as a duplicate of this bug. ***
Comment 18 Matthias Clasen 2012-05-01 02:01:53 UTC
*** Bug 645461 has been marked as a duplicate of this bug. ***
Comment 19 Matthias Clasen 2012-05-01 02:02:36 UTC
Duped some bugs here which cover some of the same aspects
Comment 20 William Jon McCann 2012-05-01 17:15:05 UTC
Created attachment 213220 [details] [review]
Increase default window size

And be smarter about small screen sizes.

Based on patch from Ubuntu
Comment 21 William Jon McCann 2012-05-01 17:15:08 UTC
Created attachment 213221 [details] [review]
Add horizontal separators between sections

Based on patch from Ubuntu
Comment 22 William Jon McCann 2012-05-01 17:15:12 UTC
Created attachment 213222 [details] [review]
Fit three columns of search results

And center labels vertically that have no search matching text.
Comment 23 William Jon McCann 2012-05-01 17:15:15 UTC
Created attachment 213223 [details] [review]
Hide window titlebar when maximized
Comment 24 William Jon McCann 2012-05-01 18:11:40 UTC
Committed a slightly reworked version.
Comment 25 Florian Müllner 2012-05-01 19:59:57 UTC
Review of attachment 213223 [details] [review]:

::: shell/gnome-control-center.c
@@ +245,3 @@
   gtk_window_set_icon_name (GTK_WINDOW (priv->window),
                             priv->default_window_icon);
+  gtk_window_set_hide_titlebar_when_maximized (GTK_WINDOW (priv->window), TRUE);

Why is this in shell_show_overview_page() and not gnome_control_center_init()? Consider the following case:
 1) Open a specific panel from one of the shell menus (e.g. "Power Settings")
    => titlebar
 2) Switch to overview
    => no titlebar
 3) Switch back to the panel from 1)
    => no titlebar
Comment 26 Matthias Clasen 2012-05-01 20:11:04 UTC
I've tried these patches - in general they work nicely, but I still get a scrollbar even though the window is not full height. Maybe that is because I am using 3.4 desktop files, and still have a 3-line "Wacom Graphics Tablet" ?
Comment 27 Bastien Nocera 2012-05-02 09:40:36 UTC
Review of attachment 213222 [details] [review]:

::: shell/shell-search-renderer.c
@@ +216,3 @@
   shell_search_renderer_set_layout (SHELL_SEARCH_RENDERER (cell), widget);
 
+  pango_layout_set_width (priv->layout, PANGO_SCALE * 164);

There's still a magic number here.
Comment 28 Bastien Nocera 2012-05-02 09:48:19 UTC
Review of attachment 213220 [details] [review]:

::: shell/gnome-control-center.c
@@ +774,3 @@
+  gtk_widget_set_margin_bottom (shell->priv->main_vbox, 8);
+  gtk_widget_set_margin_left (shell->priv->main_vbox, 12);
+  gtk_widget_set_margin_right (shell->priv->main_vbox, 12);

We shouldn't really have margin changes in this patch.

@@ +1254,3 @@
   priv->default_window_icon = g_strdup (gtk_window_get_icon_name (GTK_WINDOW (priv->window)));
 
+  gtk_widget_hide (W (priv->builder, "home-button"));

I don't want that change. The notebook_switch_page_cb() function is the one that's supposed to hide the various elements depending on the notebook page.

::: shell/shell.ui
@@ +5,3 @@
   <object class="GtkWindow" id="main-window">
     <property name="title" translatable="yes">System Settings</property>
+    <property name="resizable">True</property>

Do we really need to change that?
update_small_screen_settings()'s code should be enough.
Comment 29 Bastien Nocera 2012-05-02 09:48:53 UTC
Review of attachment 213221 [details] [review]:

Looks good.
Comment 30 Bastien Nocera 2012-05-02 10:36:56 UTC
*** Bug 651572 has been marked as a duplicate of this bug. ***
Comment 31 Bastien Nocera 2012-05-02 10:42:20 UTC
(In reply to comment #26)
> I've tried these patches - in general they work nicely, but I still get a
> scrollbar even though the window is not full height. Maybe that is because I am
> using 3.4 desktop files, and still have a 3-line "Wacom Graphics Tablet" ?

No. It's because GtkIconView's sizing is broken. It will tell you its natural height is -1, not taking into account the height of any of its children (icons + labels).
Comment 32 Bastien Nocera 2012-05-02 11:14:33 UTC
(In reply to comment #31)
> (In reply to comment #26)
> > I've tried these patches - in general they work nicely, but I still get a
> > scrollbar even though the window is not full height. Maybe that is because I am
> > using 3.4 desktop files, and still have a 3-line "Wacom Graphics Tablet" ?
> 
> No. It's because GtkIconView's sizing is broken. It will tell you its natural
> height is -1, not taking into account the height of any of its children (icons
> + labels).

Filed bug 675290 about it.
Comment 33 William Jon McCann 2012-05-08 02:52:11 UTC
Created attachment 213631 [details] [review]
Increase icon size to 48px
Comment 34 William Jon McCann 2012-05-08 02:52:17 UTC
Created attachment 213632 [details] [review]
Increase default window size

And be smarter about small screen sizes.

Based on patch from Ubuntu
Comment 35 William Jon McCann 2012-05-08 02:52:20 UTC
Created attachment 213633 [details] [review]
Add horizontal separators between sections

Based on patch from Ubuntu
Comment 36 William Jon McCann 2012-05-08 02:52:24 UTC
Created attachment 213634 [details] [review]
Fit three columns of search results

And center labels vertically that have no search matching text.
Comment 37 William Jon McCann 2012-05-08 02:52:27 UTC
Created attachment 213635 [details] [review]
Hide window titlebar when maximized
Comment 38 William Jon McCann 2012-05-08 02:52:30 UTC
Created attachment 213636 [details] [review]
Use menubar style class for toolbar
Comment 39 William Jon McCann 2012-05-08 02:54:31 UTC
Still doesn't maximize properly because of bug 675242.
Comment 40 Bastien Nocera 2012-05-08 16:02:53 UTC
Comment on attachment 213632 [details] [review]
Increase default window size

Split into 2, made some changes related to sizing, as I've cleaned this up following GTK+ bug fixes in GtkIconView. Also added a FIXME.
Comment 41 Bastien Nocera 2012-05-08 16:10:17 UTC
Attachment 213631 [details] pushed as 599f19a - Increase icon size to 48px
Attachment 213633 [details] pushed as 620e701 - Add horizontal separators between sections
Attachment 213634 [details] pushed as 796d4eb - Fit three columns of search results
Attachment 213635 [details] pushed as 9c2e8c2 - Hide window titlebar when maximized
Comment 42 Bastien Nocera 2012-05-08 16:30:21 UTC
Review of attachment 213636 [details] [review]:

Bizarrely, this seems to add a 1 pixel border on each side of the scrolled window, which causes it to not be able to fit 6 items per row, which causes it to not have the correct height to fit all the items without a scrollbar.

This small hack fixes it, but I'd like Cosimo to look at the best way we can fix this.
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index 412a20e..78c9231 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -839,7 +839,7 @@ notebook_switch_page_cb (GtkNotebook               *book,
       gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->main_vbox),
                                                  FIXED_WIDTH, NULL, &nat_height);
       gtk_widget_set_size_request (priv->scrolled_window, FIXED_WIDTH,
-                                   priv->small_screen ? SMALL_SCREEN_FIXED_HEIGHT : nat_height);
+                                   priv->small_screen ? SMALL_SCREEN_FIXED_HEIGHT : nat_height + 2);
     }
   else
     {
Comment 43 Bastien Nocera 2012-05-08 17:18:10 UTC
Cosimo, is there a way to know how much space shadows will be taking when we do:
      gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->main_vbox), FIXED_WIDTH, NULL, &nat_height);
      gtk_widget_set_size_request (priv->scrolled_window, FIXED_WIDTH, nat_height);
(main_vbox is inside the scrolled_window).
Comment 44 William Jon McCann 2012-05-08 17:24:31 UTC
Unfortunately, the reworked patch doesn't allow maximizing the window in small mode.
Comment 45 Bastien Nocera 2012-05-08 17:51:35 UTC
Attachment 213636 [details] pushed as 3bc7576 - Use menubar style class for toolbar
Comment 46 Bastien Nocera 2012-05-08 17:52:52 UTC
Reopening. There's still a bug left with the maximisation not working, probably because of a race between
gtk_window_set_resizable() and gtk_window_maximize().
Comment 47 Bastien Nocera 2012-05-08 18:39:16 UTC
Maximise not working
1. Big screen
2. xrandr to small screen size
3. small screen mode but we're not maximised because of the bug in comment 46

Migrating from small to big display doesn't work anymore

Window size when unmaximising:
1. Small screen
2. Drag off the panel
3. Size should be 80% of workarea

And the FIXME in the main code.
Comment 48 Bastien Nocera 2012-05-11 13:36:39 UTC
(In reply to comment #47)
> Maximise not working
> 1. Big screen
> 2. xrandr to small screen size
> 3. small screen mode but we're not maximised because of the bug in comment 46

Filed bug 675874 with test case.
Comment 49 Bastien Nocera 2012-05-21 17:10:27 UTC
(In reply to comment #47)
> Migrating from small to big display doesn't work anymore

This should be fixed, unfortunately, bug 675874 really gets in the way.

> Window size when unmaximising:
> 1. Small screen
> 2. Drag off the panel
> 3. Size should be 80% of workarea

This seems to work alright for me, not sure whether we want a different behaviour here. Would need exact reproducer (with the size used for example).

The 80% value comes from:
http://git.gnome.org/browse/mutter/tree/src/core/window.c#n59

> And the FIXME in the main code.

Another race problem, I wanted to use gdk_screen_get_monitor_workarea() but the window manager won't have updated the values by the time we process the signal.