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 736165 - gnome style UI
gnome style UI
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: ux
0.7.x
Other Linux
: Normal enhancement
: 0.10.0
Assigned To: Geary Maintainers
Geary Maintainers
review
: 737074 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-09-05 22:47 UTC by Simon Bernard
Modified: 2014-11-11 23:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
geary after ui modification (170.30 KB, image/png)
2014-09-05 22:47 UTC, Simon Bernard
  Details
geary before ui modification (157.54 KB, image/png)
2014-09-05 22:49 UTC, Simon Bernard
  Details
patch for this bug (2.80 KB, patch)
2014-09-05 23:31 UTC, Simon Bernard
none Details | Review
a better patch for this bug (3.09 KB, patch)
2014-09-08 13:10 UTC, Simon Bernard
needs-work Details | Review
Screenshot (188.40 KB, image/png)
2014-09-16 04:59 UTC, Robert Schroll
  Details
geary ui modification (gnome 3.14) (120.27 KB, image/png)
2014-09-26 10:16 UTC, Simon Bernard
  Details
Borderless GtkFrames (40.08 KB, image/png)
2014-10-27 14:09 UTC, Georges Basile Stavracas Neto
  Details
Borderless GtkFrame patch (1.88 KB, patch)
2014-10-28 21:30 UTC, Georges Basile Stavracas Neto
needs-work Details | Review
Screenshot w/ patch applied (43.98 KB, image/png)
2014-10-29 00:44 UTC, Jim Nelson
  Details
Borderless GtkFrame patch (1.90 KB, patch)
2014-10-29 01:06 UTC, Georges Basile Stavracas Neto
none Details | Review
Borderless GtkFrame (dynamic selection) (2.73 KB, patch)
2014-10-29 10:46 UTC, Georges Basile Stavracas Neto
none Details | Review
Borderless GtkFrame (2.59 KB, patch)
2014-10-30 01:45 UTC, Georges Basile Stavracas Neto
none Details | Review
Borderless GtkFrames (2.59 KB, patch)
2014-10-30 01:48 UTC, Georges Basile Stavracas Neto
none Details | Review

Description Simon Bernard 2014-09-05 22:47:56 UTC
Created attachment 285535 [details]
geary after ui modification

I propose to change a little bit the geary UI to be clearer and be like others gnome application.

I try to have the same look than file (nautilus).
Comment 1 Simon Bernard 2014-09-05 22:49:20 UTC
Created attachment 285536 [details]
geary before ui modification

I add another screenshot to be able to compare
Comment 2 Jim Nelson 2014-09-05 23:01:19 UTC
It looks to me you're proposing (a) to put a slight border on the inside of the folder list and the conversation list, (b) removing the status bar at the bottom of the folder list, and (c) adding a grip between the conversation list and the conversation viewer.  Is there anything else I'm missing?
Comment 3 Simon Bernard 2014-09-05 23:31:50 UTC
Created attachment 285540 [details] [review]
patch for this bug

