[maemo-developers] Moving windows in Maemo

From: Sean Luke sean at cs.gmu.edu
Date: Mon Apr 16 18:14:56 EEST 2007
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?  If so, this is very bad behavior indeed, particularly  
for a small device.  BTW, you can avoid 3.5 if you always include a  
scroll bar, blank or not.  That's what's standard on the Mac.


> 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

Sean

More information about the maemo-developers mailing list