eclipsesource / eclipsesource/tabris-js
Setting enabled to false causes transparency to stack
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
### Problem description
When setting enabled to _false_ on a `Composite` containing a `TextView`, the TextView is grayed out. Setting enabled to _false_ on the `TextView` as well causes the disabled visualization to stack, making it "even more disabled".
### Expected behavior
Setting enabled to _false_ state should be consistent no matter how often it is applied in the layout hierarchy. The initial disabled state is also rather faint making it not directly obvious that the widget is disabled.
### Environment
- Tabris.js version: 2.0.0
- Device: iPad Pro 9.5
- OS: 10.3.3
### Code snippet
Both `TextView`s should have the same visual disabled appearance.
```javascript
const {TextView, Composite, ui} = require('tabris');
let composite = new Composite({
left: 0, right: 0, top: 0, bottom: 0,
enabled: false
}).appendTo(ui.contentView);
new TextView({
left: 16, top: 16, right: 16,
text: 'TextView',
}).appendTo(composite);
new TextView({
left: 16, top: 'prev() 16', right: 16,
text: 'TextView',
enabled: false
}).appendTo(composite);
```
Contributor guide
Assessment
This issue has not been assessed yet.