{ "id": "125628", "key": "AC-2205", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-02-09T05:58:07.000+0000", "created": "2014-01-30T16:23:14.000+0000", "labels": [ "alignment", "label" ], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:41:12.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "While trying to top align a label with an image, i noticed that the label was pushed down a bit, rather then being flush with the top of the image. The labels create extra spacing for their text, even when set to Ti.UI.SIZE. I am sure this is a regression as i have found past examples where this was not the case.\r\n\r\nalloy:\r\n\r\nXML\r\n{code}\r\n\r\n \r\n \t\r\n \t\t\r\n \t\t\r\n \t\r\n \r\n\r\n{code}\r\n\r\nTSS\r\n{code}\r\n\"Label\": {\r\n\ttop: 0,\r\n text: \"Label is bigger then the text\",\r\n backgroundColor: \"red\",\r\n height: Ti.UI.SIZE,\r\n width: Ti.UI.SIZE,\r\n verticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP,\r\n color: \"#000000\",\r\n font: {\r\n fontFamily: \"HelveticaNeue-Light\",\r\n fontSize: 18\r\n }\r\n}\r\n\r\n\"ImageView\": {\r\n\ttop: 0,\r\n\theight: 64,\r\n\twidth: 64,\r\n\timage: \"/appicon.png\"\r\n}\r\n\r\n\"View\": {\r\n\tlayout: \"horizontal\",\r\n\theight: Ti.UI.SIZE,\r\n\twidth: Ti.UI.SIZE,\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "Labels with a height of \"Ti.UI.SIZE\" have a form of 'padding' on the top and bottom", "creator": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "environment": "Android and iOS, 3.2 SDK", "comment": { "comments": [ { "id": "290601", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please provide a complete and runnable test case that demonstrates this issue. You mentioned the label does not align with the image but your code snippet does not refer to an image.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-31T07:42:16.000+0000", "updated": "2014-01-31T07:42:16.000+0000" }, { "id": "290654", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "While not strictly needed to see the effect, i did add in an image to help see it visually. The label itself meets the image, but the text inside the label is pushed down.\r\n\r\nIn this link from 2 years ago, This is the effect i would be looking for / expecting. The text inside the label to be at the VERY top/bottom of the label height.\r\n\r\nhttps://developer.appcelerator.com/question/124694/align-text-to-top-of-label. Notice the orange text fills the whole space.", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2014-01-31T18:28:24.000+0000", "updated": "2014-01-31T18:32:08.000+0000" }, { "id": "290831", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Setting height to Ti.UI.SIZE sets the label height to fit the text. It is not really center aligned in this case. I changed the height to a large value (100) and that displayed a large label with a top aligned text but it had the same gap from the top as with Ti.UI.SIZE. I don't see any difference in terms of gap or alignment with Ti.UI.SIZE or an absolute value.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-03T05:37:45.000+0000", "updated": "2014-02-03T05:37:45.000+0000" }, { "id": "290873", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "Correct, i tried the same thing. The verticalAlign property was added after the fact to attempt make it even \"more\" top. This is still undesired behavior i assume.", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2014-02-03T15:40:19.000+0000", "updated": "2014-02-03T15:40:19.000+0000" }, { "id": "291912", "author": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "body": "Based on your above comments, this should be classified as a bug and assigned?", "updateAuthor": { "name": "paul h", "key": "paul h", "displayName": "Paul Hamilton", "active": true, "timeZone": "America/Havana" }, "created": "2014-02-07T16:05:58.000+0000", "updated": "2014-02-07T16:05:58.000+0000" }, { "id": "292072", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I checked with the engineering and it is expected behavior. Titanium SDK is following text handling rules as per iOS guidelines. You will notice that there is no gap on the top if you use a character with ascent in your sample code (for example, È)\n\nhttps://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/Introduction/Introduction.html\n", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-09T05:57:52.000+0000", "updated": "2014-02-09T05:57:52.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }