Merge lp:~niclasl/midori/granite-fixes into lp:midori

Proposed by Niclas Lockner
Status: Merged
Approved by: Cris Dywan
Approved revision: 6547
Merged at revision: 6634
Proposed branch: lp:~niclasl/midori/granite-fixes
Merge into: lp:midori
Diff against target: 20 lines (+2/-1)
1 file modified
midori/midori-notebook.vala (+2/-1)
To merge this branch: bzr merge lp:~niclasl/midori/granite-fixes
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Danielle Foré (community) Approve
David Gomes (community) Approve
Review via email: mp+202710@code.launchpad.net

Commit message

Mimic the look of Granite.DynamicNotebook when compiled with --enable-granite.

Description of the change

Mimic the look of Granite.DynamicNotebook when compiled with --enable-granite.

To post a comment you must log in.
Revision history for this message
Niclas Lockner (niclasl) wrote :
Revision history for this message
Cris Dywan (kalikiana) wrote :

The first two hunks should just be without the #if.

> list-add-symbolic
looks very suspicious to me. It's rather clearly for lists isn't it?

> render_activity
What's this meant to do? GTK+ docs say it renders like a spinner or progress. But we have a Spinner, just like DynamicNotebook. I genuinely don't know if this makes sense or not.

review: Needs Information
Revision history for this message
David Gomes (davidgomes) wrote :

It works and the code is fine. http://i.imgur.com/MkLlDgY.png

Note that I'm not changing the Status to Approved as I'm not a Midori dev.

review: Approve
Revision history for this message
Niclas Lockner (niclasl) wrote :

Granite's DynamicNotebook uses list-add-symbolic for its icon. The add button gets the "wrong" icon (only on Luna and not Isis for some reason) without it.

I'm not sure why render_activity is needed, and it looks hacky, but without it the background isn't drawn (but only if configured for granite). It's this call that makes the background silver and not black.

Revision history for this message
Niclas Lockner (niclasl) wrote :

I should add that I copy-pasted render_activity from Granite's Notebook.

Revision history for this message
Cris Dywan (kalikiana) wrote :

You say "without [render_activity] the background isn't drawn (but only if configured for granite)". Is this depending on the dynamic-notebook class in this branch? May be a bug in the theme then.

review: Needs Information
Revision history for this message
Niclas Lockner (niclasl) wrote :

No it happens regardless of whether dynamic-notebook is used or not, but it seems render_activity is only needed if Elementary's theme is used. If I switch to Ambiance it works just fine without it. So maybe it is a bug in the theme? I don't know.
Sorry for the delay.

Revision history for this message
Danielle Foré (danrabbit) wrote :

I've changed the icon in the elementary theme so that we can stick to "tab-new-symbolic". This doesn't need an if.

Also, Gtk.Notebook now draws a background behind the tabbar and eGtk has been updated for this. So I think we can remove code that was intended to duplicate that feature of Dynamic Notebook.

review: Needs Fixing
lp:~niclasl/midori/granite-fixes updated
6544. By Niclas Lockner

Center-align the tab label

6545. By Niclas Lockner

Do not use list-add-symbolic

6546. By Niclas Lockner

Do not call render_activity when drawing

6547. By Niclas Lockner

Always add the dynamic-notebook class

Revision history for this message
Niclas Lockner (niclasl) wrote :

"The first two hunks should just be without the #if."

Done. Now the label is always center-aligned, and the dynamic-notebook class is always added.

"I've changed the icon in the elementary theme so that we can stick to "tab-new-symbolic". This doesn't need an if."

if removed.

"Also, Gtk.Notebook now draws a background behind the tabbar and eGtk has been updated for this. So I think we can remove code that was intended to duplicate that feature of Dynamic Notebook."

Great! I removed the render_activity call.

The branch is now ready for another review.

Revision history for this message
Danielle Foré (danrabbit) wrote :

Looks great :)

review: Approve
Revision history for this message
Cris Dywan (kalikiana) wrote :

Thanks a lot!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-notebook.vala'
2--- midori/midori-notebook.vala 2014-03-16 11:29:11 +0000
3+++ midori/midori-notebook.vala 2014-03-21 18:53:20 +0000
4@@ -36,7 +36,7 @@
5 spinner.set_size_request (icon_size, icon_size);
6 box.pack_start (spinner, false, false, 0);
7 label = new Gtk.Label (null);
8- label.set_alignment (0.0f, 0.5f);
9+ label.set_alignment (0.5f, 0.5f);
10 label.set_padding (0, 0);
11 box.pack_start (label, true, true, 0);
12 close = new Gtk.Button ();
13@@ -207,6 +207,7 @@
14 notebook.show_border = false;
15 notebook.set ("group-name", PACKAGE_NAME);
16 add (notebook);
17+ get_style_context ().add_class ("dynamic-notebook");
18
19 #if !HAVE_GTK3
20 /* Remove the inner border between scrollbars and window border */

Subscribers

People subscribed via source and target branches

to all changes: