[Cuis-dev] BoxedMorph padding
Juan Vuletich
juan at cuis.st
Sun Sep 8 05:46:07 PDT 2024
On 9/7/2024 8:30 PM, ken.dickey--- via Cuis-dev wrote:
> On 2024-09-07 13:49, Juan Vuletich wrote:
> ..
>> I think this is useful. But I'm not really happy with adding the ivar
>> to BoxedMorph.
> ..
>> So, I think it would be better to add PaddedMorph as subclass of
>> BoxedMorph, with ivar 'padding'. Then we could (pehaps gradually)
>> change the superclass of classes where we see the advantage, starting
>> with your code to enable the feature.
>
> I think this a good idea. I also noted many cases where padding makes
> no sense.
>
> Perhaps PaddedMorph subclass of BoxedMorph?
>
> Subclasses of PaddedMorph might start with:
>
> ImageMorph
> LabelMorph
> LayoutMorph
> TextParagraphMorph
> InnerTextMorph
>
> Then incrementally migrate:
>
> HoverHelpMorph
> MenuMorph
> PluggableMorph
> TextParagraphMorph
> TranscriptMorph
>
> This also brings up usage and testing of PlacedMorphs
> [Non-BoxedMorphs] in Layouts.
>
> We have not used this much and the behavior of vector-graphic Morphs
> rescaled by Layouts seem kind of random/uneven.
>
> Perhaps chat on Wednesday?
>
> Would it be OK if I make up a changeSet refactoring the above with
> PaddedMorph ?
Yes, of course. That was essentially my suggestion. But please leave out
InnerTextMorph. I believe it is better to replace #extraBorder with
'padding' in PluggableScrollPane instead.
>
> Cheers,
> -KenD
> PS: Thanks for off-by-one display fix for ImageMorph>>drawOn: !
:)
Thanks,
--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich
More information about the Cuis-dev
mailing list