Re: pango_layout_set_height()



On Tue, 2008-01-22 at 10:58 +0100, Mathias Hasselmann wrote:
> 
> > I don't have any concrete uses for the negative cases other than -1 at
> > this time, so it's not a huge issue to me.  But read below.
> 
> GtkCalendar details would make use of other negative values than -1.
> Why can't a default value of zero be used to preserve compatible
> behaviour, and get arround the per-paragraph limit?

That's certainly possible.  My main concern was having three different
cases instead of two.  My only other preference is that a height default
value of -1 is more in line with the width default value of -1.  That's
all.  Also that I wanted to reserve 0 for "one line only".  But +1 does
that as well.

I don't think it's a huge issue though.  Because:

  - If you put the layout in single paragraph mode, the difference is
irrelevant.

  - Most of the time you have allocated height and that's positive.  So
this is relevant only in size_request(), not size_allocate().  In
size_request() it's probably a very valid argument, but one may still
use 2*font_metrics.height.  Which one is more common (using actual text,
or font metrics).

  - Umm, maybe you are right.  I'm running out of reasons :).


I don't have any strong feelings.  The implementation change needed is
tiny.  Lets get a couple other opinions too.


Cheers,

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759



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