[maemo-developers] Moving windows in Maemo

From: Kalle Vahlman kalle.vahlman at gmail.com
Date: Mon Apr 16 18:37:50 EEST 2007
2007/4/16, Sean Luke <sean at cs.gmu.edu>:
> On Apr 16, 2007, at 8:26 AM, Eero Tamminen wrote:
> > This is just that string.  Before you know what space the string
> > can or should take you need to check the sizes for all the widgets
> > contents, take into account the expand etc. attributes in the co.
> > widget hierarchy etc.
> I'm missing the problem here.  Isn't this being done in the typical
> top-down fashion?
> 1. Set in stone the widget dimensions
> 2. Compute and cut string lengths line by line
> 3. If the total height will be more than the widget, include a scroll
> bar if appropriate
> 3.5 If including a scroll bar, recompute and cut string lengths line
> by line
> 4. Paint
> This is at most an O(n) operation, at least it is on previous GUIs
> I've used.  Is there a misfeature in GNOME which is messing things up
> here?  Is GNOME allowing string painting calculations to change the
> widget size?

You might want to read


before continuing this discussion, since obviously GTK+ is using
somewhat different principles in widget sizes than whatever you are
used to.

> > The device has a small screen, long strings might not fit into it.
> > What Mac OSX does e.g. when showing filenames or URLs that are, say
> > 500
> > characters long?
> It truncates them.
> Here's a picture of various MacOS X text modes.  Note that in all
> cases, there are no ellipses.
> http://cs.gmu.edu/~sean/temp/wordwrap.png

There's similar text widget in GTK+ too:


That hardly relates to labels (or other kinds of visible data) though.

Kalle Vahlman, zuh at iki.fi
Powered by http://movial.fi
Interesting stuff at http://syslog.movial.fi

More information about the maemo-developers mailing list