Merge lp:~xapantu/granite/fix-957349 into lp:~elementary-pantheon/granite/granite

Proposed by xapantu
Status: Merged
Merged at revision: 210
Proposed branch: lp:~xapantu/granite/fix-957349
Merge into: lp:~elementary-pantheon/granite/granite
Diff against target: 31 lines (+10/-1)
1 file modified
lib/Widgets/DynamicNotebook.vala (+10/-1)
To merge this branch: bzr merge lp:~xapantu/granite/fix-957349
Reviewer Review Type Date Requested Status
Victor Martinez (community) Approve
Review via email: mp+98475@code.launchpad.net

Description of the change

Fix bug #957349: add a property for tab overlap

To post a comment you must log in.
Revision history for this message
Victor Martinez (victored) wrote :

This is fine. Although I think it would be better if you did ALL the theming through the DynamicNotebook widget, since eventually it will be seen as a single widget by theme makers.

So -GraniteWidgetsDynamicNotebook-tab-overlap is desirable in order to follow the standard approach :)

review: Needs Fixing
Revision history for this message
xapantu (xapantu) wrote :

I don't like this idea, what if I want to use the tab bar as a
standalone widget? e.g. if I don't want the tabs to be stuck to the
notebook.
Le mercredi 21 mars 2012 à 05:03 +0000, Victor Eduardo a écrit :
> Review: Needs Fixing
>
> This is fine. Although I think it would be better if you did ALL the theming through the DynamicNotebook widget, since eventually it will be seen as a single widget by theme makers.
>
> So -GraniteWidgetsDynamicNotebook-tab-overlap is desirable in order to follow the standard approach :)

Revision history for this message
Victor Martinez (victored) wrote :

I only suggested that because Granite.Widgets.Tabs is an internal class, and thus no one can re-utilize the tabs at the moment. Besides, it won't appear in the documentation.

I'm not suggesting the removal of the current code. Just asking you to mirror the property in the DynamicNotebook widget, since you can set the tab-overlap property from there.

Thank you for your awesome work :)

Revision history for this message
Victor Martinez (victored) wrote :

Although we do need that property in the DynamicNotebook widget, there's nothing wrong with the code here, and then this shouldn't be on hold.

review: Approve
Revision history for this message
Victor Martinez (victored) wrote :

The close button in the active tab is misaligned. I hope you can fix that in trunk later :)

Revision history for this message
xapantu (xapantu) wrote :

Ah, yes, I saw that yesterday, it must be caused by a cast from double
to int or something like that, because here it is only 1-2 px. But yeah,
I'll fix it later :)

Le 26/03/2012 05:44, Victor Eduardo a écrit :
> The close button in the active tab is misaligned. I hope you can fix that in trunk later :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/Widgets/DynamicNotebook.vala'
2--- lib/Widgets/DynamicNotebook.vala 2012-03-19 18:39:32 +0000
3+++ lib/Widgets/DynamicNotebook.vala 2012-03-20 18:28:19 +0000
4@@ -118,7 +118,7 @@
5 const double max_width = 200;
6 const double min_width = 120;
7 double width = max_width;
8- const double overlap = 3;
9+ protected double overlap = 3;
10 const int close_size = 16;
11 const double close_margin = 1;
12 const double y = 5;
13@@ -157,9 +157,18 @@
14
15 public signal void switch_page (Tab tab);
16 public signal void page_removed (Tab tab);
17+
18+ static construct {
19+ install_style_property (new GLib.ParamSpecDouble ("tab-overlap",
20+ "Tab overlap",
21+ "Tab overlap",
22+ 0, 50, 3,
23+ ParamFlags.READABLE));
24+ }
25
26 public Tabs () {
27 tabs = new Gee.ArrayList<Tab>();
28+ style_get ("tab-overlap", out overlap, null);
29
30 if (style_provider == null) {
31 style_provider = new Gtk.CssProvider ();

Subscribers

People subscribed via source and target branches