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 325282 - Add GtkNotebook::tab-overlap style property
Add GtkNotebook::tab-overlap style property
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-12-30 09:22 UTC by Alexander Nedotsukov
Modified: 2006-05-10 14:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch against HEAD (7.38 KB, patch)
2005-12-30 09:24 UTC, Alexander Nedotsukov
none Details | Review
Proposed patch against 2.8.9 sources (7.18 KB, patch)
2005-12-30 09:25 UTC, Alexander Nedotsukov
none Details | Review
Proposed patch against HEAD (9.22 KB, patch)
2006-01-07 10:10 UTC, Alexander Nedotsukov
none Details | Review
Patch that adds arrow-size and arrow-spacing style properties (10.21 KB, patch)
2006-03-24 14:34 UTC, Michael Natterer
none Details | Review
Alternative version of arrow size style properties (12.82 KB, patch)
2006-03-29 16:18 UTC, Michael Natterer
none Details | Review
Updated alternate version after CVS conflict (10.35 KB, patch)
2006-05-09 11:07 UTC, Michael Natterer
none Details | Review

Description Alexander Nedotsukov 2005-12-30 09:22:54 UTC
ATM. We have hardcoded 2px for tab overlap. I can see a number of (at least) pixmap themes which try to overcome this. From my point of view this can be done nicely in GTK itself.
Comment 1 Alexander Nedotsukov 2005-12-30 09:24:01 UTC
Created attachment 56539 [details] [review]
Proposed patch against HEAD
Comment 2 Alexander Nedotsukov 2005-12-30 09:25:05 UTC
Created attachment 56540 [details] [review]
Proposed patch against 2.8.9 sources
Comment 3 Matthias Clasen 2005-12-31 02:24:22 UTC
I believe the maemo people also want some new themability for notebooks.
Comment 5 Alexander Nedotsukov 2005-12-31 03:03:58 UTC
Well :-) It's nice to see I am not alone. Any chance something like this will be commited soon?
Note1: I personally will be really happy if this come into -stable branch too.
Note2: Maemo people do not allow negative tab-overlap but I do not see reason for this restriction.
Comment 6 Matthias Clasen 2005-12-31 03:14:17 UTC
Don't expect to see this in the stable branch. Its for bugfixes, not new features.
Comment 7 Alexander Nedotsukov 2006-01-01 10:22:33 UTC
Just another though after second look at maemo patch. For me it's wrong to split ARROW_SIZE into two properties (width + height). There is GtkRequisition type which fits well here. Please let me know if it worth to come up with reworked maemo patch.
Comment 8 Michael Natterer 2006-01-04 15:57:27 UTC
I don't think that using GtkRequisition for arrow width/height is a good idea.
The only thing it would change is that gtkrc writers would have to use
unusual syntax, and the code would look like

blah = arrow_requisition.width

instead of just

blah = arrow_width

Apart from that, the directory matthias linked to is just a random
(albeit ver useful) collection of patches that don't neccessarily
reflect the real diff between upstream and maemo gtk.

For the definite "reference" diff between the two versions, look at
the upstream contribution progress page in the maemo wiki:

