[Cuis-dev] Layout and proportional padding

ken.dickey at whidbey.com ken.dickey at whidbey.com
Sun Apr 26 07:47:16 PDT 2020


Hilaire,

I had a chance to play with WheelMorphs a bit and have several 
suggestions.

[A] I like a Class method which sets the target and action.

[B] I got funny behavior when resizing a LayoutMorph containing a 
WheelMorph, where vertical flipped to horizontal as the LayoutMorph was 
resetting the WheelMorph's width & height.  I suggest changing 
isHorizontal to a real, boolean property.

[C] When changing between horizontal & vertical, one wants a 
#redrawNeeded to avoid artifacts.

The updated package attached has my suggestions.

[D] One thing I did not change.  I would prefer 'WheelMorph' to 'Wheel' 
for Feature requirement.


Juan, I think adding attached method 
UpdatingStringMorph>>showPrintStringFor: is useful to have a selector to 
hand to WheelMorpoh's (as below).

$0.02,
-KenD

PS: I noted in your original email, you were adding LayoutSpec's to a 
Column LayoutMorph.  As the minorDirectionPadding is perpendicular to 
the orientation of the containing LayoutMorph, you are setting the 
submorphs to the left and right, even though the symbols indicate #top 
and #bottom.

This is a confusing historical UI artifact which we ought to fix.  
Sorry.  I will send a separate proposal on correcting this.

"===================================================="
Feature require: 'Wheel'.

display := UpdatingStringMorph new contents: '0.0'.
wheel := WheelMorph target: display actionSelector: #showPrintStringFor:
wheel beVertical.
wheel openInWorld.
display openInWorld.
display morphPosition: (wheel morphPosition + 50).
"===================================================="
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: UpdatingStringMorph-showPrintStringFor.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200426/e32dd431/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Wheel.pck.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200426/e32dd431/attachment-0001.ksh>


More information about the Cuis-dev mailing list