[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Word-wrap in message boxes.
From:       Ellis Whitehead <kde () ellisw ! net>
Date:       2002-01-15 5:59:56
[Download RAW message or body]

Hi Waldo,

On Monday 14 January 2002 20:34, Waldo Bastian wrote:
> Well basically our word-wrap isn't good enough. There are a few problems:
> 1) We don't know how big the messagebox should be. That gets complicated by
> the fact that Qt is currently buggy and doesn't provide correct sizeHints
> in all situations. Theoretically we can pick any size above the minimum
> required size, and the text is supposed to flow into that, but chances are
> that this will look like shit. We also have a bunch of dialogs from 2.2
> times that still have manual line-breaks and those are really ugly because
> it can happen that they automatically break one-word before the manual
> break. On the other hand if we use manual line-breaks we can size the
> dialog to fit the contents (see also 2) and whoever wrote the text can
> fidle with the line-breaks to make it a nice dialog that is well-balanced.

The reasons you cite are certainly valid, but I still think that the automatic 
word-wrap is better.  I doesn't seem to me that most of us coders generally 
do a better job at setting good line-feeds than KMessageBox does, and coders 
can't account for differing fonts.

> 2) We sometimes have data that exceeds reasonable width, e.g. think of a
> 200 character-long URL. We need to truncate that because otherwise we can
> end up with a dialog twice as wide as your screen, but that is rather hard
> with automatic word-breaks and it is very likely that the result will again
> look like shit due to single words ending up on a line of their own.

Is this really so difficult to write an algorithm for?  Not that I'm 
volunteering, but I'd rather go with the problems that were existent in 
KMessageBox and see them eventually fixed, rather than continue with the 
seemingly poor tradition of hard-coding line breaks.

Ciao,
Ellis
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic