Bug 179294 - popup dialog truncates messages making them unreadable
Summary: popup dialog truncates messages making them unreadable
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdeui (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 179649 180463 183300 183851 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-01 17:02 UTC by Andrey Borzenkov
Modified: 2024-09-14 17:06 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
patch for kmessagebox to make them expand up to 80% (instead of 50%) (1.66 KB, patch)
2009-03-17 22:05 UTC, Marcel Partap
Details
A popup dialog totally unusable (24.12 KB, image/png)
2009-04-20 18:13 UTC, Jaime Torres
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Borzenkov 2009-01-01 17:02:19 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

See screenshot https://qa.mandriva.com/attachment.cgi?id=11692 (Mandriva bug https://qa.mandriva.com/show_bug.cgi?id=46070). In the middle of the message text is truncated and this makes the message absolutely meaningless.

BTW I have strong feeling that KDE computes not the display width but raw length of messages in bytes. Which for UTF-8 makes them twice as long.
Comment 1 Thomas McGuire 2009-01-04 14:30:48 UTC
That would be a general kdelibs bug, reassigning to kdelibs.
Comment 2 FiNeX 2009-01-05 00:09:38 UTC
*** Bug 179649 has been marked as a duplicate of this bug. ***
Comment 3 FiNeX 2009-01-05 00:09:56 UTC
This attachment is another example:
  http://bugs.kde.org/attachment.cgi?id=29908
Comment 4 Dario Andres 2009-01-12 22:33:14 UTC
*** Bug 180463 has been marked as a duplicate of this bug. ***
Comment 5 Dario Andres 2009-02-05 22:45:50 UTC
*** Bug 183300 has been marked as a duplicate of this bug. ***
Comment 6 Dario Andres 2009-02-10 14:13:21 UTC
*** Bug 183851 has been marked as a duplicate of this bug. ***
Comment 7 Harald Hvaal 2009-03-03 14:14:35 UTC
For reference, here's how andreas pakulat described the problem on the mailing lists:

Well, unfortunately Qt cannot do proper word-wrapping, especially when
url's are involved. If the url is "long enough" you'll get a message box
thats larger then the screen. Thats why at some point KMessageBox had a
scrollbar, but it seems that was removed now in favor of elided text. I
agree that this solution is not really acceptable and suggest you discuss
this on kde-core-devel.
Comment 8 Marcel Partap 2009-03-03 14:34:27 UTC
On bug #128090 i attached a fix for this problem which makes the maximum dialog size expand up to 80% of screen width, with word-wrapping enabled at >50% of screen width. For me that has fixed both problems fine.
Comment 9 Marcel Partap 2009-03-17 22:05:40 UTC
Created attachment 32215 [details]
patch for kmessagebox to make them expand up to 80% (instead of 50%)

(actually the patch belongs here not in that other bug)
Comment 10 Olivier Goffart 2009-04-02 00:38:45 UTC
label->minimumWidth() should be used instead of the sizeHint, at least at the second pass.
(And you might want to set the width manually on the messagebox in case it is too big)
Comment 11 Jaime Torres 2009-04-20 18:13:17 UTC
Created attachment 32961 [details]
A popup dialog totally unusable

Unfortunately, I've lost the ability to resize the VirtualBox X server, so it uses 640x480. There, the dialog is not placed at the center of the screen, and it cuts the text and the buttons text.
Comment 12 Dario Andres 2009-04-25 12:56:24 UTC
Should a ScrollArea be used to avoid cases like the last one ?
Comment 13 Marcel Partap 2009-04-25 13:17:48 UTC
Jaime can you please try this with my patch?
Else, if noone has any objections, i'll just commit this as i am using it since months without problems..
Comment 14 Andreas Pakulat 2009-04-25 13:37:24 UTC
(In reply to comment #12)
> Should a ScrollArea be used to avoid cases like the last one ?

Thats what I did for KDE4.0, but apparently too many people didn't like it, so it was reverted and now we again have the joy of being unable to see the important parts of message boxes.
Comment 15 Dario Andres 2009-04-25 13:40:27 UTC
May be it should be only used on "extreme" cases like the last one.
Or setup a layout properly to avoid the dialog being resized too much (when space on screen is available to use)
Comment 16 Ivo Anjo 2009-04-25 13:58:37 UTC
(In reply to comment #14)
> (In reply to comment #12)
> > Should a ScrollArea be used to avoid cases like the last one ?
> 
> Thats what I did for KDE4.0, but apparently too many people didn't like it, so
> it was reverted and now we again have the joy of being unable to see the
> important parts of message boxes.

I think the problem in 4.0 is that the scroll was used too often, even when the dialog clearly had space to show the entire message without scrolling, it didn't expand properly and instead showed the scrollbar.

I think the solution should be to try to show the message without scrolling (and of course, no ellipsing) while keeping the dialog at a reasonable size (e.g. no 640x480 dialog on a 640x480 screen), and if that isn't enough to display the message, then switch to having a scrollable message.
Comment 17 Christoph Feck 2010-09-01 02:00:56 UTC
From what I see in the code, we allow large sizes of the message text label, but only enable scroll bars when the height of the text would not fit. The eliding of long lines still is implemented, so something like that on the first screen shot is still possible.

I would suggest to use QTextOption::WrapAtWordBoundaryOrAnywhere which can hard-break URLs etc. even at non word boundaries, but we have to use a custom widget instead of QLabel.
Comment 18 Christoph Cullmann 2024-09-14 17:06:49 UTC
Hi,

kdelibs (version 4 and earlier) is no longer maintained since a few years.

KDE Frameworks 5 or 6 might already have resolved this bug.

If not, please re-open against the matching framework if feasible or against the application that shows the issue.

We then can still dispatch it to the right Bugzilla product or component.

Greetings
Christoph Cullmann