| Summary: | Not set style flag is rendered by the protocol for some widgets | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Ivan Furnadjiev <ivan> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | |
| Version: | 1.5 | ||
| Target Milestone: | 1.5 M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 351945 | ||
For Text widget the logic is the following: - if SWT.MULTI is set, style flag with a value 256 means H_SCROLL, style flag with a value 512 means V_SCROLL - if SWT.SINGLE is set, style flag with a value 256 means SWT.ICON_CANCEL, style flag with a value 512 means SWT.ICON_SEARCH For ToolBar we always should read style flag with a value 256 as SWT.HORIZONTAL and style flag with a value 512 as SWT.VERTICAL. I removed H_SCROLL and V_SCROLL as supported styles for ToolBar in RWTStylesUtil. Probably, there are other widgets affected by the similar issue. (In reply to comment #0) > Probably rendering of this "phantom" H_SCROLL/V_SCROLL style will not hurt, > but substituting one style with an other (with the same value) is definitely a > problem. Currently, SWT.ICON_CANCEL and SWT.ICON_SEARCH are missing from Text > supported styles in RWTStylesUtil (but iOS native client support them). To > avoid collision, probably we should remove H_SCROLL and V_SCROLL from ToolBar > supported styles too. I notices as well that SWT.ICON_CANCEL and SWT.ICON_SEARCH is not supported on the Webclient. Shall I file a new Bug report regarding this issue? Yes, please file an enhancement request. (In reply to comment #3) > Yes, please file an enhancement request. Okay done. See Bug 361273. Now, after all widgets are switched to the protocol, the Text widget is the only one with style flags collisions. That's why, I decided to keep the RWTStylesUtil (at least for now) and fix the collision in TextLCAUtil. Now ICON_CANCEL and ICON_SEARCH styles are rendered with the protocol too. The actual support for these styles in the Web client will be covered by bug 361273. Finally, we decided to remove the RWTStylesUtil class. Allowed widget styles are defined in the corresponding LCA. |
There are cases where two style flags with the same value exists for a single widget. For example: - Text - SWT.ICON_CANCEL == SWT.H_SCROLL == 256 - SWT.ICON_SEARCH == SWT.V_SCROLL == 512 where: new Text( parent, SWT.SEARCH | SWT.ICON_CANCEL ) renders H_SCROLL instead of ICON_CANCEL. - ToolBar - SWT.HORIZONTAL == SWT.H_SCROLL == 256 - SWT.VERTICAL == SWT.V_SCROLL == 512 where: new ToolBar( parent, SWT.HORIZONTAL ) renders SWT.HORIZONTAL and H_SCROLL. Probably rendering of this "phantom" H_SCROLL/V_SCROLL style will not hurt, but substituting one style with an other (with the same value) is definitely a problem. Currently, SWT.ICON_CANCEL and SWT.ICON_SEARCH are missing from Text supported styles in RWTStylesUtil (but iOS native client support them). To avoid collision, probably we should remove H_SCROLL and V_SCROLL from ToolBar supported styles too.