Merge lp:~ochosi/evince/add_toolbar_class into lp:~ubuntu-desktop/evince/ubuntu

Proposed by Simon Steinbeiß on 2016-09-11
Status: Merged
Merged at revision: 289
Proposed branch: lp:~ochosi/evince/add_toolbar_class
Merge into: lp:~ubuntu-desktop/evince/ubuntu
Diff against target: 11 lines (+1/-0)
1 file modified
debian/patches/unity_normal_titlebar.patch (+1/-0)
To merge this branch: bzr merge lp:~ochosi/evince/add_toolbar_class
Reviewer Review Type Date Requested Status
Sebastien Bacher 2016-09-12 Pending
Jeremy Bicha 2016-09-11 Pending
Iain Lane 2016-09-11 Pending
Review via email: mp+305423@code.launchpad.net

Description of the Change

In this trivial commit I propose to add the "toolbar" class to the headerbar CSS node if it is not used as a titlebar, i.e. outside of gnome-shell. This enables Gtk+ theme creators to identify/match the headerbar in this case with a CSS rule and make it visually resemble a traditional toolbar instead of having e.g. rounded corners (which would make sense, were it a window decoration).

Example code for Greybird to dramatically improve the look of Evince:
headerbar.toolbar {
  border-top-style: none;
}

Note that this is not dummy code, but has been tested with Gtk+ Inspector.

The main reason for proposing this is because currently not all applications in the Ubuntu repositories have consistent behavior: some have the CSD patched out (like Evince), some don't. If all applications had either CSD or not, there would be no need for this.

To post a comment you must log in.
Simon Steinbeiß (ochosi) wrote :

Final note: I have discussed this with Laney before on IRC, and if this patch/strategy gets accepted I will try to add similar patches to other NO-CSD applications to at least improve visual consistency.

Sebastien Bacher (seb128) wrote :

hum, the patch was invalid formatted ... note for next time, you can't just add a line to a patch, you need to change the @@ lines summaries ;-)

anyway I fixed it and uploaded, thanks!

Simon Steinbeiß (ochosi) wrote :

Crap, of course. Sorry for the sloppiness... I'll take more time to review my own stuff next time.

Thanks for fixing and merging it anyway!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/patches/unity_normal_titlebar.patch'
2--- debian/patches/unity_normal_titlebar.patch 2015-10-27 09:59:51 +0000
3+++ debian/patches/unity_normal_titlebar.patch 2016-09-11 21:43:03 +0000
4@@ -14,6 +14,7 @@
5 + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "GNOME")) {
6 + gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (ev_window->priv->toolbar), TRUE);
7 + gtk_window_set_titlebar (GTK_WINDOW (ev_window), ev_window->priv->toolbar);
8++ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (ev_window->priv->toolbar)), "toolbar");
9 + }
10 + else {
11 + gtk_box_pack_start (GTK_BOX (ev_window->priv->main_box),

Subscribers

People subscribed via source and target branches