[Kdelibs-bugs] [PATCH] Fixing KMessageBox cutoff texts
Andreas Pakulat
apaku at gmx.de
Fri Nov 2 19:04:09 CET 2007
On Donnerstag, 1. November 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.
>
> So what am I missing here? Or can I just commit the attached patch to
> fix this?
Bah, sometimes I need a slight bit more time to actually think of a
proper solution.
I'm not sure what a perfect solution is, but one that doesn't cut off
text either in the vertical or horizontal direction, no matter how long
it is is attached. It simply puts a QScrollArea around the qlabel which
means that we don't have a visible difference if the text is relatively
small and get scrollbars if the dialog gets too wide. Tested and it
seems something else sets the maximum size to something like 1/3rd of
the screen.
Unless I hear objections until monday I'm going to commit this as I
can't see any downside here (besides scrollbars, but I think thats
acceptable)
Andreas
--
You definitely intend to start living sometime soon.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs_kdeui_kmsgbox_fix_label2
Type: text/x-diff
Size: 3166 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kdelibs-bugs/attachments/20071102/89d56408/attachment.bin
More information about the Kdelibs-bugs
mailing list