{ "id": "92152", "key": "TIMOB-9191", "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": "13503", "description": "Sprint 2012-14 Core", "name": "Sprint 2012-14 API", "archived": true, "released": true, "releaseDate": "2012-07-13" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-07-19T09:43:04.000+0000", "created": "2012-05-22T12:16:53.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_views", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2013-07-19T09:43:04.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": "h1. Problem\r\nThe backgroundLeftCap is broken on Ti.UI.Views on Retina displays. It works fine on Ti.UI.Buttons.\r\n\r\nh2. Reproduction\r\nDrop the following in an app.js, and download the two attached images.\r\n\r\nNote that the two search.png and search@2x.png images are color coded so you can see that it is consistently using the @2x image on the Retina device, it's just messing up (miscalculating?) the stretching somehow.\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n// WORKS: buttons backgrounds stretch properly on Retina displays!\r\nwin.add(Ti.UI.createButton({\r\n top: 10, right: 10, left: 10,\r\n height: 30,\r\n // \"search.png\" is:\r\n // - On Non-Retina: 35x30\r\n // - On Retina: 70x60\r\n backgroundImage: 'search.png',\r\n // 35 / 2 = 17.5, so use 17, 34 pixels for the edges, with 1 pixel to repeat in the middle.\r\n backgroundLeftCap: 17\r\n}));\r\n// FAILS: ends up distorted on the left and right caps on Retina displays!\r\nwin.add(Ti.UI.createView({\r\n top: 50, right: 10, left: 10,\r\n height: 30,\r\n backgroundImage: 'search.png',\r\n backgroundLeftCap: 17\r\n}));\r\nwin.open();\r\n{code}\r\n\r\nh2. Workaround\r\nUse buttons with their touch disabled as backgrounds. Weird, a bit heavier, but... whatever.\r\n\r\nh2. Screenshot\r\nAttached as well.", "attachment": [ { "id": "27860", "filename": "iOS Simulator Screen shot May 22, 2012 2.13.39 PM.png", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-05-22T12:16:53.000+0000", "size": 20826, "mimeType": "image/png" }, { "id": "27861", "filename": "search.png", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-05-22T12:16:53.000+0000", "size": 1006, "mimeType": "image/png" }, { "id": "27862", "filename": "search@2x.png", "author": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "created": "2012-05-22T12:16:53.000+0000", "size": 3810, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Ti.UI.View backgroundLeftCap backgroundTopCap Broken on Retina Displays", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium SDK version: 2.1.0 (05/03/12 17:34 c366287)\r\niPhone Device family: universal\r\niPhone SDK version: 5.1\r\niPhone simulated device: iphone retina", "comment": { "comments": [ { "id": "201670", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending https://github.com/appcelerator/titanium_mobile/pull/2510", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-05T14:05:07.000+0000", "updated": "2012-07-05T14:05:07.000+0000" }, { "id": "262431", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to update labels:\r\n", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-19T09:41:24.000+0000", "updated": "2013-07-19T09:41:24.000+0000" }, { "id": "262432", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with: \r\nSDK:3.1.2.v20130718094558\r\nAppcelerator Studio: 3.1.2.201307121651\r\nOS: OSX 10.7.5\r\nDevice:iPhone5(ios6)\r\nXcode: 4.6\r\n", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-19T09:43:04.000+0000", "updated": "2013-07-19T09:43:04.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }