{ "id": "91947", "key": "TIMOB-9166", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13407", "description": "Sprint 2012-11 API", "name": "Sprint 2012-11 API", "archived": true, "released": true, "releaseDate": "2012-06-03" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14157", "description": "Sprint 2012-20 API", "name": "Sprint 2012-20 API", "archived": true, "released": true, "releaseDate": "2012-10-08" }, { "id": "14272", "description": "2012 Sprint 20", "name": "2012 Sprint 20", "archived": true, "released": true, "releaseDate": "2012-10-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-09-28T21:40:57.000+0000", "created": "2012-05-17T11:45:40.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api", "module_button", "qe-testadded", "regression" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "13270", "description": "Release 1.8 Service Pack 3 (CI for 1_8_X)", "name": "Release 1.8.3", "archived": true, "released": false } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-09-28T21:40:57.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h3. Problem\r\n\r\nThere is a scaling issue when a button's height is set to be smaller than its background image. It appears that though the background top cap and left cap are set they are not respected when the background image is scaled. Setting the button height to be the height of the background image fixes this problem--as shown in the screenshot.\r\n\r\nThis did not happen Release 1.8.2 but occurs from the head of 1.8.x branch(1.8.3) to Release 2.0.1GA2\r\n\r\nh3. Sample Code\r\n\r\n{noformat}\r\n\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n title : 'Tab 1',\r\n backgroundColor : '#fff',\r\n layout : \"vertical\"\r\n});\r\n\r\n// button-background.png is 39x37\r\n\r\nvar button1 = Ti.UI.createButton({\r\n top : 0,\r\n left : 0,\r\n height : 34,\r\n width : 106,\r\n backgroundImage : \"button-background.png\",\r\n backgroundTopCap:15,\r\n backgroundLeftCap:15,\r\n backgroundRepeat : false,\r\n color : \"#000000\",\r\n font : {\r\n \"fontSize\" : 14,\r\n \"fontWeight\" : \"bold\",\r\n \"fontFamily\" : \"Helvetica Neue\"\r\n },\r\n style : Titanium.UI.iPhone.SystemButtonStyle.PLAIN,\r\n title : \"106x34\"\r\n});\r\n\r\nvar button2 = Ti.UI.createButton({\r\n top : 50,\r\n left : 0,\r\n height : 37,\r\n width : 106,\r\n backgroundImage : \"button-background.png\",\r\n backgroundTopCap : 15,\r\n backgroundLeftCap : 15,\r\n backgroundRepeat : false,\r\n color : \"#000000\",\r\n font : {\r\n \"fontSize\" : 14,\r\n \"fontWeight\" : \"bold\",\r\n \"fontFamily\" : \"Helvetica Neue\"\r\n },\r\n style : Titanium.UI.iPhone.SystemButtonStyle.PLAIN,\r\n title : \"106x37\"\r\n});\r\n\r\nwin1.add(button1);\r\nwin1.add(button2);\r\n\r\nwin1.open(); \r\n\r\n{noformat}\r\n\r\nThe background image is also attached.\r\n\r\n", "attachment": [ { "id": "27737", "filename": "button-background.png", "author": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "created": "2012-05-17T11:45:40.000+0000", "size": 1302, "mimeType": "image/png" }, { "id": "27738", "filename": "Screenshot.png", "author": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "created": "2012-05-17T11:45:40.000+0000", "size": 12705, "mimeType": "image/png" }, { "id": "30827", "filename": "topcap.jpg.jpg", "author": { "name": "twilkinson", "key": "twilkinson", "displayName": "Thomas Wilkinson", "active": true, "timeZone": "America/Chicago" }, "created": "2012-08-29T07:39:00.000+0000", "size": 98783, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "iOS: Button background image scaling issues when button height is smaller than its background image", "creator": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "vjoshi", "key": "vjoshi", "displayName": "Varun Joshi", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK: 1.8.3, 2.0\r\nPlatform OS: iOS ", "closedSprints": [ { "id": 3, "state": "closed", "name": "Release 3.0.0", "startDate": "2012-09-27T05:26:46.636Z", "endDate": "2012-10-08T20:05:00.000Z", "completeDate": "2012-12-20T17:03:19.403Z" } ], "comment": { "comments": [ { "id": "196858", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull merged", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-01T10:41:25.000+0000", "updated": "2012-06-01T10:41:25.000+0000" }, { "id": "197461", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Tested with Titanium SDK: 2.1.0.v20120605190238\r\nTested with Titanium  Studio: 2.1.0.201206041625", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-06-06T05:28:27.000+0000", "updated": "2012-06-06T05:28:27.000+0000" }, { "id": "197462", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified on :\r\nTested with Titanium SDK: 2.1.0.v20120605190238\r\nTested with Titanium  Studio: 2.1.0.201206041625\r\nDevice and version: iPhone 4s(5.1)", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-06-06T05:30:15.000+0000", "updated": "2012-06-06T05:30:15.000+0000" }, { "id": "216759", "author": { "name": "twilkinson", "key": "twilkinson", "displayName": "Thomas Wilkinson", "active": true, "timeZone": "America/Chicago" }, "body": "This is also happenning with UIView, but only on the iPhone device itself, not in the iOS Simulator. I'm using Titanium SDK version 2.1.1 (07/27/12 14:01 0fd84a2) on Titanium 2.1.1.201207271312 and building with XCode 4.4.1. Attaching image !topcap.jpg.jpg!", "updateAuthor": { "name": "twilkinson", "key": "twilkinson", "displayName": "Thomas Wilkinson", "active": true, "timeZone": "America/Chicago" }, "created": "2012-08-29T07:34:00.000+0000", "updated": "2012-08-29T07:34:00.000+0000" }, { "id": "216761", "author": { "name": "twilkinson", "key": "twilkinson", "displayName": "Thomas Wilkinson", "active": true, "timeZone": "America/Chicago" }, "body": "This is also happening with UIView, these corners should be round, not oblong and the drop shadow on top should not be as wide -- so the top of the Appcelerator logo should line up with the top of the white area.", "updateAuthor": { "name": "twilkinson", "key": "twilkinson", "displayName": "Thomas Wilkinson", "active": true, "timeZone": "America/Chicago" }, "created": "2012-08-29T07:39:00.000+0000", "updated": "2012-08-29T07:39:00.000+0000" }, { "id": "221450", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thomas: please provide some test code and file a new issue, please. We'll be happy to look at it.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-09-28T21:40:57.000+0000", "updated": "2012-09-28T21:40:57.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }