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 707920 - notebook tab style improvements
notebook tab style improvements
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 643914 691163
Blocks:
 
 
Reported: 2013-09-11 15:41 UTC by William Jon McCann
Modified: 2013-10-02 15:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
demo: Show popup menu on tabs (811 bytes, patch)
2013-09-11 15:43 UTC, William Jon McCann
committed Details | Review
notebook: Remove gap from notebook tabs (5.06 KB, patch)
2013-09-11 15:43 UTC, William Jon McCann
needs-work Details | Review
notebook: Use initial-gap on both edges of the tab header (1.49 KB, patch)
2013-09-11 15:43 UTC, William Jon McCann
committed Details | Review
notebook: Improve the style of the default arrows (2.78 KB, patch)
2013-09-11 15:43 UTC, William Jon McCann
committed Details | Review
notebook: Make notebook scroll arrows honor initial gap setting (3.96 KB, patch)
2013-09-11 15:43 UTC, William Jon McCann
needs-work Details | Review
notebook: Fix rounding error in vertical alignment of arrow (1.07 KB, patch)
2013-09-11 15:43 UTC, William Jon McCann
committed Details | Review
notebook: Add a style property for whether to draw a tab gap (5.92 KB, patch)
2013-09-30 23:04 UTC, William Jon McCann
committed Details | Review
notebook: Make notebook scroll arrows honor initial gap setting (3.67 KB, patch)
2013-10-01 00:19 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2013-09-11 15:41:24 UTC
We've been discussing and iterating for months if not years on various ways to improve the style of our notebook tabs. Over the course of the summer we converged on an approach that makes the tabs less visually prominent.

While it may be advantageous in the longer run to add a new widget to drive a GtkStack instead of using notebooks I think it makes sense to make an improvement to the existing uses as well.

We still have some work to do on the theme side but I think the changes required to the notebook are relatively small and are ready for review.
Comment 1 William Jon McCann 2013-09-11 15:43:12 UTC
Created attachment 254699 [details] [review]
demo: Show popup menu on tabs
Comment 2 William Jon McCann 2013-09-11 15:43:15 UTC
Created attachment 254700 [details] [review]
notebook: Remove gap from notebook tabs
Comment 3 William Jon McCann 2013-09-11 15:43:18 UTC
Created attachment 254701 [details] [review]
notebook: Use initial-gap on both edges of the tab header
Comment 4 William Jon McCann 2013-09-11 15:43:20 UTC
Created attachment 254702 [details] [review]
notebook: Improve the style of the default arrows
Comment 5 William Jon McCann 2013-09-11 15:43:24 UTC
Created attachment 254703 [details] [review]
notebook: Make notebook scroll arrows honor initial gap setting

So that they can be styled so they are not right on the edge.
Comment 6 William Jon McCann 2013-09-11 15:43:27 UTC
Created attachment 254704 [details] [review]
notebook: Fix rounding error in vertical alignment of arrow
Comment 7 William Jon McCann 2013-09-11 15:44:32 UTC
These patches depend on the patches in bug 643914 and bug 691163.
Comment 8 Matthias Clasen 2013-09-26 22:12:45 UTC
Review of attachment 254699 [details] [review]:

sure
Comment 9 Matthias Clasen 2013-09-26 22:32:37 UTC
Review of attachment 254702 [details] [review]:

ok
Comment 10 Matthias Clasen 2013-09-26 22:49:35 UTC
Review of attachment 254700 [details] [review]:

This is going to break existing themes.
I'd prefer to just change the default render_extension implementation.
Comment 11 Matthias Clasen 2013-09-26 22:51:15 UTC
Review of attachment 254701 [details] [review]:

Looks harmless enough
Comment 12 Matthias Clasen 2013-09-26 22:59:17 UTC
Review of attachment 254703 [details] [review]:

I'm not entirely convinced that you got number fiddling right here. When I played with this, setting initial-gap to 30, I had the impression that the left arrow was placed as expected, but for the right arrow, I had a big gap before and after the arrow.
Comment 13 Matthias Clasen 2013-09-26 23:02:49 UTC
Review of attachment 254704 [details] [review]:

ok
Comment 14 William Jon McCann 2013-09-27 17:39:14 UTC
(In reply to comment #10)
> Review of attachment 254700 [details] [review]:
> 
> This is going to break existing themes.
> I'd prefer to just change the default render_extension implementation.

If I modify the theme to remove the render_extension method and change the default render_extension to not hide sides then the only remaining problem is that gtk_notebook_paint hardcodes gtk_render_frame_gap. Which will need to be gtk_render_frame for the new design. It seems to me that we could either: a) defer that decision to the theme b) be able to know if the theme needs a gap.
Comment 15 William Jon McCann 2013-09-30 23:04:06 UTC
Created attachment 256147 [details] [review]
notebook: Add a style property for whether to draw a tab gap

Add a has-tab-gap style property to GtkNotebook so that we can
disable drawing the gap between tabs and the page in the Adwaita
theme without breaking existing themes.
Comment 16 William Jon McCann 2013-10-01 00:19:50 UTC
Created attachment 256150 [details] [review]
notebook: Make notebook scroll arrows honor initial gap setting

So that they can be styled so they are not right on the edge.
Comment 17 Matthias Clasen 2013-10-01 02:40:50 UTC
Review of attachment 256147 [details] [review]:

With this version of the patch, the old adwaita style tabs continue to work as expected. So, +1 for that.
I think the description of the has-gap property is maybe a little misleading - it is not just about the gap,
it is about the entire tab rendering being switched from gtk_render_extension to gtk_render_background + frame.
Comment 18 Matthias Clasen 2013-10-01 02:42:01 UTC
Review of attachment 256150 [details] [review]:

Not sure what you've changed here, but in my test with this, both arrows now get the same spacing towards the outside, and the same (small) spacing towards the tabs. +1
Comment 19 Matthias Clasen 2013-10-01 02:42:10 UTC
Review of attachment 256150 [details] [review]:

Not sure what you've changed here, but in my test with this, both arrows now get the same spacing towards the outside, and the same (small) spacing towards the tabs. +1
Comment 20 William Jon McCann 2013-10-02 15:09:22 UTC
Attachment 254699 [details] pushed as 2bb01c6 - demo: Show popup menu on tabs
Attachment 254701 [details] pushed as 81b0808 - notebook: Use initial-gap on both edges of the tab header
Attachment 254702 [details] pushed as 8dd100d - notebook: Improve the style of the default arrows
Attachment 254704 [details] pushed as b609377 - notebook: Fix rounding error in vertical alignment of arrow
Attachment 256147 [details] pushed as e9b9fd2 - notebook: Add a style property for whether to draw a tab gap
Attachment 256150 [details] pushed as e07fec3 - notebook: Make notebook scroll arrows honor initial gap setting