Re: chubbiness reduction



> Havoc Pennington wrote:
> 
> > So, a useful project would be to hack your copy of GTK (preferably the
> > HEAD version) so that in gtkstyle.c xthickness and ythickness default
> > to 1. Then make testgtk work again with this setting.

Semi-on-topic rant:

I've been working on a theme engine recently (Buffy) and the
xthickness/ythickness bit turned out to be one of the most frustrating
problems I encountered. Not so much that changing the values caused widgets
to break, but that the change is applied uniformly across every single
widget, without any recourse for exceptions. I wanted to use values of 3,3,
but use 1,1 for the scrollbar, etc. Not being able to override these on a
widget-by-widget basis (by having {x,y}thickness as fields in
GtkWidgetClass, for example) is making the final look much less successful
than it could have been. 

There are a lot of assumptions in how widgets respond to changes in
xthickness/ythickness. For example, the scrollbar assumes that the slider
and stepper buttons fit inside a trough. If you want the widget of the
slider/steppers to exactly equal that of the trough, you use thickness
values of 0,0. But then your buttons end up looking shriveled up (where
they should use 3,3). You're forced to make tradeoffs that shouldn't even
be necessary in the first place.

As things stand, I'd have to create n separate styles in order to have n
different sets of values for xthickness/ythickness, and even then, only one
of them can be the default for new widgets. At that rate, it would just be
easier to sed the source for instances of
widget->style->klass->[xy]thickness and replace them with appropriate
hard-coded values.


--Straker


                       //,,    //,,
//=================// //////  ////// //==================================\\
 Straker Skunk     / //////  ////// /      Skunks are such wonderful
 <skunk@mit.edu>  / //////  ////// /     creatures... soft, and cuddly,
 -- -- -- -- -- --\ \\\\\\  \\\\\\ \      and if you annoy them they
 Daniel Richard G. \ \\\\\\  \\\\\\ \      make you stink like hell
 ========--====--==-\ \\\\\\  \\\\\\ \---------------=--==--====--========
 //mit.edu/straker  / //////  ////// / Furry|Course VI-3|MIT Class of 2001
 //skunk.mit.edu   / //////  ////// / 80% Beaver 90% Penguin 100% SKUNK!!!
\\===============// //////  ////// //====================================//
                     ''//    ''//





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]