http://maemo.org/maemowiki/MaemoGtk26Contributions
Comment 9 Michael Natterer 2006-01-04 16:41:44 UTC
I forgot, it would of course be appreciated of you could come up
with a patch factored out of the maemo diff. Just containing
the added style properties, not the changed default values and
other stuff that was changed in maemo's GtkNotebook.
Comment 10 Alexander Nedotsukov 2006-01-07 10:04:18 UTC
(In reply to comment #8)
> I don't think that using GtkRequisition for arrow width/height is a good idea.
> The only thing it would change is that gtkrc writers would have to use
> unusual syntax, and the code would look like
Okay. This probably a matter of personal taste. Just for the record I personally prefer:

GtkBliahBliah::bliah-size = { w, h }
rather than:
GtkBliahBliah::bliah-width = w
GtkBliahBliah::bliah-height = h

(ofcourse bliah-size sematics must form single entity like in our case)
Also I checked gtk+ sources first and found GtkOptionMenu::indicator-size property which made me believe what I said is true for gtk too.
Comment 11 Alexander Nedotsukov 2006-01-07 10:10:27 UTC
Created attachment 56911 [details] [review]
Proposed patch against HEAD

This patch includes tab-overlap and tab-curvature properties. I hold off arrow geometry for now.
Comment 12 Michael Natterer 2006-01-10 12:25:55 UTC
Ah, I missed GtkOptionMenu::indicator-size. Of course it's "cleaner"
to encapsulate the size in a struct, but I thought using GtkRequisition
would be something new (in this context).

Matthias, what do you think about that? I tend to say "go for
GtkRequisition" in the meantime.
Comment 13 Matthias Clasen 2006-01-11 05:53:04 UTC
if there is precendent, then sure, go for requision. 
Comment 14 Tim Janik 2006-01-12 15:13:37 UTC
the patch looks very good to me. i think it can be applied in its current form and the arrow stuff be submitted deperately.
the only thing that is missing is a "Since 2.10" comment in the property docs.
Comment 15 Matthias Clasen 2006-01-12 21:34:09 UTC
Ok, applied the patch with slight cleanups and "Since 2.10".

I wonder about the tab-curvature thing though. With the default theme, all it does is making the notebook larger. Do we need to patch the default theme to pay attention to it ?
Comment 16 Tim Janik 2006-01-16 16:44:35 UTC
sorry matthias, i can't read from the patch what you're saying.
it just changes what was previously TAB_CURVATURE to DEFAULT_TAB_CURVATURE + a configurable style property and does preserve the exact numbers, same for TAB_OVERLAP.
so with the patch, the default theme (and every other theme) should look exactly the same as before, unless you create an rcfile that changes GtkNoetebook::tab-curvature or GtkNotebook::tab-overlap.
Comment 17 Matthias Clasen 2006-01-16 16:57:40 UTC
Hmm, maybe my comment was too terse. What I was trying to say is:

If I change the value of the newly added tab-curvature to e.g. 10, it
doesn't seem to draw any more curves, it just makes the notebook larger.

Of course, with the default value, everything is as before...
Comment 18 Michael Natterer 2006-03-24 13:20:58 UTC
Alexander, did you do any more patches for this?
Comment 19 Michael Natterer 2006-03-24 14:34:27 UTC
Created attachment 61917 [details] [review]
Patch that adds arrow-size and arrow-spacing style properties

Anyway, I went ahead and did the patch now.
Comment 20 Matthias Clasen 2006-03-24 21:40:26 UTC
Small typo in the documentation for arrow-spacing, other than  
that it looks reasonable to me.
Comment 21 Alexander Nedotsukov 2006-03-27 05:59:47 UTC
Mcihael, it's great you did it anyway. I am do not have enough spare time those days to finish this work. I stuck in attempt to emproove arrows yet more. To let them look more like a buttons (or better to say steppers in GtkRange class).
Comment 22 Michael Natterer 2006-03-29 16:18:38 UTC
Created attachment 62305 [details] [review]
Alternative version of arrow size style properties

After some discussion with Tim, we came up with a solution that ditches
GtkRequisition, and instead adds two integer style properties to
GtkWidget, scroll-arrow-hlength and scroll-arrow-vlength, which are
used to specify the *length* of horizontal *or* vertical arrows (they
are not used together). Implementing varying aspect ratio is left to
theme engines.

I guess this needs more discussion, at least I don't feel really
happy with any of both versions...
Comment 23 Michael Natterer 2006-05-09 11:07:48 UTC
Created attachment 65076 [details] [review]
Updated alternate version after CVS conflict
Comment 24 Tim Janik 2006-05-10 14:03:11 UTC
patch is applied to HEAD now.