| Summary: | RTL Mode - calendar appears in wrong position after clicking the combo | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Barry Dresdner <barry.dresdner> |
| Component: | Nebula | Assignee: | Wim Jongman <wim.jongman> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ahmad_alobaidy, peter |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Barry Dresdner
Can I please get an update on this? Wondering if anything has been done and/or if the Nebula project is going anywhere? Should I continue to use the Nebula widgets in my source or should I go with something else? Thanks I made the following code changes in my local source, and it solves my problem:
org.eclipse.nebula.cwt.base.BaseCombo in:
protected synchronized void setOpen(boolean open, final Runnable callback) {
Line 1038:
if((stretchControl != null) && (size.x < stretchControl.getSize().x)) {
size.x = stretchControl.getSize().x;
// contentShell.setSize(size);
}
// Begin Fix for RTL
int deltaX = 0;
String orientation = System.getProperty("eclipse.orientation"); //$NON-NLS-1$
if ("rtl".equals(orientation)) { //$NON-NLS-1$
leftAlign = true;
deltaX = getBounds().width;
}
// End Fix for RTL
if(leftAlign) {
location.x -= positionControl.getLocation().x;
location.x -= deltaX; // Rest of fix for RTL
} else {
location.x += (positionControl.getSize().x - size.x);
if(location.x < 0) {
location.x = 0;
}
}
Thanks for the patch. We are regrouping. Let me fix this for you. *** Bug 217082 has been marked as a duplicate of this bug. *** Should this also happen if the orientation is alignment left or only if RTL? Made a slightly different approach. Since Nebula cannot depend on Eclipse I took the RTL style bit from the shell. This should also be set if Eclipse is in RTL mode.
if (leftAlign || isRTL()) {
location.x -= positionControl.getLocation().x;
// bug 336853
if(isRTL()){
location.x -= getBounds().width;
}
Made a method to determine RTL and used your formula to calculate offsets.
Please test, confirm or reopen.
released to HEAD |