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

Windows: Ti.UI.Button - Color property sets background color instead of text color

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 5.2.2
    • Fix Version/s: Release 5.3.0
    • Component/s: None
    • Labels:
    • Environment:

      SDK: 5.4.0.v20160503001406

    • Story Points:
      3
    • Sprint:
      2016 Sprint 10 SDK

      Description

      According to http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Button-property-color the color property should set the text color of a button. Currently it sets and overrides any previously set backgroundColor.

      Example:

      index.xml

      <Alloy>
      	<Window class="container">
      		<Button id="btn" onClick="doClick">Button 1</Button>
      		<Button id="btn2" onClick="doClick2">Button 2</Button>
      	</Window>
      </Alloy>
      

      index.tss

      ".container": {
      	backgroundColor:"white",
      	layout: 'vertical'
      }
       
      "#btn": {
      	width: Ti.UI.SIZE,
      	backgroundColor: "blue",
      	color: "red"
      }
       
      "#btn2": {
      	width: Ti.UI.SIZE,
      	backgroundColor: "blue",
      }
      

      index.js

      function doClick(e) {
          $.btn.color = "blue";
      }
       
      function doClick2(e) {
          $.btn2.color = "yellow";
      }
       
      $.index.open();
      

        Attachments

          Activity

            People

            • Assignee:
              cwilliams Christopher Williams
              Reporter:
              jonasbjurhult Jonas Bjurhult
              Reviewer:
              Gary Mathews
              Tester:
              Harry Bryant
            • Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code