[Kdelibs-bugs] [PATCH] Fixing KMessageBox cutoff texts
Aaron J. Seigo
aseigo at kde.org
Thu Nov 1 06:25:45 CET 2007
On Wednesday 31 October 2007, Andreas Pakulat wrote:
> Hi,
>
> just had a look why all KMessageBoxes cut off their text and the problem
> seems to be the width/height calculation code in
> KMessageBox::createKMessageBox and the fact that the result is set as
> Fixed Size for the label.
>
> I don't quite understand why the contents width/height is calculated in
> the first place, so I just disabled the whole stuff and set a real
> margin on the label instead of changing its size. Looks more apropriate
> to me.
the point of this code was to prevent really long strings from creating
reaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaally wide dialogs. it
looks at the size of the screen that the dialog is on and ensures it doesn't
iirc it does something along the lines of ensuring it doesn't take up more
than 1/3rd of that space while keeping things in a nice proportion (e.g.
2:3). the idea was to make nice looking dialogs.
this is the sort of code that would've done well with a comment here or there
=)
some of these assumptions are probably broken anyways for things like small
form factor devices, but we probably want to avoid looooooooong dialog
syndrom again ..
not sure what the perfect fix is here though ... probalby not setting a fixed
size though. iirc a fixed size was set because at least in qt3 there was no
other reliable way to get the label from changing its, or the dialogs, size.
maybe it's better in qt4?
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Trolltech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kdelibs-bugs/attachments/20071031/07bacf1b/attachment.pgp
More information about the Kdelibs-bugs
mailing list