In fact, I just think about changing some CSS stuff. Here is a patch.
(Maybe this is not the best way to do that, I'm a beginner in vala/GTK application)
Comment 4 Simon Bernard 2014-09-06 08:40:50 UTC
There are some problems with my patch when we use gnome dark theme.
I will search a more elegant way to do that.(by limiting the use of color constants)
Maybe I should remove some GtkFrame instead of hiding their border.
Comment 5 Simon Bernard 2014-09-08 13:10:08 UTC
Created attachment 285646 [details] [review]
a better patch for this bug

I remove some frames and use @define color of Adwaita theme.
The code is clearer and it works well with dark theme.

I see the use of "sidebar-pane-separator" class (line 195 in main.windows.vala), I can't find it's purpose.
Comment 6 Simon Bernard 2014-09-12 17:05:27 UTC
Do not hesitate to tell me if I'm totally in a wrong way.
Comment 7 Robert Schroll 2014-09-16 04:59:17 UTC
Created attachment 286257 [details]
Screenshot

I've added the "review" comment to the whiteboard, which we use to note bugs with patches.

When I run with this patch, the only difference I notice is that the resize handle between the conversation list and the conversation view is different: the background is no longer a different color, but there is a series of dots in the middle.  I've attached a screenshot demonstrating what I see.
Comment 8 Simon Bernard 2014-09-16 10:07:25 UTC
I never test it on ubuntu, so with ubuntu theme. (I'm on Debian testing)

I just remove the frame of folder_pane and viewer_pane to remove border.
I remove top and bottom border of conversation frame too. I let the right and left border to have the same look than nautilus.
(https://developer.gnome.org/gtk3/stable/GtkFrame.html)

And I try to make the UI lighter by using same color for handle and folder list, handle and conversation viewer.
https://developer.gnome.org/gtk3/stable/GtkPaned.html
Like nautilus http://lh3.ggpht.com/-2T9cGXLFnC8/UzKTUp0GevI/AAAAAAABU78/UqVMDpgbndk/s1200/nautilus-312.jpg
So I use constants of Adwaita theme for folder_pane. (@sidebar_bg)
And the color defined in the geary CSS for conversation viewer.

On ubuntu, it seems frame as no border, so my first modification is not visible.
I don't understand why status bar and folder_list have not the same color, I suppose ubuntu theme does not define the class SIDEBAR.
https://developer.gnome.org/gtk3/stable/GtkStyleContext.html#GTK-STYLE-CLASS-SIDEBAR:CAPS
I also don't understand why the handler is different, just the color must be changed. :(


(I don't see in nautilus sourcecode reference of @sidebar_bg, I can not find how they do exactly to have the handle of gtkpaned with the color of sidebar background.
https://git.gnome.org/browse/nautilus/tree/src/nautilus-window.c#n849)
Comment 9 Robert Schroll 2014-09-23 01:31:00 UTC
Jim, can you take a look at this?  I've been thinking about bug #714793, and it's going to hit the same bits of code.
Comment 10 Jim Nelson 2014-09-25 22:13:16 UTC
Review of attachment 285646 [details] [review]:

Simon, thanks for your patience, I've been dog-paddling this month.

This does clean up the window a bit, so I appreciate where you're going with this.  I'm running Adwaita and I see this:

* The status bar at the bottom of the folder list no longer has any color differentiation (background color) and has no border.  The problem is when the user expands their folder list (assuming they have a lot of folders).  The list will look "cut off" at the bottom.  With the color differentiation, it's a clue to the eye as to what's going on there.

Now, there's some discussion at bug #714793 that will introduce some changes to the status bar, so perhaps that should be taken into consideration here.

* As Robert mentioned, the grips for the Paned between the conversation list and conversation viewer are hidden until the user mouses over them, and then only the grips appear.  They're doing that in Nautilus, and I'm okay with it.  It does remove some chrome from the screen, which is nice.

I, for one, wouldn't mind if Geary's sidebar looked more like the sidebar in Nautilus, but we do have a few different things going on here (the status bar, the GtkTreeView) and so we need to respect that.  Maybe Robert has some ideas about how the status bar question, or perhaps we should hold off on that until Robert's done with his patch.  But I would be interested in getting the Geary sidebar the same color as the conversation list; knowing the mountain of issues with GtkTreeView (we've had CSS theming problems with it in the past), it might be more tricky than it would seem.
Comment 11 Jim Nelson 2014-09-25 22:15:12 UTC
*** Bug 737074 has been marked as a duplicate of this bug. ***
Comment 12 Jim Nelson 2014-09-25 22:16:08 UTC
Bug #737074 reports some double-borders in Geary.  I believe Simon's patch solves this issue.
Comment 13 Robert Schroll 2014-09-26 05:07:32 UTC
(In reply to comment #10)
> * As Robert mentioned, the grips for the Paned between the conversation list
> and conversation viewer are hidden until the user mouses over them, and then
> only the grips appear.  They're doing that in Nautilus, and I'm okay with it. 
> It does remove some chrome from the screen, which is nice.

That's not actually what I'm seeing.  With this patch, the two separators have a different appearance.  The left one is light gray with no grips (as it was before) and the right one is darker gray (or perhaps transparent -- it's the same color as the background of the conversation view) with grips.  Grips or no grips, I don't really care; but they should be the same.
Comment 14 Simon Bernard 2014-09-26 10:16:05 UTC
Created attachment 287141 [details]
geary ui modification (gnome 3.14)

I really don't know why left panel has no grips and the right panel has one with the ubuntu theme oO.

I'm just testing gnome 3.14 and they made lot of changes on Adwaita theme.
The grips between GtkPaned is no more. There just a one pixel line.
http://3.bp.blogspot.com/-of_zsCN9ef8/VCO7gUiTszI/AAAAAAABh24/tJRFn15SfBk/s1600/gnome_3-14-nautilus.jpg
So If you aim gnome 3.14 the patch should just be removing the 3 frame (folder,conversion list, conversation viewer) (see attachment)

In this case, the background color change of GtkPaned is not more needed, maybe this will avoid the strange behavior with ubuntu theme.

But there're still have the problem about status bar. (for me it's not a blocking one, but I agree this should be better if the status bar was displayed only when necessary like the nautilus one)
http://askubuntu.com/questions/286430/nautilus-3-6-doesnt-have-a-status-bar/289361#289361
Comment 15 Georges Basile Stavracas Neto 2014-10-27 14:09:30 UTC
Created attachment 289412 [details]
Borderless GtkFrames

I played a bit with GtkInspector and I got to the point of the screenshot attached.

Steps:

1) completely remove the borders from ConverSationListView's parent GtkFrame.
2) remove all but bottom border from FolderListTree's parent GtkFrame.

Magic is done and it get's really really awsome.
Comment 16 Jim Nelson 2014-10-28 21:15:40 UTC
That looks pretty clean!  Do you have a patch?
Comment 17 Georges Basile Stavracas Neto 2014-10-28 21:30:36 UTC
Created attachment 289552 [details] [review]
Borderless GtkFrame patch

Sure, here it goes. It respects the theme's border's width.
Comment 18 Jim Nelson 2014-10-29 00:41:59 UTC
Review of attachment 289552 [details] [review]:

This still doesn't look right to me.  I don't get fine lines, I get blankness in the UI.  I tried it under 14.04, 14.10, and F21 w/ Adwaita.

What distro and theme are you using?  Have you customized the theme in some way?
Comment 19 Jim Nelson 2014-10-29 00:44:25 UTC
Created attachment 289558 [details]
Screenshot w/ patch applied
Comment 20 Georges Basile Stavracas Neto 2014-10-29 00:50:42 UTC
I'm using Arch Linux with GNOME 3.14, and my theme is not modified.

With Gtk+ 3.14, Gtk.Paned has a 1px line (at leat with Adwaita). I think it
won't work with Ubuntu's theme and/or Gtk+ 3.12.
Comment 21 Jim Nelson 2014-10-29 00:51:50 UTC
Whoops, I take some of that back.  I didn't apply the patch properly under F21.  Now that I have, it looks more like your screenshot.  It may be that these changes only work well under GTK+ 3.14 (as your last response guesses).

The problem with that is, the next version of Geary (0.10) needs to work under Utopic, which is at 3.12 (and even then, with some theme issues of its own; don't get me started).

Is it possible for you to try tweaking these changes so they work under 3.12 and up?  If not, we'll have to think of something else.
Comment 22 Georges Basile Stavracas Neto 2014-10-29 01:06:48 UTC
Created attachment 289559 [details] [review]
Borderless GtkFrame patch

Sure, here it goes.

I reinforce that this patch is made specially for Gtk+ 3.12.

IMHO, an option would be generating 2 CSS files, for 3.12 & 3.14, and Geary loads them at runtime. But I don't know if all this mess is worth the effort.
Comment 23 Georges Basile Stavracas Neto 2014-10-29 10:46:26 UTC
Created attachment 289574 [details] [review]
Borderless GtkFrame (dynamic selection)

So, here it goes again.

This patch is ugly, very ugly, and I really don't know if it fits Yorba's high coding standards. Anyway, it surely may be used as base for future work, as it works for both Gtk+ 3.14 & 3.12.
Comment 24 Robert Schroll 2014-10-29 20:37:15 UTC
This patch seems to work fine for me (3.10, Ambiance theme), for whatever that's worth.

A few thoughts on the patch itself:

- If we're testing the minor version number, we should also test the major version.  We don't want the old code reactivated when GTK goes to 4.0.  (Obviously we'd plan to take the test out before then, but things don't always go to plan.)

- Can the CSS statements for the different versions be combined?  For instance,
    .conversation_frame {
        border-top-width: 0px;
        border-bottom-width: 0px;
        border-width: 0px;
    }
With HTML, unknown CSS statements will be ignored.  If GTK behaves the same way, it may be possible to avoid the explicit version check.
Comment 25 Georges Basile Stavracas Neto 2014-10-30 01:45:34 UTC
Created attachment 289620 [details] [review]
Borderless GtkFrame

Right, this was the minimum code I've been able to reach. I hope it's enought.
Comment 26 Georges Basile Stavracas Neto 2014-10-30 01:48:18 UTC
Created attachment 289621 [details] [review]
Borderless GtkFrames

Forget my last patch, it doesn't work as expected. Resolved with this one (I hope so).
Comment 27 Jim Nelson 2014-11-11 23:31:22 UTC
Thanks for your diligence!

Pushed to master, commit 01355a