Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-14583

Add "inherit" as backgroundColor value

    Details

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fokkezb Fokke Zandbergen
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration