{"action":"created","comment":{"url":"https://api.github.com/repos/trufont/trufont/pulls/comments/42157055","id":42157055,"diff_hunk":"@@ -187,27 +292,38 @@ def __init__(self, glyph, parent=None):\n         glyphMenu.addAction(\"&Jump\", self.changeGlyph, \"J\")\n         menuBar.addMenu(glyphMenu)\n \n-        toolBar = QToolBar(self)\n+\n+        self._displaySettings = DisplayStyleSettings(\"&Display\", self, self._displayChanged)\n+        menuBar.addMenu(self._displaySettings.menuWidget)\n+\n+        self._toolBar = toolBar = QToolBar(self)\n         toolBar.setMovable(False)\n         toolBar.setContentsMargins(2, 0, 2, 0)\n-        selectionToolButton = toolBar.addAction(\"Selection\", self.view.setSceneSelection)\n+        selectionToolButton = toolBar.addAction(\"Selection\", self._redirect('view', 'setSceneSelection'))\n         selectionToolButton.setCheckable(True)\n         selectionToolButton.setChecked(True)\n         selectionToolButton.setIcon(QIcon(\":/resources/cursor.svg\"))\n-        penToolButton = toolBar.addAction(\"Pen\", self.view.setSceneDrawing)\n+        penToolButton = toolBar.addAction(\"Pen\", self._redirect('view', 'setSceneDrawing'))\n         penToolButton.setCheckable(True)\n-        penToolButton.setIcon(QIcon(\":/resources/curve.svg\"))\n-        rulerToolButton = toolBar.addAction(\"Ruler\", self.view.setSceneRuler)\n+        selectionToolButton.setIcon(QIcon(\":/resources/cursor.svg\"))\n+        rulerToolButton = toolBar.addAction(\"Ruler\", self._redirect('view', 'setSceneRuler'))\n         rulerToolButton.setCheckable(True)\n-        rulerToolButton.setIcon(QIcon(\":/resources/ruler.svg\"))\n-        knifeToolButton = toolBar.addAction(\"Knife\", self.view.setSceneKnife)\n+        selectionToolButton.setIcon(QIcon(\":/resources/cursor.svg\"))\n+        knifeToolButton = toolBar.addAction(\"Knife\", self._redirect('view', 'setSceneKnife'))\n         knifeToolButton.setCheckable(True)\n-        knifeToolButton.setIcon(QIcon(\":/resources/cut.svg\"))\n+        selectionToolButton.setIcon(QIcon(\":/resources/cursor.svg\"))\n         # http://www.setnode.com/blog/right-aligning-a-button-in-a-qtoolbar/\n         spacer = QWidget()\n         spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)\n         toolBar.addWidget(spacer)\n-        toolBar.addWidget(self.view.currentLayerBox())\n+        self._currentLayerBox = QComboBox(self)","path":"Lib/defconQt/glyphView.py","position":173,"original_position":173,"commit_id":"0636b8062c1ec4628b1fac3bf245a9e81d0f1f67","original_commit_id":"0636b8062c1ec4628b1fac3bf245a9e81d0f1f67","user":{"login":"adrientetar","id":1250894,"avatar_url":"https://avatars.githubusercontent.com/u/1250894?v=3","gravatar_id":"","url":"https://api.github.com/users/adrientetar","html_url":"https://github.com/adrientetar","followers_url":"https://api.github.com/users/adrientetar/followers","following_url":"https://api.github.com/users/adrientetar/following{/other_user}","gists_url":"https://api.github.com/users/adrientetar/gists{/gist_id}","starred_url":"https://api.github.com/users/adrientetar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrientetar/subscriptions","organizations_url":"https://api.github.com/users/adrientetar/orgs","repos_url":"https://api.github.com/users/adrientetar/repos","events_url":"https://api.github.com/users/adrientetar/events{/privacy}","received_events_url":"https://api.github.com/users/adrientetar/received_events","type":"User","site_admin":false},"body":"Is the goal to have all the external UI elements in the MainWindow rather than in the View? I've found handling that in the View more convenient in practise.","created_at":"2015-10-15T17:53:02Z","updated_at":"2015-10-15T17:53:02Z","html_url":"https://github.com/trufont/trufont/pull/17#discussion_r42157055","pull_request_url":"https://api.github.com/repos/trufont/trufont/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/trufont/trufont/pulls/comments/42157055"},"html":{"href":"https://github.com/trufont/trufont/pull/17#discussion_r42157055"},"pull_request":{"href":"https://api.github.com/repos/trufont/trufont/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/trufont/trufont/pulls/17","id":47816425,"html_url":"https://github.com/trufont/trufont/pull/17","diff_url":"https://github.com/trufont/trufont/pull/17.diff","patch_url":"https://github.com/trufont/trufont/pull/17.patch","issue_url":"https://api.github.com/repos/trufont/trufont/issues/17","number":17,"state":"open","locked":false,"title":"Layer features","user":{"login":"graphicore","id":393132,"avatar_url":"https://avatars.githubusercontent.com/u/393132?v=3","gravatar_id":"","url":"https://api.github.com/users/graphicore","html_url":"https://github.com/graphicore","followers_url":"https://api.github.com/users/graphicore/followers","following_url":"https://api.github.com/users/graphicore/following{/other_user}","gists_url":"https://api.github.com/users/graphicore/gists{/gist_id}","starred_url":"https://api.github.com/users/graphicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graphicore/subscriptions","organizations_url":"https://api.github.com/users/graphicore/orgs","repos_url":"https://api.github.com/users/graphicore/repos","events_url":"https://api.github.com/users/graphicore/events{/privacy}","received_events_url":"https://api.github.com/users/graphicore/received_events","type":"User","site_admin":false},"body":"Ok, this is a rather big change, so you should check it out and see if you like it.\r\n\r\nAlso, I had two bugfixes in my defcon branch. You may want to update.\r\n\r\n\r\nI started at one end and worked me through a bulk of stuff, I hope the changes are not to much for your taste.\r\n\r\nI changed a lot how GlyphView is organzied in a) terms of how it draws and redraws b) I changed some things regarding object hierarchy. MainGfxWindow now acts much more as a controller for GlyphView. For example, when the glyph is changed MainGfxWindow swaps out the GlyphView object. Some control of the layerSet is happening in MainGfxWindow etc.\r\n\r\nWhat I achieved is almost feature parity with defcon/ufo3 layers, it's shorter to keep out what we don't do:\r\n\r\n* delete the default layer: I feared that rest of the app expects a default layer to be present\r\n* change the default layer: should be easier to do, I just thought it's not that important at the moment\r\n\r\nwhat we do:\r\n* add\r\n* delete\r\n* rename\r\n* change Color\r\n* reorder\r\n\r\nAll layer-tools a properly connected to layer/layerSet events, so you can change the layer setup in the new FontWindow -> Windows -> LayerSet window and your opened glyph window will react and vice versa.\r\n\r\nYou can also work on a layer in one window and see the changes propagated in another window, even if the layer is not the active one. Stuff like this does not work in master.\r\n\r\nI added a \"Display\" menu to the glyph view with these options:\r\n\r\n* Active Layer Filled\r\n* Active Layer use Custom Color\r\n* Other Layers Filled\r\n* Other Layers use Custom Color\r\n* Show Other Layers\r\n\r\n(we can easily add more)\r\n\r\nand two presets, that act upon the previous options:\r\n\r\n* *TruFont Default*: looks like the current deployed version\r\n* *Layer Fonts*: fills all layers, no outlines, layers are in layerOrder\r\n\r\nThe second mode is suitable if you want to design layer fonts, like these: https://www.google.de/search?q=layer+fonts\r\n\r\n\r\n\r\n![selection_080](https://cloud.githubusercontent.com/assets/393132/10521901/81fd1ba2-7372-11e5-9f4b-329762ec27bc.png)\r\n\r\n","created_at":"2015-10-15T17:26:03Z","updated_at":"2015-10-15T17:53:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43493a7af5e7cd07d6025af43333d6be5956c64e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/trufont/trufont/pulls/17/commits","review_comments_url":"https://api.github.com/repos/trufont/trufont/pulls/17/comments","review_comment_url":"https://api.github.com/repos/trufont/trufont/pulls/comments{/number}","comments_url":"https://api.github.com/repos/trufont/trufont/issues/17/comments","statuses_url":"https://api.github.com/repos/trufont/trufont/statuses/0636b8062c1ec4628b1fac3bf245a9e81d0f1f67","head":{"label":"graphicore:layer-features","ref":"layer-features","sha":"0636b8062c1ec4628b1fac3bf245a9e81d0f1f67","user":{"login":"graphicore","id":393132,"avatar_url":"https://avatars.githubusercontent.com/u/393132?v=3","gravatar_id":"","url":"https://api.github.com/users/graphicore","html_url":"https://github.com/graphicore","followers_url":"https://api.github.com/users/graphicore/followers","following_url":"https://api.github.com/users/graphicore/following{/other_user}","gists_url":"https://api.github.com/users/graphicore/gists{/gist_id}","starred_url":"https://api.github.com/users/graphicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graphicore/subscriptions","organizations_url":"https://api.github.com/users/graphicore/orgs","repos_url":"https://api.github.com/users/graphicore/repos","events_url":"https://api.github.com/users/graphicore/events{/privacy}","received_events_url":"https://api.github.com/users/graphicore/received_events","type":"User","site_admin":false},"repo":{"id":44331895,"name":"trufont","full_name":"graphicore/trufont","owner":{"login":"graphicore","id":393132,"avatar_url":"https://avatars.githubusercontent.com/u/393132?v=3","gravatar_id":"","url":"https://api.github.com/users/graphicore","html_url":"https://github.com/graphicore","followers_url":"https://api.github.com/users/graphicore/followers","following_url":"https://api.github.com/users/graphicore/following{/other_user}","gists_url":"https://api.github.com/users/graphicore/gists{/gist_id}","starred_url":"https://api.github.com/users/graphicore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graphicore/subscriptions","organizations_url":"https://api.github.com/users/graphicore/orgs","repos_url":"https://api.github.com/users/graphicore/repos","events_url":"https://api.github.com/users/graphicore/events{/privacy}","received_events_url":"https://api.github.com/users/graphicore/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/graphicore/trufont","description":"A ufo3 font editor. À l’ancienne.","fork":true,"url":"https://api.github.com/repos/graphicore/trufont","forks_url":"https://api.github.com/repos/graphicore/trufont/forks","keys_url":"https://api.github.com/repos/graphicore/trufont/keys{/key_id}","collaborators_url":"https://api.github.com/repos/graphicore/trufont/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/graphicore/trufont/teams","hooks_url":"https://api.github.com/repos/graphicore/trufont/hooks","issue_events_url":"https://api.github.com/repos/graphicore/trufont/issues/events{/number}","events_url":"https://api.github.com/repos/graphicore/trufont/events","assignees_url":"https://api.github.com/repos/graphicore/trufont/assignees{/user}","branches_url":"https://api.github.com/repos/graphicore/trufont/branches{/branch}","tags_url":"https://api.github.com/repos/graphicore/trufont/tags","blobs_url":"https://api.github.com/repos/graphicore/trufont/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/graphicore/trufont/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/graphicore/trufont/git/refs{/sha}","trees_url":"https://api.github.com/repos/graphicore/trufont/git/trees{/sha}","statuses_url":"https://api.github.com/repos/graphicore/trufont/statuses/{sha}","languages_url":"https://api.github.com/repos/graphicore/trufont/languages","stargazers_url":"https://api.github.com/repos/graphicore/trufont/stargazers","contributors_url":"https://api.github.com/repos/graphicore/trufont/contributors","subscribers_url":"https://api.github.com/repos/graphicore/trufont/subscribers","subscription_url":"https://api.github.com/repos/graphicore/trufont/subscription","commits_url":"https://api.github.com/repos/graphicore/trufont/commits{/sha}","git_commits_url":"https://api.github.com/repos/graphicore/trufont/git/commits{/sha}","comments_url":"https://api.github.com/repos/graphicore/trufont/comments{/number}","issue_comment_url":"https://api.github.com/repos/graphicore/trufont/issues/comments{/number}","contents_url":"https://api.github.com/repos/graphicore/trufont/contents/{+path}","compare_url":"https://api.github.com/repos/graphicore/trufont/compare/{base}...{head}","merges_url":"https://api.github.com/repos/graphicore/trufont/merges","archive_url":"https://api.github.com/repos/graphicore/trufont/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/graphicore/trufont/downloads","issues_url":"https://api.github.com/repos/graphicore/trufont/issues{/number}","pulls_url":"https://api.github.com/repos/graphicore/trufont/pulls{/number}","milestones_url":"https://api.github.com/repos/graphicore/trufont/milestones{/number}","notifications_url":"https://api.github.com/repos/graphicore/trufont/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/graphicore/trufont/labels{/name}","releases_url":"https://api.github.com/repos/graphicore/trufont/releases{/id}","created_at":"2015-10-15T16:52:36Z","updated_at":"2015-10-15T16:52:37Z","pushed_at":"2015-10-15T16:57:29Z","git_url":"git://github.com/graphicore/trufont.git","ssh_url":"git@github.com:graphicore/trufont.git","clone_url":"https://github.com/graphicore/trufont.git","svn_url":"https://github.com/graphicore/trufont","homepage":"http://trufont.github.io/","size":0,"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":"trufont:master","ref":"master","sha":"700df7380b08f84fe7a593c204a5e787eb3aee12","user":{"login":"trufont","id":15032310,"avatar_url":"https://avatars.githubusercontent.com/u/15032310?v=3","gravatar_id":"","url":"https://api.github.com/users/trufont","html_url":"https://github.com/trufont","followers_url":"https://api.github.com/users/trufont/followers","following_url":"https://api.github.com/users/trufont/following{/other_user}","gists_url":"https://api.github.com/users/trufont/gists{/gist_id}","starred_url":"https://api.github.com/users/trufont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trufont/subscriptions","organizations_url":"https://api.github.com/users/trufont/orgs","repos_url":"https://api.github.com/users/trufont/repos","events_url":"https://api.github.com/users/trufont/events{/privacy}","received_events_url":"https://api.github.com/users/trufont/received_events","type":"Organization","site_admin":false},"repo":{"id":44068507,"name":"trufont","full_name":"trufont/trufont","owner":{"login":"trufont","id":15032310,"avatar_url":"https://avatars.githubusercontent.com/u/15032310?v=3","gravatar_id":"","url":"https://api.github.com/users/trufont","html_url":"https://github.com/trufont","followers_url":"https://api.github.com/users/trufont/followers","following_url":"https://api.github.com/users/trufont/following{/other_user}","gists_url":"https://api.github.com/users/trufont/gists{/gist_id}","starred_url":"https://api.github.com/users/trufont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trufont/subscriptions","organizations_url":"https://api.github.com/users/trufont/orgs","repos_url":"https://api.github.com/users/trufont/repos","events_url":"https://api.github.com/users/trufont/events{/privacy}","received_events_url":"https://api.github.com/users/trufont/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trufont/trufont","description":"A ufo3 font editor. À l’ancienne.","fork":false,"url":"https://api.github.com/repos/trufont/trufont","forks_url":"https://api.github.com/repos/trufont/trufont/forks","keys_url":"https://api.github.com/repos/trufont/trufont/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trufont/trufont/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trufont/trufont/teams","hooks_url":"https://api.github.com/repos/trufont/trufont/hooks","issue_events_url":"https://api.github.com/repos/trufont/trufont/issues/events{/number}","events_url":"https://api.github.com/repos/trufont/trufont/events","assignees_url":"https://api.github.com/repos/trufont/trufont/assignees{/user}","branches_url":"https://api.github.com/repos/trufont/trufont/branches{/branch}","tags_url":"https://api.github.com/repos/trufont/trufont/tags","blobs_url":"https://api.github.com/repos/trufont/trufont/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trufont/trufont/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trufont/trufont/git/refs{/sha}","trees_url":"https://api.github.com/repos/trufont/trufont/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trufont/trufont/statuses/{sha}","languages_url":"https://api.github.com/repos/trufont/trufont/languages","stargazers_url":"https://api.github.com/repos/trufont/trufont/stargazers","contributors_url":"https://api.github.com/repos/trufont/trufont/contributors","subscribers_url":"https://api.github.com/repos/trufont/trufont/subscribers","subscription_url":"https://api.github.com/repos/trufont/trufont/subscription","commits_url":"https://api.github.com/repos/trufont/trufont/commits{/sha}","git_commits_url":"https://api.github.com/repos/trufont/trufont/git/commits{/sha}","comments_url":"https://api.github.com/repos/trufont/trufont/comments{/number}","issue_comment_url":"https://api.github.com/repos/trufont/trufont/issues/comments{/number}","contents_url":"https://api.github.com/repos/trufont/trufont/contents/{+path}","compare_url":"https://api.github.com/repos/trufont/trufont/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trufont/trufont/merges","archive_url":"https://api.github.com/repos/trufont/trufont/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trufont/trufont/downloads","issues_url":"https://api.github.com/repos/trufont/trufont/issues{/number}","pulls_url":"https://api.github.com/repos/trufont/trufont/pulls{/number}","milestones_url":"https://api.github.com/repos/trufont/trufont/milestones{/number}","notifications_url":"https://api.github.com/repos/trufont/trufont/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trufont/trufont/labels{/name}","releases_url":"https://api.github.com/repos/trufont/trufont/releases{/id}","created_at":"2015-10-11T20:32:11Z","updated_at":"2015-10-15T10:24:23Z","pushed_at":"2015-10-15T17:26:03Z","git_url":"git://github.com/trufont/trufont.git","ssh_url":"git@github.com:trufont/trufont.git","clone_url":"https://github.com/trufont/trufont.git","svn_url":"https://github.com/trufont/trufont","homepage":"http://trufont.github.io/","size":0,"stargazers_count":26,"watchers_count":26,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":9,"forks":7,"open_issues":9,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trufont/trufont/pulls/17"},"html":{"href":"https://github.com/trufont/trufont/pull/17"},"issue":{"href":"https://api.github.com/repos/trufont/trufont/issues/17"},"comments":{"href":"https://api.github.com/repos/trufont/trufont/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/trufont/trufont/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/trufont/trufont/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/trufont/trufont/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/trufont/trufont/statuses/0636b8062c1ec4628b1fac3bf245a9e81d0f1f67"}}}}