{"action":"created","comment":{"url":"https://api.github.com/repos/mujx/nheko/pulls/comments/166310426","pull_request_review_id":94355632,"id":166310426,"diff_hunk":"@@ -61,6 +63,14 @@ TimelineItem::init()\n \n         mainLayout_->setContentsMargins(conf::timeline::headerLeftMargin, 0, 0, 0);\n         mainLayout_->setSpacing(0);\n+\n+        // Setting fixed width for checkmark because systems may have a differing width for a\n+        // space and the Unicode checkmark.\n+        checkmark_ = new QLabel(\" \", this);\n+        checkmark_->setFixedWidth(fm.width(CHECKMARK));","path":"src/timeline/TimelineItem.cc","position":17,"original_position":17,"commit_id":"0c2979126fb35cdbbd4683782a5b6c8e8f714aff","original_commit_id":"0c2979126fb35cdbbd4683782a5b6c8e8f714aff","user":{"login":"mujx","id":6430350,"avatar_url":"https://avatars1.githubusercontent.com/u/6430350?v=4","gravatar_id":"","url":"https://api.github.com/users/mujx","html_url":"https://github.com/mujx","followers_url":"https://api.github.com/users/mujx/followers","following_url":"https://api.github.com/users/mujx/following{/other_user}","gists_url":"https://api.github.com/users/mujx/gists{/gist_id}","starred_url":"https://api.github.com/users/mujx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mujx/subscriptions","organizations_url":"https://api.github.com/users/mujx/orgs","repos_url":"https://api.github.com/users/mujx/repos","events_url":"https://api.github.com/users/mujx/events{/privacy}","received_events_url":"https://api.github.com/users/mujx/received_events","type":"User","site_admin":false},"body":"The font used here to calculate the width doesn't not have the same size as the one be used on the label. I would suggest to create a temporary font with the correct font size and use that to derive the width.","created_at":"2018-02-06T14:12:31Z","updated_at":"2018-02-06T14:48:33Z","html_url":"https://github.com/mujx/nheko/pull/227#discussion_r166310426","pull_request_url":"https://api.github.com/repos/mujx/nheko/pulls/227","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/mujx/nheko/pulls/comments/166310426"},"html":{"href":"https://github.com/mujx/nheko/pull/227#discussion_r166310426"},"pull_request":{"href":"https://api.github.com/repos/mujx/nheko/pulls/227"}}},"pull_request":{"url":"https://api.github.com/repos/mujx/nheko/pulls/227","id":167242291,"html_url":"https://github.com/mujx/nheko/pull/227","diff_url":"https://github.com/mujx/nheko/pull/227.diff","patch_url":"https://github.com/mujx/nheko/pull/227.patch","issue_url":"https://api.github.com/repos/mujx/nheko/issues/227","number":227,"state":"open","locked":false,"title":"Fix #217: create space for checkmark beforehand","user":{"login":"christarazi","id":3885308,"avatar_url":"https://avatars2.githubusercontent.com/u/3885308?v=4","gravatar_id":"","url":"https://api.github.com/users/christarazi","html_url":"https://github.com/christarazi","followers_url":"https://api.github.com/users/christarazi/followers","following_url":"https://api.github.com/users/christarazi/following{/other_user}","gists_url":"https://api.github.com/users/christarazi/gists{/gist_id}","starred_url":"https://api.github.com/users/christarazi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christarazi/subscriptions","organizations_url":"https://api.github.com/users/christarazi/orgs","repos_url":"https://api.github.com/users/christarazi/repos","events_url":"https://api.github.com/users/christarazi/events{/privacy}","received_events_url":"https://api.github.com/users/christarazi/received_events","type":"User","site_admin":false},"body":"Allocates a \" \" (space character) to be a placeholder until the message is verifiably received on the other side. This seems to fix the issue because the checkmark was previously being inserted into the layout at run-time, which would move other push the widgets surrounding it. ","created_at":"2018-02-05T20:08:39Z","updated_at":"2018-02-06T14:48:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9482fe1106211293617144680de50f424f0db414","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/mujx/nheko/pulls/227/commits","review_comments_url":"https://api.github.com/repos/mujx/nheko/pulls/227/comments","review_comment_url":"https://api.github.com/repos/mujx/nheko/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mujx/nheko/issues/227/comments","statuses_url":"https://api.github.com/repos/mujx/nheko/statuses/0c2979126fb35cdbbd4683782a5b6c8e8f714aff","head":{"label":"christarazi:fix-text-wrap-checkmark","ref":"fix-text-wrap-checkmark","sha":"0c2979126fb35cdbbd4683782a5b6c8e8f714aff","user":{"login":"christarazi","id":3885308,"avatar_url":"https://avatars2.githubusercontent.com/u/3885308?v=4","gravatar_id":"","url":"https://api.github.com/users/christarazi","html_url":"https://github.com/christarazi","followers_url":"https://api.github.com/users/christarazi/followers","following_url":"https://api.github.com/users/christarazi/following{/other_user}","gists_url":"https://api.github.com/users/christarazi/gists{/gist_id}","starred_url":"https://api.github.com/users/christarazi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christarazi/subscriptions","organizations_url":"https://api.github.com/users/christarazi/orgs","repos_url":"https://api.github.com/users/christarazi/repos","events_url":"https://api.github.com/users/christarazi/events{/privacy}","received_events_url":"https://api.github.com/users/christarazi/received_events","type":"User","site_admin":false},"repo":{"id":112035485,"name":"nheko","full_name":"christarazi/nheko","owner":{"login":"christarazi","id":3885308,"avatar_url":"https://avatars2.githubusercontent.com/u/3885308?v=4","gravatar_id":"","url":"https://api.github.com/users/christarazi","html_url":"https://github.com/christarazi","followers_url":"https://api.github.com/users/christarazi/followers","following_url":"https://api.github.com/users/christarazi/following{/other_user}","gists_url":"https://api.github.com/users/christarazi/gists{/gist_id}","starred_url":"https://api.github.com/users/christarazi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christarazi/subscriptions","organizations_url":"https://api.github.com/users/christarazi/orgs","repos_url":"https://api.github.com/users/christarazi/repos","events_url":"https://api.github.com/users/christarazi/events{/privacy}","received_events_url":"https://api.github.com/users/christarazi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/christarazi/nheko","description":"Desktop client for the Matrix protocol","fork":true,"url":"https://api.github.com/repos/christarazi/nheko","forks_url":"https://api.github.com/repos/christarazi/nheko/forks","keys_url":"https://api.github.com/repos/christarazi/nheko/keys{/key_id}","collaborators_url":"https://api.github.com/repos/christarazi/nheko/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/christarazi/nheko/teams","hooks_url":"https://api.github.com/repos/christarazi/nheko/hooks","issue_events_url":"https://api.github.com/repos/christarazi/nheko/issues/events{/number}","events_url":"https://api.github.com/repos/christarazi/nheko/events","assignees_url":"https://api.github.com/repos/christarazi/nheko/assignees{/user}","branches_url":"https://api.github.com/repos/christarazi/nheko/branches{/branch}","tags_url":"https://api.github.com/repos/christarazi/nheko/tags","blobs_url":"https://api.github.com/repos/christarazi/nheko/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/christarazi/nheko/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/christarazi/nheko/git/refs{/sha}","trees_url":"https://api.github.com/repos/christarazi/nheko/git/trees{/sha}","statuses_url":"https://api.github.com/repos/christarazi/nheko/statuses/{sha}","languages_url":"https://api.github.com/repos/christarazi/nheko/languages","stargazers_url":"https://api.github.com/repos/christarazi/nheko/stargazers","contributors_url":"https://api.github.com/repos/christarazi/nheko/contributors","subscribers_url":"https://api.github.com/repos/christarazi/nheko/subscribers","subscription_url":"https://api.github.com/repos/christarazi/nheko/subscription","commits_url":"https://api.github.com/repos/christarazi/nheko/commits{/sha}","git_commits_url":"https://api.github.com/repos/christarazi/nheko/git/commits{/sha}","comments_url":"https://api.github.com/repos/christarazi/nheko/comments{/number}","issue_comment_url":"https://api.github.com/repos/christarazi/nheko/issues/comments{/number}","contents_url":"https://api.github.com/repos/christarazi/nheko/contents/{+path}","compare_url":"https://api.github.com/repos/christarazi/nheko/compare/{base}...{head}","merges_url":"https://api.github.com/repos/christarazi/nheko/merges","archive_url":"https://api.github.com/repos/christarazi/nheko/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/christarazi/nheko/downloads","issues_url":"https://api.github.com/repos/christarazi/nheko/issues{/number}","pulls_url":"https://api.github.com/repos/christarazi/nheko/pulls{/number}","milestones_url":"https://api.github.com/repos/christarazi/nheko/milestones{/number}","notifications_url":"https://api.github.com/repos/christarazi/nheko/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/christarazi/nheko/labels{/name}","releases_url":"https://api.github.com/repos/christarazi/nheko/releases{/id}","deployments_url":"https://api.github.com/repos/christarazi/nheko/deployments","created_at":"2017-11-25T21:25:21Z","updated_at":"2017-11-25T21:25:23Z","pushed_at":"2018-02-06T04:45:58Z","git_url":"git://github.com/christarazi/nheko.git","ssh_url":"git@github.com:christarazi/nheko.git","clone_url":"https://github.com/christarazi/nheko.git","svn_url":"https://github.com/christarazi/nheko","homepage":"","size":4789,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mujx:master","ref":"master","sha":"b6c39abcb45180b29d8b1f4f20cf20350a2ef6c9","user":{"login":"mujx","id":6430350,"avatar_url":"https://avatars1.githubusercontent.com/u/6430350?v=4","gravatar_id":"","url":"https://api.github.com/users/mujx","html_url":"https://github.com/mujx","followers_url":"https://api.github.com/users/mujx/followers","following_url":"https://api.github.com/users/mujx/following{/other_user}","gists_url":"https://api.github.com/users/mujx/gists{/gist_id}","starred_url":"https://api.github.com/users/mujx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mujx/subscriptions","organizations_url":"https://api.github.com/users/mujx/orgs","repos_url":"https://api.github.com/users/mujx/repos","events_url":"https://api.github.com/users/mujx/events{/privacy}","received_events_url":"https://api.github.com/users/mujx/received_events","type":"User","site_admin":false},"repo":{"id":87364100,"name":"nheko","full_name":"mujx/nheko","owner":{"login":"mujx","id":6430350,"avatar_url":"https://avatars1.githubusercontent.com/u/6430350?v=4","gravatar_id":"","url":"https://api.github.com/users/mujx","html_url":"https://github.com/mujx","followers_url":"https://api.github.com/users/mujx/followers","following_url":"https://api.github.com/users/mujx/following{/other_user}","gists_url":"https://api.github.com/users/mujx/gists{/gist_id}","starred_url":"https://api.github.com/users/mujx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mujx/subscriptions","organizations_url":"https://api.github.com/users/mujx/orgs","repos_url":"https://api.github.com/users/mujx/repos","events_url":"https://api.github.com/users/mujx/events{/privacy}","received_events_url":"https://api.github.com/users/mujx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mujx/nheko","description":"Desktop client for the Matrix protocol","fork":false,"url":"https://api.github.com/repos/mujx/nheko","forks_url":"https://api.github.com/repos/mujx/nheko/forks","keys_url":"https://api.github.com/repos/mujx/nheko/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mujx/nheko/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mujx/nheko/teams","hooks_url":"https://api.github.com/repos/mujx/nheko/hooks","issue_events_url":"https://api.github.com/repos/mujx/nheko/issues/events{/number}","events_url":"https://api.github.com/repos/mujx/nheko/events","assignees_url":"https://api.github.com/repos/mujx/nheko/assignees{/user}","branches_url":"https://api.github.com/repos/mujx/nheko/branches{/branch}","tags_url":"https://api.github.com/repos/mujx/nheko/tags","blobs_url":"https://api.github.com/repos/mujx/nheko/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mujx/nheko/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mujx/nheko/git/refs{/sha}","trees_url":"https://api.github.com/repos/mujx/nheko/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mujx/nheko/statuses/{sha}","languages_url":"https://api.github.com/repos/mujx/nheko/languages","stargazers_url":"https://api.github.com/repos/mujx/nheko/stargazers","contributors_url":"https://api.github.com/repos/mujx/nheko/contributors","subscribers_url":"https://api.github.com/repos/mujx/nheko/subscribers","subscription_url":"https://api.github.com/repos/mujx/nheko/subscription","commits_url":"https://api.github.com/repos/mujx/nheko/commits{/sha}","git_commits_url":"https://api.github.com/repos/mujx/nheko/git/commits{/sha}","comments_url":"https://api.github.com/repos/mujx/nheko/comments{/number}","issue_comment_url":"https://api.github.com/repos/mujx/nheko/issues/comments{/number}","contents_url":"https://api.github.com/repos/mujx/nheko/contents/{+path}","compare_url":"https://api.github.com/repos/mujx/nheko/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mujx/nheko/merges","archive_url":"https://api.github.com/repos/mujx/nheko/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mujx/nheko/downloads","issues_url":"https://api.github.com/repos/mujx/nheko/issues{/number}","pulls_url":"https://api.github.com/repos/mujx/nheko/pulls{/number}","milestones_url":"https://api.github.com/repos/mujx/nheko/milestones{/number}","notifications_url":"https://api.github.com/repos/mujx/nheko/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mujx/nheko/labels{/name}","releases_url":"https://api.github.com/repos/mujx/nheko/releases{/id}","deployments_url":"https://api.github.com/repos/mujx/nheko/deployments","created_at":"2017-04-05T23:01:24Z","updated_at":"2018-02-06T02:25:11Z","pushed_at":"2018-02-06T04:45:59Z","git_url":"git://github.com/mujx/nheko.git","ssh_url":"git@github.com:mujx/nheko.git","clone_url":"https://github.com/mujx/nheko.git","svn_url":"https://github.com/mujx/nheko","homepage":"","size":4751,"stargazers_count":166,"watchers_count":166,"language":"C++","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":68,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":26,"open_issues":68,"watchers":166,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mujx/nheko/pulls/227"},"html":{"href":"https://github.com/mujx/nheko/pull/227"},"issue":{"href":"https://api.github.com/repos/mujx/nheko/issues/227"},"comments":{"href":"https://api.github.com/repos/mujx/nheko/issues/227/comments"},"review_comments":{"href":"https://api.github.com/repos/mujx/nheko/pulls/227/comments"},"review_comment":{"href":"https://api.github.com/repos/mujx/nheko/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mujx/nheko/pulls/227/commits"},"statuses":{"href":"https://api.github.com/repos/mujx/nheko/statuses/0c2979126fb35cdbbd4683782a5b6c8e8f714aff"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mujx"}}