{ "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.

\n

issue reported as http://developer.appcelerator.com/helpdesk/view/32681#c162321

\n

1.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

\n

results: after going 2X mode, quit and relaunch the app is using\nthe incorrect icon.

{html}", "attachment": [ { "id": "18022", "filename": "ios-32-scaling-bug.jpg", "author": { "name": "travelin_g", "key": "travelin_g", "displayName": "Travelin_G", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:26.000+0000", "size": 81654, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "iPad - restarting a iPhone published app on ipad after using 2X mode, app uses incorrect icons", "creator": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126085", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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.

\n

The 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.

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:26.000+0000", "updated": "2011-04-15T02:56:26.000+0000" }, { "id": "126086", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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.

\n

Need 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.)

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:26.000+0000", "updated": "2011-04-15T02:56:26.000+0000" }, { "id": "126087", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Here's my proposed fix:

\n

\nhttp://github.com/brion/titanium_mobile/commit/c35f0fb2f6241cad27d2...

\n

When 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.

\n

In 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.

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:27.000+0000", "updated": "2011-04-15T02:56:27.000+0000" }, { "id": "126088", "author": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Somebody in #titanium_app asked about this issue today. Would\nlove to see the fix make it in!

{html}", "updateAuthor": { "name": "brionvibber", "key": "brionvibber", "displayName": "Brion Vibber", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:27.000+0000", "updated": "2011-04-15T02:56:27.000+0000" }, { "id": "126089", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(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...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:27.000+0000", "updated": "2011-04-15T02:56:27.000+0000" }, { "id": "126090", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

[INFO] Titanium SDK version: 1.6.0 (01/12/11\n14:54 ff401e1) ipad 3.2 wifi, 4.2 emulator

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:28.000+0000", "updated": "2011-04-15T02:56:28.000+0000" }, { "id": "126091", "author": { "name": "travelin_g", "key": "travelin_g", "displayName": "Travelin_G", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

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.

{html}", "updateAuthor": { "name": "travelin_g", "key": "travelin_g", "displayName": "Travelin_G", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:56:28.000+0000", "updated": "2011-04-15T02:56:28.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }