Bug 192481 - StyledText has 2 pixels of white space at borders if right-to-left support enabled
Summary: StyledText has 2 pixels of white space at borders if right-to-left support en...
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 192482 192483
  Show dependency tree
 
Reported: 2007-06-13 12:24 EDT by Markus Keller CLA
Modified: 2007-06-14 02:55 EDT (History)
2 users (show)

See Also:


Attachments
Screenshots (37.97 KB, image/png)
2007-06-13 12:25 EDT, Markus Keller CLA
no flags Details
Here we can see the case where the pixels border are important (79.93 KB, image/png)
2007-06-13 14:33 EDT, Felipe Heidrich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2007-06-13 12:24:29 EDT
I20070608-1718, has been like this at least back to 2.1.3

StyledText 2 pixels of white space at the left and right borders if
a) right-to-left support is enabled at Control Panel > Regional and Language Options > Languages > Install files for complex script and right-to-left languages (including Thai), and
b) at least one right-to-left language (e.g. Arabic, Hebrew, ...) is installed (click Details... > Add)

The look of StyledText should not depend on whether rtl is enabled on the system. This subtle difference e.g. makes source hovers look bad without rtl support, see screenshot.

For comparison, the Text widget always has 3 pixel wide borders at left and at right.
Comment 1 Markus Keller CLA 2007-06-13 12:25:39 EDT
Created attachment 71191 [details]
Screenshots
Comment 2 Markus Keller CLA 2007-06-13 12:31:17 EDT
I'm not sure about the right solution to fix this. If the borders can be avoided with rtl support enabled, then I guess that would be the least breaking change, since the majority of developers and users probably don't have rtl enabled. This would also make Eclipse editors look nicer with multi-line selections, since it would remove the unnecessary vertical white lines on both sides of the editor area (see screenshot).

Comment 3 Steve Northover CLA 2007-06-13 13:42:33 EDT
This is a Windows bug that we can't work around.  Felipe to confirm this.
Comment 4 Felipe Heidrich CLA 2007-06-13 14:26:57 EDT
Have you ever noticed that when bidi is enable (the b option you listed) the caret has a little flag on top ? Depending if the text at the caret offset has the same direction of the widget the flag points to the left or to the right.
The 2 pixels border is need to make sure the flag is always visible, the special case would be:
the caret it at column 0, the widget is LTR, and the text at the caret RTL
or
the caret it at column 0, the widget is RTL, and the text at the caret LTR
Comment 5 Felipe Heidrich CLA 2007-06-13 14:33:07 EDT
Created attachment 71219 [details]
Here we can see the case where the pixels border are important
Comment 6 Dani Megert CLA 2007-06-14 02:54:36 EDT
>This is a Windows bug 
Does this mean you confirm that the border only happens on Windows BIDI?

Is there a way to detect in which mode the widget is i.e. whether there is already a border or not? I don't want to add yet more borders to the BIDI setup but would like to add that border for non-BIDI setup.