GNOME Bugzilla – Bug 325282
Add GtkNotebook::tab-overlap style property
Last modified: 2006-05-10 14:03:11 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.
Created attachment 56539 [details] [review] Proposed patch against HEAD
Created attachment 56540 [details] [review] Proposed patch against 2.8.9 sources
I believe the maemo people also want some new themability for notebooks.
See https://stage.maemo.org/svn/maemo/projects/haf/branches/gtk+/patches/style-gtknotebook
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.
Don't expect to see this in the stable branch. Its for bugfixes, not new features.
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.
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
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.
(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.
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.
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.
if there is precendent, then sure, go for requision.
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.
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 ?
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.
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...
Alexander, did you do any more patches for this?
Created attachment 61917 [details] [review] Patch that adds arrow-size and arrow-spacing style properties Anyway, I went ahead and did the patch now.
Small typo in the documentation for arrow-spacing, other than that it looks reasonable to me.
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).
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...
Created attachment 65076 [details] [review] Updated alternate version after CVS conflict
patch is applied to HEAD now.