Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14583] Add "inherit" as backgroundColor value

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsCore
LabelsbackgroundColor, performance, transparency, transparent
ReporterFokke Zandbergen
AssigneeUnknown
Created2013-07-17T06:11:48.000+0000
Updated2018-02-28T20:04:14.000+0000

Description

By default view backgrounds are transparent. Often developers only set a backgroundColor on the window and leave the children (specially labels) as they are, since the appearance is already how they wanted it to be. But of course having all these transparent views *does* result in a less performant rendering of the views because the OS has to calculate the effective background shining through. So, as a best practice, developers are advised to always set a backgroundColor on views, even if it's the same as their parent's. However, doing so and then having to change the backgroundColor means you have to change it on all these views and not just the window, like without best practice. So, my suggestion is to introduce a new "inherit" value for the backgroundColor property, which should map to the closest set (can also be transparent, however it *must* be set, not default) background color of it's parents. This way, changing a window's backgroundColor only requires 1 property to change while still benefitting from increased performance because of less transparent views.

Comments

No comments

JSON Source