Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 170827

Summary: ControlDecoration uses the wrong GC method to render text
Product: [Eclipse Project] Platform Reporter: Dejan Glozic <dejan>
Component: UIAssignee: Boris Bokowski <bokowski>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Kevin_McGuire
Version: 3.3   
Target Milestone: 3.3 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dejan Glozic CLA 2007-01-17 15:26:16 EST
The constructor of the Hover in ControlDecoration:

			hoverShell.addPaintListener(new PaintListener() {
				public void paintControl(PaintEvent pe) {
					pe.gc.drawString(text, hm, hm);
					if (!CARBON) {
						pe.gc.drawPolygon(getPolygon(true));
					}
				}
			});
The size of the hover is correctly performed when there are carriage returns in the text. However, the text is painted as String. This causes only the first line to be painted and the rest of the hover is empty.

The fix is to use GC.drawText' instead.
Comment 1 Boris Bokowski CLA 2007-01-17 16:47:50 EST
Fix released >20070117.
Comment 2 Boris Bokowski CLA 2007-01-17 16:48:00 EST
.