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

Bug 313907

Summary: Wrong horizontal displacement InfoFlyout
Product: [RT] Riena Reporter: Nobody - feel free to take it <nobody>
Component: UIAssignee: Elias Volanakis <elias>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: achilles.sabine, christian.campo, elias, nobody
Version: unspecified   
Target Milestone: 2.0.0.RC2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Horizontal displacement of InfoFlyout
none
Screenshot (fixed) none

Description Nobody - feel free to take it CLA 2010-05-21 09:07:43 EDT
Created attachment 169497 [details]
Horizontal displacement of InfoFlyout

The InfoFlyout is placed at a wrong horizontal position, sometimes even outside the Client.
Comment 1 Elias Volanakis CLA 2010-05-21 14:24:41 EDT
Reproducible on Vista as well.
Comment 2 Elias Volanakis CLA 2010-05-21 14:34:42 EDT
Looking at the code in #updateLocation(). I suspect the calculation is wrong. Will expirement later today.

Also, I recommend avoiding this construct completely:

PlatformUI.getWorkbench().getDisplay().getShells()[0].getBounds();
                                                         ^^^^^^^^^                                                         
We don't have any guarantee what shell that is. parent.getShell() or control.getShell() always gives the shell where the parent/control is hosted. Much safer :-)
Comment 3 Elias Volanakis CLA 2010-05-21 15:02:15 EDT
Yep, the code below was causing the problem (returning the wrong shell).

I've also reduced the margin from the left shell edge slighlty moving it a bit to the left. 
// INFO_FLYOUT_RIGHT_INDENT = 12 // from 21

@Heiko: can you confirm it now looks right (see next screenshot) ?
Comment 4 Elias Volanakis CLA 2010-05-21 15:04:06 EDT
Created attachment 169547 [details]
Screenshot (fixed)