{ "id": "116514", "key": "TIMOB-14404", "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": [], "resolution": null, "resolutiondate": null, "created": "2013-06-26T19:40:07.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "SystemButtonStyle", "button", "buttons", "ios", "iphone", "reprod", "size" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:40.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Problem*\r\nWhen a button with {{height: Ti.UI.SIZE, width: Ti.UI.SIZE}} uses the default {{style}}, the auto-sized button has a margin around the text. When it use a style of {{PLAIN}}, there is no margin around the text. Both scenarios should have the same auto-size behavior. At least I hope this isn't by design, because otherwise there is effectively no useful auto-size feature with PLAIN buttons.\r\n\r\n*app.js*\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#ffffff',\r\n\tnavBarHidden : true,\r\n\texitOnClose : true\r\n});\r\n\r\nvar stdBtnGradientNormal = {\r\n\ttype : 'linear',\r\n\tstartPoint : {\r\n\t\tx : '0%',\r\n\t\ty : '0%'\r\n\t},\r\n\tendPoint : {\r\n\t\tx : '0%',\r\n\t\ty : '100%'\r\n\t},\r\n\tcolors : [{\r\n\t\tcolor : 'white'\r\n\t}, {\r\n\t\tcolor : 'lightgray'\r\n\t}]\r\n};\r\n\r\nvar btnStyle = {\r\n\tfocusable : true,\r\n\tcolor : 'black',\r\n\tborderRadius : 10,\r\n\tborderColor : 'gray',\r\n\tborderWidth : 1,\r\n\ttextAlign : Ti.UI.TEXT_ALIGNMENT_CENTER,\r\n\tbackgroundGradient : stdBtnGradientNormal,\r\n\tbackgroundColor : 'transparent',\r\n\ttitle : 'Borderlands',\r\n\ttop : 100,\r\n\theight : Ti.UI.SIZE,\r\n\twidth : Ti.UI.SIZE,\r\n\tvisible : true\r\n};\r\n\r\nvar btnDefault = Ti.UI.createButton(btnStyle);\r\nwin.add(btnDefault);\r\n\r\nbtnStyle.style = Ti.UI.iPhone.SystemButtonStyle.PLAIN;\r\nbtnStyle.top = 200;\r\nvar btnPLAIN = Ti.UI.createButton(btnStyle);\r\nwin.add(btnPLAIN);\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: PLAIN style button has no border margin when height/width = SIZE", "creator": { "name": "strautman", "key": "strautman", "displayName": "Steve Trautman", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "strautman", "key": "strautman", "displayName": "Steve Trautman", "active": true, "timeZone": "America/New_York" }, "environment": "iPhone", "comment": { "comments": [ { "id": "259642", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on iOS 6 simulator with Ti SDK 3.1.1 GA", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-26T22:55:20.000+0000", "updated": "2013-06-26T22:55:20.000+0000" }, { "id": "422821", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue with the following environment;\r\niPhone 7 (10.2)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1.v20170623141152\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.1\r\nTi CLI 5.0.13\r\nAlloy 1.9.11\r\nArrow 2.0.0\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-26T20:16:48.000+0000", "updated": "2017-06-26T20:16:48.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }