{ "id": "62207", "key": "TIMOB-1575", "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": "11258", "description": "Holding Pen for Triaged Issues", "name": "Backlog", "archived": false, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:56:33.000+0000", "created": "2011-04-15T02:56:25.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "2x", "defect", "icon", "ios", "ipad", "mode", "patch" ], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:56:33.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": "{html}
you can use the resources folder associated with http://developer.appcelerator.com/helpdesk/view/31431\nto reproduce the issue.
\nissue reported as http://developer.appcelerator.com/helpdesk/view/32681#c162321
\n1.Publish the app as an mobile app
\n2.install on an ipad
\n3.launch app, note appearance of the icon in the title bar\n(right)
\n4.tap 2X, quit the app (hit home button)
\n5.relaunch app and look at the icon
results: after going 2X mode, quit and relaunch the app is using\nthe incorrect icon.
The problem here seems to be that the UIScreen reports a scale\nfactor of 2.0 when running on iPad at 2x mode, so [TiUtils\nisRetinaDisplay] gives a false positive and [TiUtils\ncheckFor2XImage:] pulls the @2x images.
\nThe problem doesn't show up when starting non-zoomed because the\nscale factor is 1.0 at the time the image gets loaded, so the\nlow-res version is retrieved as expected.
The scale property on UIScreen is documented to only exist in\niOS 4, so I'm not sure it should be responding on an iPad\nrunning 3.2.2... but it is.
\nNeed to disregard that if we're running in iPhone compat mode on\nan iPad, I guess... or else make sure that the high-res images get\ndisplayed at the proper scale! (However this will usually not be\ngreat behavior, since the zoom can change during runtime so any\nalready-loaded images will end up wrong.)
Here's my proposed fix:
\n\nhttp://github.com/brion/titanium_mobile/commit/c35f0fb2f6241cad27d2...
\nWhen checking the scale, this double-checks if we're on an iPad\nbut with a UI_USER_INTERFACE_IDIOM() for iPhone mode; if so, then\nwe pretend we're on 1x scale instead of checking the reported\nvalue.
\nIn native iPad mode we'll still check the scale, so it should\nstill support automatic use of @2x images on a hypothetical future\niPad with a double-density display.
Somebody in #titanium_app asked about this issue today. Would\nlove to see the fix make it in!
(from [03bff3242c76f0b30a794107e13cf74624408cf2])\n[#1575 state:fixed-in-qa] Based off the commit\nbrion made, checks if the iPad is incorrectly returning a 2x scale.\nAlso, some unnecessary conditional compiles removed. \nhttps://github.com/appcelerator/titanium_mobile/commit/03bff3242c76...
[INFO] Titanium SDK version: 1.6.0 (01/12/11\n14:54 ff401e1) ipad 3.2 wifi, 4.2 emulator
Not sure if I'm missing something here - but I\ndownloaded/installed the continuous 1.6 build dated 1/14/11\n(mobilesdk-1.6.0-20110114221541-osx.zip), installed & compiled\nand I'm still seeing the same bug.