Bug 405727 - [Tooltip] Content should be wrapped to follow SWT behavior
Summary: [Tooltip] Content should be wrapped to follow SWT behavior
Status: ASSIGNED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-15 09:48 EDT by Sebastien Arod CLA
Modified: 2014-03-06 05:48 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien Arod CLA 2013-04-15 09:48:51 EDT
In SWT (tested on GTK) tooltip content seems to be wrapped at about 400px.
In RWT there is no such wrapping which can cause tooltip to be truncated.

Note that SWT preserves line breaks originally contained in tooltip text if any and just add more if any line is too long.

Ideally RWT should behave similarly to SWT.
Comment 1 Ivan Furnadjiev CLA 2013-07-26 05:26:10 EDT
Sebastien, are you talking about ToolTip widget or the tooltip shown by widget.setToolTipText()?
Comment 2 Sebastien Arod CLA 2013-07-26 08:34:35 EDT
I'm talking about widget.setTooltipText().

-Seb
Comment 3 Ivan Furnadjiev CLA 2013-07-26 08:46:49 EDT
(In reply to comment #2)
> I'm talking about widget.setTooltipText().
This is a platform dependent feature. SWT on Windows does not wrap the text, same with RAP.
Comment 4 Sebastien Arod CLA 2013-07-26 08:49:08 EDT
I personaly prefer the GTK behavior because it makes long tooltips readable but I understand if you prefer to keep it as it is for RAP.
Comment 5 Markus Knauer CLA 2014-03-06 05:48:44 EST
We've had a similar discussion in a project where we develop a larger RAP-based application: Is it the responsibility of the framework to *add* line breaks, or is it the application developer's responsibility?

While I'm not sure about the best possible default algorithm (add additional line break 'after 400px' or 'after 65 characters' or 'when reaching the boundary of the display/browser'...) I believe that it would be good to come up with a sensible default behaviour in RAP. At the moment we are telling the developer that (s)he is responsible for adding line breaks, but we don't give them a good indication where to place a line break. Isn't this something that could be done on the client side?