[Kst] The problem with auto-sizing labels

Barth Netterfield netterfield at astro.utoronto.ca
Tue Jan 30 14:56:27 CET 2007


On Tuesday 30 January 2007 8:29 am, Brisset, Nicolas wrote:
> 1) when a user draws a rectangle to create a label, it should be made to
> fit inside it as the user knows where the label should go and even went
> as far as indicating the bounding box

Agree... good wishlist item.

> 2) when a user just clicks (without dragging to delimit a rectangle) to
> create a label, it should use the default font size and start from where
> he clicked

Like the current behavior, or something different?

> 3) when a label is too long and reaches a window border it should stop
> expanding and shrink font size

Not a bad idea...  

> 4) at least in layout mode it should be possible to resize a label by
> dragging the control points, adjusting font size automatically as
> required. Moving and resizing with the mouse is clearly the easiest way,
> especially compared to calling the dialog to try a smaller/bigger font
> size until finding the appropriate one !

Agree - nice wishlist item.  I would suggest that only width is adjustable.  
Height is autoset from the resultant font size...

> 5) for labels spanning multiple lines, it would be convenient to have
> justify-left (default), center and justify-right. For labels on one
> line, an adjusted box with padding as now is enough

Agree... there is a bug open for this.

> 6) I don't see a problem with resizing labels due to contents changing.
> In many cases there should not be major length differences and even if
> there are, I think the best hint at how to show the label is the
> bounding box delimited by the user at the beginning. If he does not like
> the new size, he can enlarge it easily (see 4) above)

Hmmm... this requires some thought.  What is more important to the user?  The 
font size, or the box size?  You change the content from within a dialog that 
has font sizes.  So you would expect them to apply.  Sounds like we need 
a 'fit to box' check box for the label font size which is auto set if you 
drag-resize a text box.

So:
	-manually changing the font un-sets 'fits to box' andchanges the box size 
accordingly
	-manually changing the box size sets 'fit to box' and changes the font size 
accordingly
	-You can only change the box width.  The height is auto set based on the 
resultant font size.
	-Changing the content changes
		the font size if font 'fit to box' is set.
		the box size if font 'fit to box' is not set.

>The only thing that needs more consideration IMHO is defaults: 

And who is actually going to do the work... and what order to do it in.  Some 
of that code is in pretty bad shape - it should be cleaned up before features 
are added.  In my mind, the number 1 priority for kst right now needs to be 
stability!

>I can't believe we left this aside for so long just because...

And because no one has stepped up to do it.... (shocking!)


More information about the Kst mailing list