Community
Participate
Working Groups
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.
Created attachment 71191 [details] Screenshots
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).
This is a Windows bug that we can't work around. Felipe to confirm this.
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
Created attachment 71219 [details] Here we can see the case where the pixels border are important
>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.