[Cuis] Minor Direction Padding

Juan Vuletich juan at jvuletich.org
Mon Jul 20 20:28:44 CDT 2015


On 7/6/2015 12:37 PM, Dan Norton wrote:
> On 6 Jul 2015 at 10:33, Juan Vuletich wrote:
>
>> Hi Dan,
>>
>> On 7/5/2015 8:35 PM, Dan Norton wrote:
>>> Greetings,
>>>
>>> Four LayoutSpec class methods use "minorDirectionPadding:" as a
>> keyword. The parameter
>>> can be a number or one of: #top, #left, #center, #right, or
>> #bottom. AFAICT when the
>>> parameter is a number, it refers to the padding which will be
>> applied in the minor direction.
>>> When it is a symbol, it effectively specifies that morphs will be
>> located as the symbol name
>>> implies.
>>>
>>> Attached are four convenience methods whose keyword emphasizes the
>> visible (morph)
>>> instead of the invisible (padding). The "morphPlacement:"
>> parameter can be  #top, #left,
>>> #center, #right, or #bottom. The methods are:
>>>
>>> LayoutSpec class>>fixedWidth:fixedHeight:morphPlacement:
>>> LayoutSpec class>>fixedWidth:proportionalHeight:morphPlacement:
>>> LayoutSpec class>>proportionalWidth:fixedHeight:morphPlacement:
>>> LayoutSpec
>> class>>proportionalWidth:proportionalHeight:morphPlacement:
>>> Are these worth having in the base system?
>>>
>>>    - Dan
>>>
>> I'd rather replace the keyword 'minorDirectionPadding:' by
>> 'minorDirectionPlacement:' to:
>> - Avoid ambiguity
>> - Avoid duplication
>>
> OK, as far as the duplication, but I don't see "morphPlacement:" in use. Where does the
> ambiguity occur?
>
>   - Dan

The ambiguity in 'morphPlacement' is that it suggest it is about x and y 
placement. It is only for the 'minor' direction: x if a column, y if a 
row. Major direction placement is dictated by the other arguments, and 
siblings, etc.

Does this make sense?

Cheers,
Juan Vuletich




More information about the Cuis mailing list