| Summary: | setTabs method in Text widget is ignored when style includes SWT.SINGLE | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Peter Holloway <holloway.p.r> |
| Component: | SWT | Assignee: | Eric Williams <ericwill> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | akurtakov, ericwill, xixiyan |
| Version: | 3.8 | Keywords: | triaged |
| Target Milestone: | 4.11 RC1 | Flags: | akurtakov:
review+
|
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/137296 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8540e746179ae6f69e9f415f37179feca80a3bb0 |
||
| Whiteboard: | RHT | ||
I can reproduce the issue on SWT master as of today, with GTK3.22 and Fedora 28 on both X11 and Wayland. New Gerrit change created: https://git.eclipse.org/r/137296 We have the ability to support this on GTK3.10+, which is the min version for SWT-GTK anyway. The attached patch should land in early 4.12. Gerrit change https://git.eclipse.org/r/137296 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8540e746179ae6f69e9f415f37179feca80a3bb0 (In reply to Eclipse Genie from comment #4) > Gerrit change https://git.eclipse.org/r/137296 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=8540e746179ae6f69e9f415f37179feca80a3bb0 In master now. |
Creating a text widget with the style flag set to SWT.SINGLE, means that the setTabs method or at least the setTabStops method it calls) is ignored. Text txtInput = new Text(inputHolder, SWT.SINGLE); txtInput.setTabs(4); txtInput.addTraverseListener(new TraverseListener() { //code to ignore traverses }); results in tabs still being shown as equal to 8 spaces. This is coming from the "if ((style & SWT.SINGLE) != 0) return;" line in the setTabStops method of the gtk Text widget. In the win32 version of the widget there is no such check (and may explain the worksforme resolution of bug #34805)