[squeak-dev] rounded corner morphs seem to be broken

tim Rowledge tim at rowledge.org
Mon Jun 27 21:27:47 UTC 2016


I’m trying to work out why the comment morphs in nuScratch are not getting the rounded corners that they should. This is something that changed a while ago without me really noticing. I think we’re talking late last year as best I can tell from trying out older releases to attempt to triangulate on the problem.

In the olden days we used a CornerRounder class to handle things, which has gone away. So far as I can work out now we don’t really do the job thoroughly. Individual morphs can draw with rounded corners ok although the rounding is not very nicely drawn below a radius of 8 pixels, which is admittedly not a huge surprise. If you make a composite morph - like the comment morphs - the submorphs are not affected at all any more. This makes the comment morph fairy very sad.

The comment fairy wants her morphs to look like this - 

and when the little magic triangle is tickled it should look like this -


Instead we get this - 

and - 


The comment is currently implemented as an AlignmentMorph containing a topbar (another alignment containing the triangle and a usually empty string morph) and the lower area holding a ‘MultilineStringMorph’ and the resize icon morph. The lower-right corner looks ok because the resize icon is small enough not to overlap the rounding. I managed improve things a little by making the background to the lower text transparent; before that the lower left corner was squared off too.

Looking around for rounding related code I note that the Morph>roundedCorners method which appears to be a way to designate which corners are actually rounded is no longer used. Which is a pity since it would possibly solve my problem by allowing me to round the top two corners of the upper alignment morph. Hmm, actually since the colours of the upper and lower backgrounds are very close it kinda-sorta looks acceptable if I just round the entire upper morph - but it ain’t proper I tell you!

Can anyone recall messing about with rounding morphs over the last year or thereabouts? I think it happened between 4.5-13860 and 4.6-15102

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: BIB: Branch If Branch if branch...


-------------- next part --------------
Skipped content of type multipart/related


More information about the Squeak-dev mailing list