{"action":"closed","number":313,"pull_request":{"url":"https://api.github.com/repos/supermarin/Alcatraz/pulls/313","id":39127139,"html_url":"https://github.com/supermarin/Alcatraz/pull/313","diff_url":"https://github.com/supermarin/Alcatraz/pull/313.diff","patch_url":"https://github.com/supermarin/Alcatraz/pull/313.patch","issue_url":"https://api.github.com/repos/supermarin/Alcatraz/issues/313","number":313,"state":"closed","locked":false,"title":"Fix ATZSegmentedControl's focus ring and click area","user":{"login":"guillaume-algis","id":1041337,"avatar_url":"https://avatars.githubusercontent.com/u/1041337?v=3","gravatar_id":"","url":"https://api.github.com/users/guillaume-algis","html_url":"https://github.com/guillaume-algis","followers_url":"https://api.github.com/users/guillaume-algis/followers","following_url":"https://api.github.com/users/guillaume-algis/following{/other_user}","gists_url":"https://api.github.com/users/guillaume-algis/gists{/gist_id}","starred_url":"https://api.github.com/users/guillaume-algis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guillaume-algis/subscriptions","organizations_url":"https://api.github.com/users/guillaume-algis/orgs","repos_url":"https://api.github.com/users/guillaume-algis/repos","events_url":"https://api.github.com/users/guillaume-algis/events{/privacy}","received_events_url":"https://api.github.com/users/guillaume-algis/received_events","type":"User","site_admin":false},"body":"Fixes #226.\r\n\r\nThis PR fixes the ATZSegmentedControl's focus ring by drawing it around the blue text background. This also fixes the click area, which for some of the segments was not aligned with the custom drawn button (ie. by clicking on the far left and right ends of one segment you'd actually activate another segment).\r\n\r\n![New ATZSegmentedControl focus rings](https://cloud.githubusercontent.com/assets/1041337/8488077/91b6ba94-2110-11e5-8f2a-2f8daef39279.png)\r\n\r\nA couple of points:\r\n- This is probably a bit more hacky than the previous implementation:\r\n  - ATZSegmentedControl's `initWithCoder:` is overridden to work around an IB bug (https://mikeash.com/pyblog/custom-nscells-done-right.html);\r\n  - ATZSegmentedCell's `_drawBackgroundWithFrame:inView:` is overridden to do nothing, in order to disable the NSSegmentedCell's implementation, which draws the classic OS X NSSegmentedControl background;\r\n- This is better than before, but still not perfect. I had a hard time getting the focus ring just right, so I gave up and left a bit of padding (mainly vertically) instead of adding a bunch of code to have it pixel-perfect.\r\n- Merging this will probably cause a conflict with #303 on `ATZPluginWindowController.xib`. The version of the xib in this PR should be preferred as it also includes #303's changes.\r\n\r\nAs always, comments and code review are welcome :)","created_at":"2015-07-02T21:20:34Z","updated_at":"2015-08-17T23:41:18Z","closed_at":"2015-08-17T23:41:18Z","merged_at":"2015-08-17T23:41:18Z","merge_commit_sha":"2b14e0e6115b9979973434799cdfe20c66dd2e75","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/supermarin/Alcatraz/pulls/313/commits","review_comments_url":"https://api.github.com/repos/supermarin/Alcatraz/pulls/313/comments","review_comment_url":"https://api.github.com/repos/supermarin/Alcatraz/pulls/comments{/number}","comments_url":"https://api.github.com/repos/supermarin/Alcatraz/issues/313/comments","statuses_url":"https://api.github.com/repos/supermarin/Alcatraz/statuses/1a4dc5a4aa441db59163936afadb64c3d67838a5","head":{"label":"guillaume-algis:bugfix/226-buttons-highlight","ref":"bugfix/226-buttons-highlight","sha":"1a4dc5a4aa441db59163936afadb64c3d67838a5","user":{"login":"guillaume-algis","id":1041337,"avatar_url":"https://avatars.githubusercontent.com/u/1041337?v=3","gravatar_id":"","url":"https://api.github.com/users/guillaume-algis","html_url":"https://github.com/guillaume-algis","followers_url":"https://api.github.com/users/guillaume-algis/followers","following_url":"https://api.github.com/users/guillaume-algis/following{/other_user}","gists_url":"https://api.github.com/users/guillaume-algis/gists{/gist_id}","starred_url":"https://api.github.com/users/guillaume-algis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guillaume-algis/subscriptions","organizations_url":"https://api.github.com/users/guillaume-algis/orgs","repos_url":"https://api.github.com/users/guillaume-algis/repos","events_url":"https://api.github.com/users/guillaume-algis/events{/privacy}","received_events_url":"https://api.github.com/users/guillaume-algis/received_events","type":"User","site_admin":false},"repo":{"id":13451167,"name":"Alcatraz","full_name":"guillaume-algis/Alcatraz","owner":{"login":"guillaume-algis","id":1041337,"avatar_url":"https://avatars.githubusercontent.com/u/1041337?v=3","gravatar_id":"","url":"https://api.github.com/users/guillaume-algis","html_url":"https://github.com/guillaume-algis","followers_url":"https://api.github.com/users/guillaume-algis/followers","following_url":"https://api.github.com/users/guillaume-algis/following{/other_user}","gists_url":"https://api.github.com/users/guillaume-algis/gists{/gist_id}","starred_url":"https://api.github.com/users/guillaume-algis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guillaume-algis/subscriptions","organizations_url":"https://api.github.com/users/guillaume-algis/orgs","repos_url":"https://api.github.com/users/guillaume-algis/repos","events_url":"https://api.github.com/users/guillaume-algis/events{/privacy}","received_events_url":"https://api.github.com/users/guillaume-algis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guillaume-algis/Alcatraz","description":"Xcode package manager","fork":true,"url":"https://api.github.com/repos/guillaume-algis/Alcatraz","forks_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/forks","keys_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/teams","hooks_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/hooks","issue_events_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/issues/events{/number}","events_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/events","assignees_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/assignees{/user}","branches_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/branches{/branch}","tags_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/tags","blobs_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/git/refs{/sha}","trees_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/statuses/{sha}","languages_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/languages","stargazers_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/stargazers","contributors_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/contributors","subscribers_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/subscribers","subscription_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/subscription","commits_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/commits{/sha}","git_commits_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/git/commits{/sha}","comments_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/comments{/number}","issue_comment_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/issues/comments{/number}","contents_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/contents/{+path}","compare_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/merges","archive_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/downloads","issues_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/issues{/number}","pulls_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/pulls{/number}","milestones_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/milestones{/number}","notifications_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/labels{/name}","releases_url":"https://api.github.com/repos/guillaume-algis/Alcatraz/releases{/id}","created_at":"2013-10-09T19:00:58Z","updated_at":"2015-06-06T16:23:44Z","pushed_at":"2015-07-23T10:04:48Z","git_url":"git://github.com/guillaume-algis/Alcatraz.git","ssh_url":"git@github.com:guillaume-algis/Alcatraz.git","clone_url":"https://github.com/guillaume-algis/Alcatraz.git","svn_url":"https://github.com/guillaume-algis/Alcatraz","homepage":"mneorr.github.com/Alcatraz","size":4601,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"supermarin:master","ref":"master","sha":"fedf79b7926b5ec5d507699c01709388f41d87c2","user":{"login":"supermarin","id":627285,"avatar_url":"https://avatars.githubusercontent.com/u/627285?v=3","gravatar_id":"","url":"https://api.github.com/users/supermarin","html_url":"https://github.com/supermarin","followers_url":"https://api.github.com/users/supermarin/followers","following_url":"https://api.github.com/users/supermarin/following{/other_user}","gists_url":"https://api.github.com/users/supermarin/gists{/gist_id}","starred_url":"https://api.github.com/users/supermarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supermarin/subscriptions","organizations_url":"https://api.github.com/users/supermarin/orgs","repos_url":"https://api.github.com/users/supermarin/repos","events_url":"https://api.github.com/users/supermarin/events{/privacy}","received_events_url":"https://api.github.com/users/supermarin/received_events","type":"User","site_admin":false},"repo":{"id":9603714,"name":"Alcatraz","full_name":"supermarin/Alcatraz","owner":{"login":"supermarin","id":627285,"avatar_url":"https://avatars.githubusercontent.com/u/627285?v=3","gravatar_id":"","url":"https://api.github.com/users/supermarin","html_url":"https://github.com/supermarin","followers_url":"https://api.github.com/users/supermarin/followers","following_url":"https://api.github.com/users/supermarin/following{/other_user}","gists_url":"https://api.github.com/users/supermarin/gists{/gist_id}","starred_url":"https://api.github.com/users/supermarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supermarin/subscriptions","organizations_url":"https://api.github.com/users/supermarin/orgs","repos_url":"https://api.github.com/users/supermarin/repos","events_url":"https://api.github.com/users/supermarin/events{/privacy}","received_events_url":"https://api.github.com/users/supermarin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/supermarin/Alcatraz","description":"Package manager for Xcode","fork":false,"url":"https://api.github.com/repos/supermarin/Alcatraz","forks_url":"https://api.github.com/repos/supermarin/Alcatraz/forks","keys_url":"https://api.github.com/repos/supermarin/Alcatraz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/supermarin/Alcatraz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/supermarin/Alcatraz/teams","hooks_url":"https://api.github.com/repos/supermarin/Alcatraz/hooks","issue_events_url":"https://api.github.com/repos/supermarin/Alcatraz/issues/events{/number}","events_url":"https://api.github.com/repos/supermarin/Alcatraz/events","assignees_url":"https://api.github.com/repos/supermarin/Alcatraz/assignees{/user}","branches_url":"https://api.github.com/repos/supermarin/Alcatraz/branches{/branch}","tags_url":"https://api.github.com/repos/supermarin/Alcatraz/tags","blobs_url":"https://api.github.com/repos/supermarin/Alcatraz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/supermarin/Alcatraz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/supermarin/Alcatraz/git/refs{/sha}","trees_url":"https://api.github.com/repos/supermarin/Alcatraz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/supermarin/Alcatraz/statuses/{sha}","languages_url":"https://api.github.com/repos/supermarin/Alcatraz/languages","stargazers_url":"https://api.github.com/repos/supermarin/Alcatraz/stargazers","contributors_url":"https://api.github.com/repos/supermarin/Alcatraz/contributors","subscribers_url":"https://api.github.com/repos/supermarin/Alcatraz/subscribers","subscription_url":"https://api.github.com/repos/supermarin/Alcatraz/subscription","commits_url":"https://api.github.com/repos/supermarin/Alcatraz/commits{/sha}","git_commits_url":"https://api.github.com/repos/supermarin/Alcatraz/git/commits{/sha}","comments_url":"https://api.github.com/repos/supermarin/Alcatraz/comments{/number}","issue_comment_url":"https://api.github.com/repos/supermarin/Alcatraz/issues/comments{/number}","contents_url":"https://api.github.com/repos/supermarin/Alcatraz/contents/{+path}","compare_url":"https://api.github.com/repos/supermarin/Alcatraz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/supermarin/Alcatraz/merges","archive_url":"https://api.github.com/repos/supermarin/Alcatraz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/supermarin/Alcatraz/downloads","issues_url":"https://api.github.com/repos/supermarin/Alcatraz/issues{/number}","pulls_url":"https://api.github.com/repos/supermarin/Alcatraz/pulls{/number}","milestones_url":"https://api.github.com/repos/supermarin/Alcatraz/milestones{/number}","notifications_url":"https://api.github.com/repos/supermarin/Alcatraz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/supermarin/Alcatraz/labels{/name}","releases_url":"https://api.github.com/repos/supermarin/Alcatraz/releases{/id}","created_at":"2013-04-22T16:40:10Z","updated_at":"2015-08-17T19:09:51Z","pushed_at":"2015-08-17T23:41:18Z","git_url":"git://github.com/supermarin/Alcatraz.git","ssh_url":"git@github.com:supermarin/Alcatraz.git","clone_url":"https://github.com/supermarin/Alcatraz.git","svn_url":"https://github.com/supermarin/Alcatraz","homepage":"alcatraz.io","size":12279,"stargazers_count":5838,"watchers_count":5838,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":631,"mirror_url":null,"open_issues_count":34,"forks":631,"open_issues":34,"watchers":5838,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/supermarin/Alcatraz/pulls/313"},"html":{"href":"https://github.com/supermarin/Alcatraz/pull/313"},"issue":{"href":"https://api.github.com/repos/supermarin/Alcatraz/issues/313"},"comments":{"href":"https://api.github.com/repos/supermarin/Alcatraz/issues/313/comments"},"review_comments":{"href":"https://api.github.com/repos/supermarin/Alcatraz/pulls/313/comments"},"review_comment":{"href":"https://api.github.com/repos/supermarin/Alcatraz/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/supermarin/Alcatraz/pulls/313/commits"},"statuses":{"href":"https://api.github.com/repos/supermarin/Alcatraz/statuses/1a4dc5a4aa441db59163936afadb64c3d67838a5"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"supermarin","id":627285,"avatar_url":"https://avatars.githubusercontent.com/u/627285?v=3","gravatar_id":"","url":"https://api.github.com/users/supermarin","html_url":"https://github.com/supermarin","followers_url":"https://api.github.com/users/supermarin/followers","following_url":"https://api.github.com/users/supermarin/following{/other_user}","gists_url":"https://api.github.com/users/supermarin/gists{/gist_id}","starred_url":"https://api.github.com/users/supermarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supermarin/subscriptions","organizations_url":"https://api.github.com/users/supermarin/orgs","repos_url":"https://api.github.com/users/supermarin/repos","events_url":"https://api.github.com/users/supermarin/events{/privacy}","received_events_url":"https://api.github.com/users/supermarin/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":216,"deletions":76,"changed_files":5}}