Summary: | KMessageBox is not large enough thus displaying scrollbars | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdelibs | Reporter: | Gaël de Chalendar (aka Kleag) <kleagg> |
Component: | kdeui | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | uwolfer |
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | screenshot with the faulty dialog |
Description
Gaël de Chalendar (aka Kleag)
2008-05-13 12:25:21 UTC
Thats actually by purpose, because we can't control the length of the messages that are displayed. However there seems to be a bug right now somewhere that adds scrollbars even if the message would fit into the message box maximum size (1/4th of the screen size). Created attachment 24750 [details]
screenshot with the faulty dialog
Here is the code producing this screenshot
KMessageBox::information(
game(),
i18n("%1, your goal will be displayed. Please make sure that no other
player can see it !",(*it)->name()),
i18n("KsirK - Displaying Goal"));
Placing the text on one line would be larger than 1/4 of the screen, but here,
it is splitted in a few line while putting the scrollbar.
Note that if I put a "<br>" between the words "Please" and "make", there is no
more a scrollbar, but the text is anyway displayed on 4 lines instead of 2.
I have played around with it for quite some time, but not really found a solution. The following line fixes the issue in all cases I have tested, but it's a rather ugly workaround: messageScrollArea->setMinimumHeight(messageScrollArea->sizeHint().height() * 1.15); This seems to be solved at revision 821062 |