{"action":"created","comment":{"url":"https://api.github.com/repos/vispy/vispy/pulls/comments/49056564","id":49056564,"diff_hunk":"@@ -35,25 +35,21 @@\n         l.update_gl_state(depth_test=False)\n \n labelgrid = fig[0, 0].view.add_grid(margin=10)\n-hspacer = vp.Widget()\n-hspacer.stretch = (6, 1)\n-labelgrid.add_widget(hspacer, row=0, col=0)\n \n box = vp.Widget(bgcolor=(1, 1, 1, 0.6), border_color='k')\n-labelgrid.add_widget(box, row=0, col=1)\n+box_widget = labelgrid.add_widget(box, row=0, col=1)\n+box_widget.width = 90\n+box_widget.height = 120\n \n-vspacer = vp.Widget()\n-vspacer.stretch = (1, 2)\n-labelgrid.add_widget(vspacer, row=1, col=1)\n+bottom_spacer = vp.Widget()\n+labelgrid.add_widget(bottom_spacer, row=1, col=0)\n \n labels = [vp.Label('n=%d' % plot_nvals[i], color=colors[i], anchor_x='left')\n           for i in range(len(plot_nvals))]\n boxgrid = box.add_grid()\n for i, label in enumerate(labels):\n-    boxgrid.add_widget(label, row=i, col=0)\n-hspacer2 = vp.Widget()\n-hspacer2.stretch = (4, 1)\n-boxgrid.add_widget(hspacer2, row=0, col=1)\n+    label_widget = boxgrid.add_widget(label, row=i, col=0)\n+","path":"examples/basics/plotting/plot.py","position":45,"original_position":45,"commit_id":"fb409b2877d95a7a33590f6a6be6776c1b42fba4","original_commit_id":"ffe3676c678704220553d10a28bc44ac409816c8","user":{"login":"bollu","id":1694861,"avatar_url":"https://avatars.githubusercontent.com/u/1694861?v=3","gravatar_id":"","url":"https://api.github.com/users/bollu","html_url":"https://github.com/bollu","followers_url":"https://api.github.com/users/bollu/followers","following_url":"https://api.github.com/users/bollu/following{/other_user}","gists_url":"https://api.github.com/users/bollu/gists{/gist_id}","starred_url":"https://api.github.com/users/bollu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bollu/subscriptions","organizations_url":"https://api.github.com/users/bollu/orgs","repos_url":"https://api.github.com/users/bollu/repos","events_url":"https://api.github.com/users/bollu/events{/privacy}","received_events_url":"https://api.github.com/users/bollu/received_events","type":"User","site_admin":false},"body":"Ah yes, making them private was on my todo list :)\n\nThere's a contract that I'm not sure how to express properly - the\nGridWidget uses the var_* of its children, even though the var_* are\nprivate.\n\nIn C++, I could use \"friend\" to express that relationship. I'm not sure\nwhat the right was is in Python\n\nOn Thu, 7 Jan 2016 at 12:21 Luke Campagnola <notifications@github.com>\nwrote:\n\n> In examples/basics/plotting/plot.py\n> <https://github.com/vispy/vispy/pull/1049#discussion_r49046052>:\n>\n> >\n> >  labels = [vp.Label('n=%d' % plot_nvals[i], color=colors[i], anchor_x='left')\n> >            for i in range(len(plot_nvals))]\n> >  boxgrid = box.add_grid()\n> >  for i, label in enumerate(labels):\n> > -    boxgrid.add_widget(label, row=i, col=0)\n> > -hspacer2 = vp.Widget()\n> > -hspacer2.stretch = (4, 1)\n> > -boxgrid.add_widget(hspacer2, row=0, col=1)\n> > +    label_widget = boxgrid.add_widget(label, row=i, col=0)\n> > +\n>\n> Bump\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/vispy/vispy/pull/1049/files#r49046052>.\n>\n","created_at":"2016-01-07T09:48:31Z","updated_at":"2016-01-07T09:48:31Z","html_url":"https://github.com/vispy/vispy/pull/1049#discussion_r49056564","pull_request_url":"https://api.github.com/repos/vispy/vispy/pulls/1049","_links":{"self":{"href":"https://api.github.com/repos/vispy/vispy/pulls/comments/49056564"},"html":{"href":"https://github.com/vispy/vispy/pull/1049#discussion_r49056564"},"pull_request":{"href":"https://api.github.com/repos/vispy/vispy/pulls/1049"}}},"pull_request":{"url":"https://api.github.com/repos/vispy/vispy/pulls/1049","id":42167920,"html_url":"https://github.com/vispy/vispy/pull/1049","diff_url":"https://github.com/vispy/vispy/pull/1049.diff","patch_url":"https://github.com/vispy/vispy/pull/1049.patch","issue_url":"https://api.github.com/repos/vispy/vispy/issues/1049","number":1049,"state":"open","locked":false,"title":"[WIP] Layout grids using Cassowary","user":{"login":"bollu","id":1694861,"avatar_url":"https://avatars.githubusercontent.com/u/1694861?v=3","gravatar_id":"","url":"https://api.github.com/users/bollu","html_url":"https://github.com/bollu","followers_url":"https://api.github.com/users/bollu/followers","following_url":"https://api.github.com/users/bollu/following{/other_user}","gists_url":"https://api.github.com/users/bollu/gists{/gist_id}","starred_url":"https://api.github.com/users/bollu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bollu/subscriptions","organizations_url":"https://api.github.com/users/bollu/orgs","repos_url":"https://api.github.com/users/bollu/repos","events_url":"https://api.github.com/users/bollu/events{/privacy}","received_events_url":"https://api.github.com/users/bollu/received_events","type":"User","site_admin":false},"body":"- [ ] Get baseline implementation working (just layout, no padding / margins)\r\n- [ ] Implement margins\r\n- [ ] Implement padding\r\n\r\n- [ ] document code\r\n- [ ] Regular test cases\r\n- [ ] Pathological extreme test cases ","created_at":"2015-08-11T19:31:21Z","updated_at":"2016-01-07T09:48:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76c1b895372ed082fa54b514935c3fed4fcd6275","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vispy/vispy/pulls/1049/commits","review_comments_url":"https://api.github.com/repos/vispy/vispy/pulls/1049/comments","review_comment_url":"https://api.github.com/repos/vispy/vispy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vispy/vispy/issues/1049/comments","statuses_url":"https://api.github.com/repos/vispy/vispy/statuses/fb409b2877d95a7a33590f6a6be6776c1b42fba4","head":{"label":"bollu:cassowary-constaints","ref":"cassowary-constaints","sha":"fb409b2877d95a7a33590f6a6be6776c1b42fba4","user":{"login":"bollu","id":1694861,"avatar_url":"https://avatars.githubusercontent.com/u/1694861?v=3","gravatar_id":"","url":"https://api.github.com/users/bollu","html_url":"https://github.com/bollu","followers_url":"https://api.github.com/users/bollu/followers","following_url":"https://api.github.com/users/bollu/following{/other_user}","gists_url":"https://api.github.com/users/bollu/gists{/gist_id}","starred_url":"https://api.github.com/users/bollu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bollu/subscriptions","organizations_url":"https://api.github.com/users/bollu/orgs","repos_url":"https://api.github.com/users/bollu/repos","events_url":"https://api.github.com/users/bollu/events{/privacy}","received_events_url":"https://api.github.com/users/bollu/received_events","type":"User","site_admin":false},"repo":{"id":31825193,"name":"vispy","full_name":"bollu/vispy","owner":{"login":"bollu","id":1694861,"avatar_url":"https://avatars.githubusercontent.com/u/1694861?v=3","gravatar_id":"","url":"https://api.github.com/users/bollu","html_url":"https://github.com/bollu","followers_url":"https://api.github.com/users/bollu/followers","following_url":"https://api.github.com/users/bollu/following{/other_user}","gists_url":"https://api.github.com/users/bollu/gists{/gist_id}","starred_url":"https://api.github.com/users/bollu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bollu/subscriptions","organizations_url":"https://api.github.com/users/bollu/orgs","repos_url":"https://api.github.com/users/bollu/repos","events_url":"https://api.github.com/users/bollu/events{/privacy}","received_events_url":"https://api.github.com/users/bollu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bollu/vispy","description":"Main repository for Vispy","fork":true,"url":"https://api.github.com/repos/bollu/vispy","forks_url":"https://api.github.com/repos/bollu/vispy/forks","keys_url":"https://api.github.com/repos/bollu/vispy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bollu/vispy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bollu/vispy/teams","hooks_url":"https://api.github.com/repos/bollu/vispy/hooks","issue_events_url":"https://api.github.com/repos/bollu/vispy/issues/events{/number}","events_url":"https://api.github.com/repos/bollu/vispy/events","assignees_url":"https://api.github.com/repos/bollu/vispy/assignees{/user}","branches_url":"https://api.github.com/repos/bollu/vispy/branches{/branch}","tags_url":"https://api.github.com/repos/bollu/vispy/tags","blobs_url":"https://api.github.com/repos/bollu/vispy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bollu/vispy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bollu/vispy/git/refs{/sha}","trees_url":"https://api.github.com/repos/bollu/vispy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bollu/vispy/statuses/{sha}","languages_url":"https://api.github.com/repos/bollu/vispy/languages","stargazers_url":"https://api.github.com/repos/bollu/vispy/stargazers","contributors_url":"https://api.github.com/repos/bollu/vispy/contributors","subscribers_url":"https://api.github.com/repos/bollu/vispy/subscribers","subscription_url":"https://api.github.com/repos/bollu/vispy/subscription","commits_url":"https://api.github.com/repos/bollu/vispy/commits{/sha}","git_commits_url":"https://api.github.com/repos/bollu/vispy/git/commits{/sha}","comments_url":"https://api.github.com/repos/bollu/vispy/comments{/number}","issue_comment_url":"https://api.github.com/repos/bollu/vispy/issues/comments{/number}","contents_url":"https://api.github.com/repos/bollu/vispy/contents/{+path}","compare_url":"https://api.github.com/repos/bollu/vispy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bollu/vispy/merges","archive_url":"https://api.github.com/repos/bollu/vispy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bollu/vispy/downloads","issues_url":"https://api.github.com/repos/bollu/vispy/issues{/number}","pulls_url":"https://api.github.com/repos/bollu/vispy/pulls{/number}","milestones_url":"https://api.github.com/repos/bollu/vispy/milestones{/number}","notifications_url":"https://api.github.com/repos/bollu/vispy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bollu/vispy/labels{/name}","releases_url":"https://api.github.com/repos/bollu/vispy/releases{/id}","created_at":"2015-03-07T19:53:28Z","updated_at":"2015-03-07T19:53:30Z","pushed_at":"2016-01-03T18:52:10Z","git_url":"git://github.com/bollu/vispy.git","ssh_url":"git@github.com:bollu/vispy.git","clone_url":"https://github.com/bollu/vispy.git","svn_url":"https://github.com/bollu/vispy","homepage":"http://vispy.org","size":9856,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vispy:master","ref":"master","sha":"7cc1bf5b02745022fae5e5046704c39dde7b300c","user":{"login":"vispy","id":3934254,"avatar_url":"https://avatars.githubusercontent.com/u/3934254?v=3","gravatar_id":"","url":"https://api.github.com/users/vispy","html_url":"https://github.com/vispy","followers_url":"https://api.github.com/users/vispy/followers","following_url":"https://api.github.com/users/vispy/following{/other_user}","gists_url":"https://api.github.com/users/vispy/gists{/gist_id}","starred_url":"https://api.github.com/users/vispy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vispy/subscriptions","organizations_url":"https://api.github.com/users/vispy/orgs","repos_url":"https://api.github.com/users/vispy/repos","events_url":"https://api.github.com/users/vispy/events{/privacy}","received_events_url":"https://api.github.com/users/vispy/received_events","type":"Organization","site_admin":false},"repo":{"id":8935948,"name":"vispy","full_name":"vispy/vispy","owner":{"login":"vispy","id":3934254,"avatar_url":"https://avatars.githubusercontent.com/u/3934254?v=3","gravatar_id":"","url":"https://api.github.com/users/vispy","html_url":"https://github.com/vispy","followers_url":"https://api.github.com/users/vispy/followers","following_url":"https://api.github.com/users/vispy/following{/other_user}","gists_url":"https://api.github.com/users/vispy/gists{/gist_id}","starred_url":"https://api.github.com/users/vispy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vispy/subscriptions","organizations_url":"https://api.github.com/users/vispy/orgs","repos_url":"https://api.github.com/users/vispy/repos","events_url":"https://api.github.com/users/vispy/events{/privacy}","received_events_url":"https://api.github.com/users/vispy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vispy/vispy","description":"Main repository for Vispy","fork":false,"url":"https://api.github.com/repos/vispy/vispy","forks_url":"https://api.github.com/repos/vispy/vispy/forks","keys_url":"https://api.github.com/repos/vispy/vispy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vispy/vispy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vispy/vispy/teams","hooks_url":"https://api.github.com/repos/vispy/vispy/hooks","issue_events_url":"https://api.github.com/repos/vispy/vispy/issues/events{/number}","events_url":"https://api.github.com/repos/vispy/vispy/events","assignees_url":"https://api.github.com/repos/vispy/vispy/assignees{/user}","branches_url":"https://api.github.com/repos/vispy/vispy/branches{/branch}","tags_url":"https://api.github.com/repos/vispy/vispy/tags","blobs_url":"https://api.github.com/repos/vispy/vispy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vispy/vispy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vispy/vispy/git/refs{/sha}","trees_url":"https://api.github.com/repos/vispy/vispy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vispy/vispy/statuses/{sha}","languages_url":"https://api.github.com/repos/vispy/vispy/languages","stargazers_url":"https://api.github.com/repos/vispy/vispy/stargazers","contributors_url":"https://api.github.com/repos/vispy/vispy/contributors","subscribers_url":"https://api.github.com/repos/vispy/vispy/subscribers","subscription_url":"https://api.github.com/repos/vispy/vispy/subscription","commits_url":"https://api.github.com/repos/vispy/vispy/commits{/sha}","git_commits_url":"https://api.github.com/repos/vispy/vispy/git/commits{/sha}","comments_url":"https://api.github.com/repos/vispy/vispy/comments{/number}","issue_comment_url":"https://api.github.com/repos/vispy/vispy/issues/comments{/number}","contents_url":"https://api.github.com/repos/vispy/vispy/contents/{+path}","compare_url":"https://api.github.com/repos/vispy/vispy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vispy/vispy/merges","archive_url":"https://api.github.com/repos/vispy/vispy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vispy/vispy/downloads","issues_url":"https://api.github.com/repos/vispy/vispy/issues{/number}","pulls_url":"https://api.github.com/repos/vispy/vispy/pulls{/number}","milestones_url":"https://api.github.com/repos/vispy/vispy/milestones{/number}","notifications_url":"https://api.github.com/repos/vispy/vispy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vispy/vispy/labels{/name}","releases_url":"https://api.github.com/repos/vispy/vispy/releases{/id}","created_at":"2013-03-21T18:43:22Z","updated_at":"2016-01-06T09:43:47Z","pushed_at":"2016-01-03T18:52:10Z","git_url":"git://github.com/vispy/vispy.git","ssh_url":"git@github.com:vispy/vispy.git","clone_url":"https://github.com/vispy/vispy.git","svn_url":"https://github.com/vispy/vispy","homepage":"http://vispy.org","size":11710,"stargazers_count":868,"watchers_count":868,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":169,"mirror_url":null,"open_issues_count":202,"forks":169,"open_issues":202,"watchers":868,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vispy/vispy/pulls/1049"},"html":{"href":"https://github.com/vispy/vispy/pull/1049"},"issue":{"href":"https://api.github.com/repos/vispy/vispy/issues/1049"},"comments":{"href":"https://api.github.com/repos/vispy/vispy/issues/1049/comments"},"review_comments":{"href":"https://api.github.com/repos/vispy/vispy/pulls/1049/comments"},"review_comment":{"href":"https://api.github.com/repos/vispy/vispy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vispy/vispy/pulls/1049/commits"},"statuses":{"href":"https://api.github.com/repos/vispy/vispy/statuses/fb409b2877d95a7a33590f6a6be6776c1b42fba4"}}}}