Bug 308315 - [Palette] BIDI3.6: Flipped icon in palette in RTL orientation
Summary: [Palette] BIDI3.6: Flipped icon in palette in RTL orientation
Status: ASSIGNED
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy GEF (MVC) (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-07 07:14 EDT by amir CLA
Modified: 2014-07-12 05:49 EDT (History)
4 users (show)

See Also:


Attachments
The icon in order to expand the palette. Should be right in RTL (76.54 KB, image/jpeg)
2010-04-07 07:18 EDT, amir CLA
no flags Details
The icon in order to hide the palette. Should be left in RTL (86.70 KB, image/jpeg)
2010-04-07 07:21 EDT, amir CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description amir CLA 2010-04-07 07:14:56 EDT
Build Identifier: I20100330-0800

The arrow icons using for expand and hide the palette should be flipped in RTL mode i.e right arrow for expanding and left arrow in order to hide it.

Reproducible: Always

Steps to Reproduce:
1. Launch eclipse using -nl he attribute in order to enable RTL orientation
2. Select File -> New -> Example -> Logic Diagram and hit "Next."
3. In the new logic file dialog type some file name and click Finish

Result:
In the logic editor that opens up, the appropriate arrow icons for the palette are flipped.
See attached screenshots
Comment 1 amir CLA 2010-04-07 07:18:55 EDT
Created attachment 164032 [details]
The icon in order to expand the palette. Should be right in RTL
Comment 2 amir CLA 2010-04-07 07:21:11 EDT
Created attachment 164033 [details]
The icon in order to hide the palette. Should be left in RTL
Comment 3 Kit Lo CLA 2010-04-07 22:33:09 EDT
I did some investigation. The show and hide palette triangles are constructed in org.eclipse.gef.ui.palette.FlyoutPaletteComposite, instead of using a real bitmap. Looks like the ButtonCanvas.getArrowDirection() method has some logics to check if the UI is mirrored and set the arrow direction accordingly. Seems like the code is not working. Please investigate.

private int getArrowDirection() {
	int direction = PositionConstants.EAST;
	if (isInState(STATE_EXPANDED | STATE_PINNED_OPEN))
	    direction = dock == PositionConstants.WEST ? PositionConstants.WEST : PositionConstants.EAST;
	else 
	    direction = dock == PositionConstants.WEST ? PositionConstants.EAST : PositionConstants.WEST;
	if (isMirrored()) {
		if (direction == PositionConstants.WEST)
		    direction = PositionConstants.EAST;
		else
		    direction = PositionConstants.WEST;
	}
	return direction;	
}