{"action":"created","issue":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/10727","labels_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/10727/labels{/name}","comments_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/10727/comments","events_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/10727/events","html_url":"https://github.com/cocos2d/cocos2d-x/issues/10727","id":59789442,"number":10727,"title":"ui::Layout cannot work with scaled widgets","user":{"login":"jphw","id":5418483,"avatar_url":"https://avatars.githubusercontent.com/u/5418483?v=3","gravatar_id":"","url":"https://api.github.com/users/jphw","html_url":"https://github.com/jphw","followers_url":"https://api.github.com/users/jphw/followers","following_url":"https://api.github.com/users/jphw/following{/other_user}","gists_url":"https://api.github.com/users/jphw/gists{/gist_id}","starred_url":"https://api.github.com/users/jphw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jphw/subscriptions","organizations_url":"https://api.github.com/users/jphw/orgs","repos_url":"https://api.github.com/users/jphw/repos","events_url":"https://api.github.com/users/jphw/events{/privacy}","received_events_url":"https://api.github.com/users/jphw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-04T12:10:44Z","updated_at":"2015-03-16T07:43:17Z","closed_at":null,"body":"If you create some ui::Buttons, then scale them up with setScale (because texture is too small for example) and you need bigger button\r\nand then add them to a ui::Layout (i.e. Vertical) - all buttons will overlap each other.\r\nAlso Margin works incorrectly if objects are scaled. "},"comment":{"url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/comments/81468589","html_url":"https://github.com/cocos2d/cocos2d-x/issues/10727#issuecomment-81468589","issue_url":"https://api.github.com/repos/cocos2d/cocos2d-x/issues/10727","id":81468589,"user":{"login":"stevetranby","id":225665,"avatar_url":"https://avatars.githubusercontent.com/u/225665?v=3","gravatar_id":"","url":"https://api.github.com/users/stevetranby","html_url":"https://github.com/stevetranby","followers_url":"https://api.github.com/users/stevetranby/followers","following_url":"https://api.github.com/users/stevetranby/following{/other_user}","gists_url":"https://api.github.com/users/stevetranby/gists{/gist_id}","starred_url":"https://api.github.com/users/stevetranby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevetranby/subscriptions","organizations_url":"https://api.github.com/users/stevetranby/orgs","repos_url":"https://api.github.com/users/stevetranby/repos","events_url":"https://api.github.com/users/stevetranby/events{/privacy}","received_events_url":"https://api.github.com/users/stevetranby/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T07:43:17Z","updated_at":"2015-03-16T07:43:17Z","body":"I also have this issue. My workaround is changing each ::doLayout(LayoutProtocol* layout) in UILayoutManager `Size cs = child->getContentSize();` => `Size cs = child->boundingBox().size;` (swap child for subWidget in vertical). For the margins you can try making `getLayoutAccumulatedSize()` public and then calling it on each layout. \r\n\r\n\r\n"}}