{"action":"created","comment":{"url":"https://api.github.com/repos/spyder-ide/spyder/pulls/comments/80769418","pull_request_review_id":1801782,"id":80769418,"diff_hunk":"@@ -0,0 +1,140 @@\n+# -*- coding: utf-8 -*-\n+#\n+# Copyright © 2009- The Spyder Development Team\n+# Licensed under the terms of the MIT License\n+# (see spyderlib/__init__.py for details)\n+\n+\"\"\"Shortcut Summary dialog\"\"\"\n+\n+# TODO:\n+# calculate windows size from screen size\n+\n+# Standard library imports\n+from operator import itemgetter\n+from itertools import groupby\n+\n+# Third party imports\n+from qtpy.QtCore import Qt\n+from qtpy.QtGui import QFont\n+from qtpy.QtWidgets import (QDialog, QLabel, QGridLayout, QGroupBox,\n+                            QVBoxLayout, QHBoxLayout, QDesktopWidget)\n+\n+# Local imports\n+from spyder.config.base import _\n+from spyder.config.gui import iter_shortcuts\n+\n+# Constants\n+MAX_FONT_SIZE = 16\n+MIN_FONT_SIZE = 8\n+\n+class ShortCutsSummaryDialog(QDialog):\n+    def __init__(self, parent=None, offset=0, force_float=False):\n+        QDialog.__init__(self, parent=parent)\n+\n+        self._shortcuts_summary_title = _(\"Spyder Keyboard ShortCuts\")\n+\n+        # Calculate font and amount of elements in each column according screen size\n+        width, height = self.get_screen_resolution()\n+        font_size = height / 80\n+        font_size = max(min(font_size, MAX_FONT_SIZE), MIN_FONT_SIZE)\n+        shortcuts_column = (height - 8 * font_size) / (font_size +16)","path":"spyder/widgets/shortcuts.py","position":40,"original_position":40,"commit_id":"a377e241e7da8b7ecc1983067ac2861097a160da","original_commit_id":"a377e241e7da8b7ecc1983067ac2861097a160da","user":{"login":"rlaverde","id":2024217,"avatar_url":"https://avatars.githubusercontent.com/u/2024217?v=3","gravatar_id":"","url":"https://api.github.com/users/rlaverde","html_url":"https://github.com/rlaverde","followers_url":"https://api.github.com/users/rlaverde/followers","following_url":"https://api.github.com/users/rlaverde/following{/other_user}","gists_url":"https://api.github.com/users/rlaverde/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaverde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaverde/subscriptions","organizations_url":"https://api.github.com/users/rlaverde/orgs","repos_url":"https://api.github.com/users/rlaverde/repos","events_url":"https://api.github.com/users/rlaverde/events{/privacy}","received_events_url":"https://api.github.com/users/rlaverde/received_events","type":"User","site_admin":false},"body":"I don't know how I could fix this, my laptop have similar dimensions, and the resulting height is 703, there's another way to add elements and avoid oversizing the window?\r\n\r\nwidth = 1366\r\nheight = 738\r\nfont_size = 9.225\r\nshortcuts_column = 26.3310","created_at":"2016-09-27T19:00:42Z","updated_at":"2016-09-27T19:00:42Z","html_url":"https://github.com/spyder-ide/spyder/pull/3331#discussion_r80769418","pull_request_url":"https://api.github.com/repos/spyder-ide/spyder/pulls/3331","_links":{"self":{"href":"https://api.github.com/repos/spyder-ide/spyder/pulls/comments/80769418"},"html":{"href":"https://github.com/spyder-ide/spyder/pull/3331#discussion_r80769418"},"pull_request":{"href":"https://api.github.com/repos/spyder-ide/spyder/pulls/3331"}}},"pull_request":{"url":"https://api.github.com/repos/spyder-ide/spyder/pulls/3331","id":79264808,"html_url":"https://github.com/spyder-ide/spyder/pull/3331","diff_url":"https://github.com/spyder-ide/spyder/pull/3331.diff","patch_url":"https://github.com/spyder-ide/spyder/pull/3331.patch","issue_url":"https://api.github.com/repos/spyder-ide/spyder/issues/3331","number":3331,"state":"closed","locked":false,"title":"PR: Add Shortcuts Summary Window","user":{"login":"rlaverde","id":2024217,"avatar_url":"https://avatars.githubusercontent.com/u/2024217?v=3","gravatar_id":"","url":"https://api.github.com/users/rlaverde","html_url":"https://github.com/rlaverde","followers_url":"https://api.github.com/users/rlaverde/followers","following_url":"https://api.github.com/users/rlaverde/following{/other_user}","gists_url":"https://api.github.com/users/rlaverde/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaverde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaverde/subscriptions","organizations_url":"https://api.github.com/users/rlaverde/orgs","repos_url":"https://api.github.com/users/rlaverde/repos","events_url":"https://api.github.com/users/rlaverde/events{/privacy}","received_events_url":"https://api.github.com/users/rlaverde/received_events","type":"User","site_admin":false},"body":"Fixes #3275 \r\n\r\n----\r\n\r\nSummary shortcuts implementation\r\n\r\nI'm still working on it, there is some things missing:\r\n- [x] register shortcut\r\n- [x] calculate font size and amount of elements in a column using screen size\r\n\r\n![shortcuts_draft1](https://cloud.githubusercontent.com/assets/2024217/17228721/d015bada-54d9-11e6-959a-05b7b77aad5c.png)\r\n\r\n\r\n","created_at":"2016-07-28T20:42:17Z","updated_at":"2016-09-27T19:00:42Z","closed_at":"2016-09-27T17:26:56Z","merged_at":null,"merge_commit_sha":"04e4cabc2839bb1e12bafe50ab61e097cc0ff442","assignee":{"login":"Nodd","id":506348,"avatar_url":"https://avatars.githubusercontent.com/u/506348?v=3","gravatar_id":"","url":"https://api.github.com/users/Nodd","html_url":"https://github.com/Nodd","followers_url":"https://api.github.com/users/Nodd/followers","following_url":"https://api.github.com/users/Nodd/following{/other_user}","gists_url":"https://api.github.com/users/Nodd/gists{/gist_id}","starred_url":"https://api.github.com/users/Nodd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nodd/subscriptions","organizations_url":"https://api.github.com/users/Nodd/orgs","repos_url":"https://api.github.com/users/Nodd/repos","events_url":"https://api.github.com/users/Nodd/events{/privacy}","received_events_url":"https://api.github.com/users/Nodd/received_events","type":"User","site_admin":false},"assignees":[{"login":"Nodd","id":506348,"avatar_url":"https://avatars.githubusercontent.com/u/506348?v=3","gravatar_id":"","url":"https://api.github.com/users/Nodd","html_url":"https://github.com/Nodd","followers_url":"https://api.github.com/users/Nodd/followers","following_url":"https://api.github.com/users/Nodd/following{/other_user}","gists_url":"https://api.github.com/users/Nodd/gists{/gist_id}","starred_url":"https://api.github.com/users/Nodd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nodd/subscriptions","organizations_url":"https://api.github.com/users/Nodd/orgs","repos_url":"https://api.github.com/users/Nodd/repos","events_url":"https://api.github.com/users/Nodd/events{/privacy}","received_events_url":"https://api.github.com/users/Nodd/received_events","type":"User","site_admin":false},{"login":"jitseniesen","id":7941918,"avatar_url":"https://avatars.githubusercontent.com/u/7941918?v=3","gravatar_id":"","url":"https://api.github.com/users/jitseniesen","html_url":"https://github.com/jitseniesen","followers_url":"https://api.github.com/users/jitseniesen/followers","following_url":"https://api.github.com/users/jitseniesen/following{/other_user}","gists_url":"https://api.github.com/users/jitseniesen/gists{/gist_id}","starred_url":"https://api.github.com/users/jitseniesen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jitseniesen/subscriptions","organizations_url":"https://api.github.com/users/jitseniesen/orgs","repos_url":"https://api.github.com/users/jitseniesen/repos","events_url":"https://api.github.com/users/jitseniesen/events{/privacy}","received_events_url":"https://api.github.com/users/jitseniesen/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/spyder-ide/spyder/pulls/3331/commits","review_comments_url":"https://api.github.com/repos/spyder-ide/spyder/pulls/3331/comments","review_comment_url":"https://api.github.com/repos/spyder-ide/spyder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spyder-ide/spyder/issues/3331/comments","statuses_url":"https://api.github.com/repos/spyder-ide/spyder/statuses/a377e241e7da8b7ecc1983067ac2861097a160da","head":{"label":"rlaverde:shortcuts_summary","ref":"shortcuts_summary","sha":"a377e241e7da8b7ecc1983067ac2861097a160da","user":{"login":"rlaverde","id":2024217,"avatar_url":"https://avatars.githubusercontent.com/u/2024217?v=3","gravatar_id":"","url":"https://api.github.com/users/rlaverde","html_url":"https://github.com/rlaverde","followers_url":"https://api.github.com/users/rlaverde/followers","following_url":"https://api.github.com/users/rlaverde/following{/other_user}","gists_url":"https://api.github.com/users/rlaverde/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaverde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaverde/subscriptions","organizations_url":"https://api.github.com/users/rlaverde/orgs","repos_url":"https://api.github.com/users/rlaverde/repos","events_url":"https://api.github.com/users/rlaverde/events{/privacy}","received_events_url":"https://api.github.com/users/rlaverde/received_events","type":"User","site_admin":false},"repo":{"id":64247828,"name":"spyder","full_name":"rlaverde/spyder","owner":{"login":"rlaverde","id":2024217,"avatar_url":"https://avatars.githubusercontent.com/u/2024217?v=3","gravatar_id":"","url":"https://api.github.com/users/rlaverde","html_url":"https://github.com/rlaverde","followers_url":"https://api.github.com/users/rlaverde/followers","following_url":"https://api.github.com/users/rlaverde/following{/other_user}","gists_url":"https://api.github.com/users/rlaverde/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaverde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaverde/subscriptions","organizations_url":"https://api.github.com/users/rlaverde/orgs","repos_url":"https://api.github.com/users/rlaverde/repos","events_url":"https://api.github.com/users/rlaverde/events{/privacy}","received_events_url":"https://api.github.com/users/rlaverde/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rlaverde/spyder","description":"Official repository for Spyder - The Scientific PYthon Development EnviRonment","fork":true,"url":"https://api.github.com/repos/rlaverde/spyder","forks_url":"https://api.github.com/repos/rlaverde/spyder/forks","keys_url":"https://api.github.com/repos/rlaverde/spyder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rlaverde/spyder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rlaverde/spyder/teams","hooks_url":"https://api.github.com/repos/rlaverde/spyder/hooks","issue_events_url":"https://api.github.com/repos/rlaverde/spyder/issues/events{/number}","events_url":"https://api.github.com/repos/rlaverde/spyder/events","assignees_url":"https://api.github.com/repos/rlaverde/spyder/assignees{/user}","branches_url":"https://api.github.com/repos/rlaverde/spyder/branches{/branch}","tags_url":"https://api.github.com/repos/rlaverde/spyder/tags","blobs_url":"https://api.github.com/repos/rlaverde/spyder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rlaverde/spyder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rlaverde/spyder/git/refs{/sha}","trees_url":"https://api.github.com/repos/rlaverde/spyder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rlaverde/spyder/statuses/{sha}","languages_url":"https://api.github.com/repos/rlaverde/spyder/languages","stargazers_url":"https://api.github.com/repos/rlaverde/spyder/stargazers","contributors_url":"https://api.github.com/repos/rlaverde/spyder/contributors","subscribers_url":"https://api.github.com/repos/rlaverde/spyder/subscribers","subscription_url":"https://api.github.com/repos/rlaverde/spyder/subscription","commits_url":"https://api.github.com/repos/rlaverde/spyder/commits{/sha}","git_commits_url":"https://api.github.com/repos/rlaverde/spyder/git/commits{/sha}","comments_url":"https://api.github.com/repos/rlaverde/spyder/comments{/number}","issue_comment_url":"https://api.github.com/repos/rlaverde/spyder/issues/comments{/number}","contents_url":"https://api.github.com/repos/rlaverde/spyder/contents/{+path}","compare_url":"https://api.github.com/repos/rlaverde/spyder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rlaverde/spyder/merges","archive_url":"https://api.github.com/repos/rlaverde/spyder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rlaverde/spyder/downloads","issues_url":"https://api.github.com/repos/rlaverde/spyder/issues{/number}","pulls_url":"https://api.github.com/repos/rlaverde/spyder/pulls{/number}","milestones_url":"https://api.github.com/repos/rlaverde/spyder/milestones{/number}","notifications_url":"https://api.github.com/repos/rlaverde/spyder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rlaverde/spyder/labels{/name}","releases_url":"https://api.github.com/repos/rlaverde/spyder/releases{/id}","deployments_url":"https://api.github.com/repos/rlaverde/spyder/deployments","created_at":"2016-07-26T19:16:44Z","updated_at":"2016-07-26T19:16:46Z","pushed_at":"2016-09-27T17:09:06Z","git_url":"git://github.com/rlaverde/spyder.git","ssh_url":"git@github.com:rlaverde/spyder.git","clone_url":"https://github.com/rlaverde/spyder.git","svn_url":"https://github.com/rlaverde/spyder","homepage":"","size":30675,"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":"spyder-ide:master","ref":"master","sha":"f1c39fa611cb2b691e86c7818e4ee388a2eaa42b","user":{"login":"spyder-ide","id":1284937,"avatar_url":"https://avatars.githubusercontent.com/u/1284937?v=3","gravatar_id":"","url":"https://api.github.com/users/spyder-ide","html_url":"https://github.com/spyder-ide","followers_url":"https://api.github.com/users/spyder-ide/followers","following_url":"https://api.github.com/users/spyder-ide/following{/other_user}","gists_url":"https://api.github.com/users/spyder-ide/gists{/gist_id}","starred_url":"https://api.github.com/users/spyder-ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyder-ide/subscriptions","organizations_url":"https://api.github.com/users/spyder-ide/orgs","repos_url":"https://api.github.com/users/spyder-ide/repos","events_url":"https://api.github.com/users/spyder-ide/events{/privacy}","received_events_url":"https://api.github.com/users/spyder-ide/received_events","type":"Organization","site_admin":false},"repo":{"id":30892477,"name":"spyder","full_name":"spyder-ide/spyder","owner":{"login":"spyder-ide","id":1284937,"avatar_url":"https://avatars.githubusercontent.com/u/1284937?v=3","gravatar_id":"","url":"https://api.github.com/users/spyder-ide","html_url":"https://github.com/spyder-ide","followers_url":"https://api.github.com/users/spyder-ide/followers","following_url":"https://api.github.com/users/spyder-ide/following{/other_user}","gists_url":"https://api.github.com/users/spyder-ide/gists{/gist_id}","starred_url":"https://api.github.com/users/spyder-ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyder-ide/subscriptions","organizations_url":"https://api.github.com/users/spyder-ide/orgs","repos_url":"https://api.github.com/users/spyder-ide/repos","events_url":"https://api.github.com/users/spyder-ide/events{/privacy}","received_events_url":"https://api.github.com/users/spyder-ide/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spyder-ide/spyder","description":"Official repository for Spyder - The Scientific PYthon Development EnviRonment","fork":false,"url":"https://api.github.com/repos/spyder-ide/spyder","forks_url":"https://api.github.com/repos/spyder-ide/spyder/forks","keys_url":"https://api.github.com/repos/spyder-ide/spyder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spyder-ide/spyder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spyder-ide/spyder/teams","hooks_url":"https://api.github.com/repos/spyder-ide/spyder/hooks","issue_events_url":"https://api.github.com/repos/spyder-ide/spyder/issues/events{/number}","events_url":"https://api.github.com/repos/spyder-ide/spyder/events","assignees_url":"https://api.github.com/repos/spyder-ide/spyder/assignees{/user}","branches_url":"https://api.github.com/repos/spyder-ide/spyder/branches{/branch}","tags_url":"https://api.github.com/repos/spyder-ide/spyder/tags","blobs_url":"https://api.github.com/repos/spyder-ide/spyder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spyder-ide/spyder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spyder-ide/spyder/git/refs{/sha}","trees_url":"https://api.github.com/repos/spyder-ide/spyder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spyder-ide/spyder/statuses/{sha}","languages_url":"https://api.github.com/repos/spyder-ide/spyder/languages","stargazers_url":"https://api.github.com/repos/spyder-ide/spyder/stargazers","contributors_url":"https://api.github.com/repos/spyder-ide/spyder/contributors","subscribers_url":"https://api.github.com/repos/spyder-ide/spyder/subscribers","subscription_url":"https://api.github.com/repos/spyder-ide/spyder/subscription","commits_url":"https://api.github.com/repos/spyder-ide/spyder/commits{/sha}","git_commits_url":"https://api.github.com/repos/spyder-ide/spyder/git/commits{/sha}","comments_url":"https://api.github.com/repos/spyder-ide/spyder/comments{/number}","issue_comment_url":"https://api.github.com/repos/spyder-ide/spyder/issues/comments{/number}","contents_url":"https://api.github.com/repos/spyder-ide/spyder/contents/{+path}","compare_url":"https://api.github.com/repos/spyder-ide/spyder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spyder-ide/spyder/merges","archive_url":"https://api.github.com/repos/spyder-ide/spyder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spyder-ide/spyder/downloads","issues_url":"https://api.github.com/repos/spyder-ide/spyder/issues{/number}","pulls_url":"https://api.github.com/repos/spyder-ide/spyder/pulls{/number}","milestones_url":"https://api.github.com/repos/spyder-ide/spyder/milestones{/number}","notifications_url":"https://api.github.com/repos/spyder-ide/spyder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spyder-ide/spyder/labels{/name}","releases_url":"https://api.github.com/repos/spyder-ide/spyder/releases{/id}","deployments_url":"https://api.github.com/repos/spyder-ide/spyder/deployments","created_at":"2015-02-16T22:49:48Z","updated_at":"2016-09-27T17:39:18Z","pushed_at":"2016-09-27T17:26:15Z","git_url":"git://github.com/spyder-ide/spyder.git","ssh_url":"git@github.com:spyder-ide/spyder.git","clone_url":"https://github.com/spyder-ide/spyder.git","svn_url":"https://github.com/spyder-ide/spyder","homepage":"","size":65714,"stargazers_count":1393,"watchers_count":1393,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":336,"mirror_url":null,"open_issues_count":685,"forks":336,"open_issues":685,"watchers":1393,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spyder-ide/spyder/pulls/3331"},"html":{"href":"https://github.com/spyder-ide/spyder/pull/3331"},"issue":{"href":"https://api.github.com/repos/spyder-ide/spyder/issues/3331"},"comments":{"href":"https://api.github.com/repos/spyder-ide/spyder/issues/3331/comments"},"review_comments":{"href":"https://api.github.com/repos/spyder-ide/spyder/pulls/3331/comments"},"review_comment":{"href":"https://api.github.com/repos/spyder-ide/spyder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spyder-ide/spyder/pulls/3331/commits"},"statuses":{"href":"https://api.github.com/repos/spyder-ide/spyder/statuses/a377e241e7da8b7ecc1983067ac2861097a160da"}}}}
{"actor":{"display_login":"rlaverde"}}