| Summary: | [iOS]: Disabled buttons have wrong foreground color | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Elias Volanakis <elias> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ivan, jboehme, mknauer, rsternberg |
| Version: | 2.2 | ||
| Target Milestone: | 2.3 M3 | ||
| Hardware: | PC | ||
| OS: | other | ||
| Whiteboard: | |||
|
Description
Elias Volanakis
You are *not* talking about the RAP web client on iOS, are you? If this is a Tabris client bug you can use [1]. I'm closing this bug here because it seems to be unrelated to RAP. [1] https://github.com/eclipsesource/tabris/issues This is a RAP/Protocol issue. If you set a Control to disabled it will return foreground=null to the Client. This only works for the browser client as it uses theming to determine a fallback foreground color when the server returns null as foreground color. But that does not work with all other clients out there. A foreground color must never be null - especially when it was set on the server side. The browser specific logic should not be handled on the server - this browser specific behavior must move to the javascript implementation. The code in question is in Control#ControlAdapter#getUserForeground(), where the foreground color is reset to null if control is disabled. I agree that the enabled state should not affect the foreground value in the protocol. Graying out disabled widgets should be a responsibility of the theming. It may already be done by the theming, in this case we could simply remove the switch in getUserForeground(). (In reply to comment #4) > I agree that the enabled state should not affect the foreground value in the > protocol. Graying out disabled widgets should be a responsibility of the > theming. It may already be done by the theming, in this case we could simply > remove the switch in getUserForeground(). As colors set by code override colors set by themeing we need a client-side (WebClient) fix before removing the switch in getUserForeground(). Just a note: On Windows SWT Button#setForeground does nothing for all type of buttons. Fixed in master with change https://git.eclipse.org/r/25545. |