{"action":"closed","issue":{"url":"https://api.github.com/repos/trufont/trufont/issues/135","labels_url":"https://api.github.com/repos/trufont/trufont/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/trufont/trufont/issues/135/comments","events_url":"https://api.github.com/repos/trufont/trufont/issues/135/events","html_url":"https://github.com/trufont/trufont/issues/135","id":116000500,"number":135,"title":"Harmonize usage of SizeGripItem widget","user":{"login":"felipesanches","id":213676,"avatar_url":"https://avatars.githubusercontent.com/u/213676?v=3","gravatar_id":"","url":"https://api.github.com/users/felipesanches","html_url":"https://github.com/felipesanches","followers_url":"https://api.github.com/users/felipesanches/followers","following_url":"https://api.github.com/users/felipesanches/following{/other_user}","gists_url":"https://api.github.com/users/felipesanches/gists{/gist_id}","starred_url":"https://api.github.com/users/felipesanches/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felipesanches/subscriptions","organizations_url":"https://api.github.com/users/felipesanches/orgs","repos_url":"https://api.github.com/users/felipesanches/repos","events_url":"https://api.github.com/users/felipesanches/events{/privacy}","received_events_url":"https://api.github.com/users/felipesanches/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-10T00:38:42Z","updated_at":"2015-12-18T10:07:01Z","closed_at":"2015-12-18T10:07:01Z","body":"Adrien had requested a Qt widget that provides a set of resizing handles. One specific aspect of the request was that it should be generic so we could use it for both resizing pixmaps and for resizing glyph curves. I did it by porting the C++ reference implementation that Adrien pointed out here: https://github.com/felipesanches/sizegripitem_python\r\n\r\nOver the weekend, though, Adrien merged a portion of that code into TruFont, but including some changes to use it for scaling pixmaps. The issue is that these changes break the overall structure and generality of the widget. I've spent quite a large ammount of time today trying to re-harmonize the two usages of the widget. But instead of simply doing it quietly, I preffer to explain here the design of the widget so that we can see if we agree on these terms.\r\n\r\nThe glyph is built with 2 classes: **SizeGripItem** which is the main one and which instantiates several **ResizeHandleItem**s (which are the control nodes of the resizer widget).\r\n\r\nThe SizeGripItem class holds a reference to a resizer object that must be passed to it in its constructor.\r\n\r\nThe purpose of this resizer object is to make the widget generic. The resizer object is responsible for providing a resize() method that does whatever specific-purpose operation that a specific tool may need. So, in the case of the pixmap usage, this would be performing the resizing operation on the selected pixmap. In the glyph outline usage, it means re-evaluating the coordinates of all curve nodes that belong to the selection.\r\n\r\nAdrien's implementation with pixmaps simply does not use this mechanism and the changes affect the usage of the SizeGripItem for glyph curves resizing (which is my current work in progress). I'd like to discuss it here so that we reach a consensus on the correct way of handling this in a generic way."}}