Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25254] Windows: backgroundGradient.colors should accept an array of just colour values

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2018-09-12T13:31:50.000+0000
Affected Version/sRelease 6.1.2, Release 7.0.0, Release 6.2.0
Fix Version/sRelease 7.5.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-09-08T10:21:22.000+0000
Updated2018-09-18T10:03:03.000+0000

Description

Description

backgroundGradient.colors property should accept an array containing just strings representing color values, as opposed to an array of objects with color values and offset value
var _window = Ti.UI.createWindow();
var buttonAddFav = Titanium.UI.createButton({
    title: 'add2favs',
    backgroundGradient:  {
        type: 'linear',
        startPoint: {x: 0.0, y: 0.0},
        endPoint: {x: 0.0, y: "100%"},
        // colors: ['#aaa', '#f00']
        colors: [{ color: '#aaa', offset: 0.0 }, { color: '#f00', offset: 1.0 }]
    }
});
_window.add(buttonAddFav);
_window.open()

Steps to reproduce

Add the above to an existing app.js and build for Windows

Comment out the array of objects and uncomment the array of color strings

Actual

backgroundGradient disappears after step 2

Expected

backgroundGradient should stay

Comments

  1. Kota Iguchi 2018-08-08

    https://github.com/appcelerator/titanium_mobile_windows/pull/1279
  2. Samir Mohammed 2018-09-12

    *FR passed* waiting on Master branch.
  3. Samir Mohammed 2018-09-18

    Closing ticket. Fix verified in SDK version 7.5.0.v20180917031523. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile_windows/pull/1279

JSON Source