{"action":"created","comment":{"url":"https://api.github.com/repos/gerbilvis/gerbil/pulls/comments/34172993","id":34172993,"diff_hunk":"@@ -521,16 +539,34 @@ void Viewport::drawLegend(QPainter *painter, int sel)\n \t\t\tpainter->setPen(Qt::white);\n \t}\n \n+\n+    //drawing background for y-axis\n+    QPointF ytp(0, 0);\n+    QPointF ybp(60, height);\n+    QRectF ybgrect(ytp, ybp);\n+\n+    painter->save();\n+    painter->setPen(QColor(0,0,0, 128));\n+    painter->fillRect(ybgrect, QBrush(QColor(0,0,0,128)));\n+    painter->drawRect(ybgrect);\n+    painter->restore();\n+\n+\n \t/// y-axis\n \tfor (size_t i = 0; i < yaxis.size(); ++i) {\n \t\tfloat ifrac = (float)(i)/(float)(yaxis.size()-1) * (float)((*ctx)->nbins - 1);\n-\t\tQPointF b = modelview.map(QPointF(0.f, (float)((*ctx)->nbins - 1) - ifrac));\n-\t\tb += QPointF(-8.f, 20.f); // draw left of data, vcenter alignment\n-\t\tQPointF t = b;\n-\t\tt -= QPointF(200.f, 40.f); // draw left of data, vcenter alignment\n-\t\tQRectF rect(t, b);\n-\t\tpainter->drawText(rect, Qt::AlignVCenter | Qt::AlignRight, yaxis[i]);\n-\t}\n+        QPointF b = modelview.map(QPointF(0.f, (float)((*ctx)->nbins - 1) - ifrac));\n+\n+        QPointF t = b;\n+        t -= QPointF(200.f, 40.f); // draw left of data, vcenter alignment","path":"gui/dist_view/viewport_drawing.cpp","position":117,"original_position":117,"commit_id":"e63fddb3957311afffc58f8b1e4b0252090d1eb7","original_commit_id":"e63fddb3957311afffc58f8b1e4b0252090d1eb7","user":{"login":"ypnos","id":8481470,"avatar_url":"https://avatars.githubusercontent.com/u/8481470?v=3","gravatar_id":"","url":"https://api.github.com/users/ypnos","html_url":"https://github.com/ypnos","followers_url":"https://api.github.com/users/ypnos/followers","following_url":"https://api.github.com/users/ypnos/following{/other_user}","gists_url":"https://api.github.com/users/ypnos/gists{/gist_id}","starred_url":"https://api.github.com/users/ypnos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ypnos/subscriptions","organizations_url":"https://api.github.com/users/ypnos/orgs","repos_url":"https://api.github.com/users/ypnos/repos","events_url":"https://api.github.com/users/ypnos/events{/privacy}","received_events_url":"https://api.github.com/users/ypnos/received_events","type":"User","site_admin":false},"body":"we set x to zero afterwards. so here only change y and update comment accordingly.","created_at":"2015-07-08T17:15:48Z","updated_at":"2015-07-08T17:15:48Z","html_url":"https://github.com/gerbilvis/gerbil/pull/2#discussion_r34172993","pull_request_url":"https://api.github.com/repos/gerbilvis/gerbil/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/gerbilvis/gerbil/pulls/comments/34172993"},"html":{"href":"https://github.com/gerbilvis/gerbil/pull/2#discussion_r34172993"},"pull_request":{"href":"https://api.github.com/repos/gerbilvis/gerbil/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/gerbilvis/gerbil/pulls/2","id":39201667,"html_url":"https://github.com/gerbilvis/gerbil/pull/2","diff_url":"https://github.com/gerbilvis/gerbil/pull/2.diff","patch_url":"https://github.com/gerbilvis/gerbil/pull/2.patch","issue_url":"https://api.github.com/repos/gerbilvis/gerbil/issues/2","number":2,"state":"open","locked":false,"title":"Improved panning/zooming and axes drawing in Viewport","user":{"login":"ajaskier","id":8076184,"avatar_url":"https://avatars.githubusercontent.com/u/8076184?v=3","gravatar_id":"","url":"https://api.github.com/users/ajaskier","html_url":"https://github.com/ajaskier","followers_url":"https://api.github.com/users/ajaskier/followers","following_url":"https://api.github.com/users/ajaskier/following{/other_user}","gists_url":"https://api.github.com/users/ajaskier/gists{/gist_id}","starred_url":"https://api.github.com/users/ajaskier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajaskier/subscriptions","organizations_url":"https://api.github.com/users/ajaskier/orgs","repos_url":"https://api.github.com/users/ajaskier/repos","events_url":"https://api.github.com/users/ajaskier/events{/privacy}","received_events_url":"https://api.github.com/users/ajaskier/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-04T02:53:26Z","updated_at":"2015-07-08T17:15:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4701734b0a2f8ab4a4bd977ce2e784b59d1ccb45","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gerbilvis/gerbil/pulls/2/commits","review_comments_url":"https://api.github.com/repos/gerbilvis/gerbil/pulls/2/comments","review_comment_url":"https://api.github.com/repos/gerbilvis/gerbil/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gerbilvis/gerbil/issues/2/comments","statuses_url":"https://api.github.com/repos/gerbilvis/gerbil/statuses/e63fddb3957311afffc58f8b1e4b0252090d1eb7","head":{"label":"ajaskier:socis2015project2","ref":"socis2015project2","sha":"e63fddb3957311afffc58f8b1e4b0252090d1eb7","user":{"login":"ajaskier","id":8076184,"avatar_url":"https://avatars.githubusercontent.com/u/8076184?v=3","gravatar_id":"","url":"https://api.github.com/users/ajaskier","html_url":"https://github.com/ajaskier","followers_url":"https://api.github.com/users/ajaskier/followers","following_url":"https://api.github.com/users/ajaskier/following{/other_user}","gists_url":"https://api.github.com/users/ajaskier/gists{/gist_id}","starred_url":"https://api.github.com/users/ajaskier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajaskier/subscriptions","organizations_url":"https://api.github.com/users/ajaskier/orgs","repos_url":"https://api.github.com/users/ajaskier/repos","events_url":"https://api.github.com/users/ajaskier/events{/privacy}","received_events_url":"https://api.github.com/users/ajaskier/received_events","type":"User","site_admin":false},"repo":{"id":38458067,"name":"gerbil","full_name":"ajaskier/gerbil","owner":{"login":"ajaskier","id":8076184,"avatar_url":"https://avatars.githubusercontent.com/u/8076184?v=3","gravatar_id":"","url":"https://api.github.com/users/ajaskier","html_url":"https://github.com/ajaskier","followers_url":"https://api.github.com/users/ajaskier/followers","following_url":"https://api.github.com/users/ajaskier/following{/other_user}","gists_url":"https://api.github.com/users/ajaskier/gists{/gist_id}","starred_url":"https://api.github.com/users/ajaskier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajaskier/subscriptions","organizations_url":"https://api.github.com/users/ajaskier/orgs","repos_url":"https://api.github.com/users/ajaskier/repos","events_url":"https://api.github.com/users/ajaskier/events{/privacy}","received_events_url":"https://api.github.com/users/ajaskier/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajaskier/gerbil","description":"Gerbil Hyperspectral Visualization and Analysis Framework","fork":true,"url":"https://api.github.com/repos/ajaskier/gerbil","forks_url":"https://api.github.com/repos/ajaskier/gerbil/forks","keys_url":"https://api.github.com/repos/ajaskier/gerbil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajaskier/gerbil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajaskier/gerbil/teams","hooks_url":"https://api.github.com/repos/ajaskier/gerbil/hooks","issue_events_url":"https://api.github.com/repos/ajaskier/gerbil/issues/events{/number}","events_url":"https://api.github.com/repos/ajaskier/gerbil/events","assignees_url":"https://api.github.com/repos/ajaskier/gerbil/assignees{/user}","branches_url":"https://api.github.com/repos/ajaskier/gerbil/branches{/branch}","tags_url":"https://api.github.com/repos/ajaskier/gerbil/tags","blobs_url":"https://api.github.com/repos/ajaskier/gerbil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajaskier/gerbil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajaskier/gerbil/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajaskier/gerbil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajaskier/gerbil/statuses/{sha}","languages_url":"https://api.github.com/repos/ajaskier/gerbil/languages","stargazers_url":"https://api.github.com/repos/ajaskier/gerbil/stargazers","contributors_url":"https://api.github.com/repos/ajaskier/gerbil/contributors","subscribers_url":"https://api.github.com/repos/ajaskier/gerbil/subscribers","subscription_url":"https://api.github.com/repos/ajaskier/gerbil/subscription","commits_url":"https://api.github.com/repos/ajaskier/gerbil/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajaskier/gerbil/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajaskier/gerbil/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajaskier/gerbil/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajaskier/gerbil/contents/{+path}","compare_url":"https://api.github.com/repos/ajaskier/gerbil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajaskier/gerbil/merges","archive_url":"https://api.github.com/repos/ajaskier/gerbil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajaskier/gerbil/downloads","issues_url":"https://api.github.com/repos/ajaskier/gerbil/issues{/number}","pulls_url":"https://api.github.com/repos/ajaskier/gerbil/pulls{/number}","milestones_url":"https://api.github.com/repos/ajaskier/gerbil/milestones{/number}","notifications_url":"https://api.github.com/repos/ajaskier/gerbil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajaskier/gerbil/labels{/name}","releases_url":"https://api.github.com/repos/ajaskier/gerbil/releases{/id}","created_at":"2015-07-02T21:34:22Z","updated_at":"2015-07-02T21:34:24Z","pushed_at":"2015-07-06T13:10:44Z","git_url":"git://github.com/ajaskier/gerbil.git","ssh_url":"git@github.com:ajaskier/gerbil.git","clone_url":"https://github.com/ajaskier/gerbil.git","svn_url":"https://github.com/ajaskier/gerbil","homepage":"http://gerbilvis.org","size":0,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"gerbilvis:master","ref":"master","sha":"c84fcbf6277401cd31fc516a5f00e7faf0b4f225","user":{"login":"gerbilvis","id":13156887,"avatar_url":"https://avatars.githubusercontent.com/u/13156887?v=3","gravatar_id":"","url":"https://api.github.com/users/gerbilvis","html_url":"https://github.com/gerbilvis","followers_url":"https://api.github.com/users/gerbilvis/followers","following_url":"https://api.github.com/users/gerbilvis/following{/other_user}","gists_url":"https://api.github.com/users/gerbilvis/gists{/gist_id}","starred_url":"https://api.github.com/users/gerbilvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerbilvis/subscriptions","organizations_url":"https://api.github.com/users/gerbilvis/orgs","repos_url":"https://api.github.com/users/gerbilvis/repos","events_url":"https://api.github.com/users/gerbilvis/events{/privacy}","received_events_url":"https://api.github.com/users/gerbilvis/received_events","type":"Organization","site_admin":false},"repo":{"id":38456165,"name":"gerbil","full_name":"gerbilvis/gerbil","owner":{"login":"gerbilvis","id":13156887,"avatar_url":"https://avatars.githubusercontent.com/u/13156887?v=3","gravatar_id":"","url":"https://api.github.com/users/gerbilvis","html_url":"https://github.com/gerbilvis","followers_url":"https://api.github.com/users/gerbilvis/followers","following_url":"https://api.github.com/users/gerbilvis/following{/other_user}","gists_url":"https://api.github.com/users/gerbilvis/gists{/gist_id}","starred_url":"https://api.github.com/users/gerbilvis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerbilvis/subscriptions","organizations_url":"https://api.github.com/users/gerbilvis/orgs","repos_url":"https://api.github.com/users/gerbilvis/repos","events_url":"https://api.github.com/users/gerbilvis/events{/privacy}","received_events_url":"https://api.github.com/users/gerbilvis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gerbilvis/gerbil","description":"Gerbil Hyperspectral Visualization and Analysis Framework","fork":false,"url":"https://api.github.com/repos/gerbilvis/gerbil","forks_url":"https://api.github.com/repos/gerbilvis/gerbil/forks","keys_url":"https://api.github.com/repos/gerbilvis/gerbil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gerbilvis/gerbil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gerbilvis/gerbil/teams","hooks_url":"https://api.github.com/repos/gerbilvis/gerbil/hooks","issue_events_url":"https://api.github.com/repos/gerbilvis/gerbil/issues/events{/number}","events_url":"https://api.github.com/repos/gerbilvis/gerbil/events","assignees_url":"https://api.github.com/repos/gerbilvis/gerbil/assignees{/user}","branches_url":"https://api.github.com/repos/gerbilvis/gerbil/branches{/branch}","tags_url":"https://api.github.com/repos/gerbilvis/gerbil/tags","blobs_url":"https://api.github.com/repos/gerbilvis/gerbil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gerbilvis/gerbil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gerbilvis/gerbil/git/refs{/sha}","trees_url":"https://api.github.com/repos/gerbilvis/gerbil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gerbilvis/gerbil/statuses/{sha}","languages_url":"https://api.github.com/repos/gerbilvis/gerbil/languages","stargazers_url":"https://api.github.com/repos/gerbilvis/gerbil/stargazers","contributors_url":"https://api.github.com/repos/gerbilvis/gerbil/contributors","subscribers_url":"https://api.github.com/repos/gerbilvis/gerbil/subscribers","subscription_url":"https://api.github.com/repos/gerbilvis/gerbil/subscription","commits_url":"https://api.github.com/repos/gerbilvis/gerbil/commits{/sha}","git_commits_url":"https://api.github.com/repos/gerbilvis/gerbil/git/commits{/sha}","comments_url":"https://api.github.com/repos/gerbilvis/gerbil/comments{/number}","issue_comment_url":"https://api.github.com/repos/gerbilvis/gerbil/issues/comments{/number}","contents_url":"https://api.github.com/repos/gerbilvis/gerbil/contents/{+path}","compare_url":"https://api.github.com/repos/gerbilvis/gerbil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gerbilvis/gerbil/merges","archive_url":"https://api.github.com/repos/gerbilvis/gerbil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gerbilvis/gerbil/downloads","issues_url":"https://api.github.com/repos/gerbilvis/gerbil/issues{/number}","pulls_url":"https://api.github.com/repos/gerbilvis/gerbil/pulls{/number}","milestones_url":"https://api.github.com/repos/gerbilvis/gerbil/milestones{/number}","notifications_url":"https://api.github.com/repos/gerbilvis/gerbil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gerbilvis/gerbil/labels{/name}","releases_url":"https://api.github.com/repos/gerbilvis/gerbil/releases{/id}","created_at":"2015-07-02T20:47:18Z","updated_at":"2015-07-02T21:03:38Z","pushed_at":"2015-07-06T13:15:10Z","git_url":"git://github.com/gerbilvis/gerbil.git","ssh_url":"git@github.com:gerbilvis/gerbil.git","clone_url":"https://github.com/gerbilvis/gerbil.git","svn_url":"https://github.com/gerbilvis/gerbil","homepage":"http://gerbilvis.org","size":0,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gerbilvis/gerbil/pulls/2"},"html":{"href":"https://github.com/gerbilvis/gerbil/pull/2"},"issue":{"href":"https://api.github.com/repos/gerbilvis/gerbil/issues/2"},"comments":{"href":"https://api.github.com/repos/gerbilvis/gerbil/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/gerbilvis/gerbil/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/gerbilvis/gerbil/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gerbilvis/gerbil/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/gerbilvis/gerbil/statuses/e63fddb3957311afffc58f8b1e4b0252090d1eb7"}}}}