[Cuis-dev] RadioGroup alignment

Juan Vuletich JuanVuletich at zoho.com
Thu Jan 27 11:42:38 PST 2022


On 1/27/2022 7:44 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi Ken,
>
> I have noted this lack of accuracy in alignment with RadioGroup:
>
>
> Both the button and label are centered but the label is not correctly 
> centered. I suspect something related to font height or related.
>
> In the meantime, I will make a CheckGroup based on your RadioGroup, or 
> may be the reverse. I will see.
>
> Best
>
> Hilaire
>
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu

Hi Folks,

The alignment of labels is due to CheckGroup>>list: adding 2 to `self 
font lineSpacing`. Additionally, there is the effect of having text with 
ascenders but no descenders. If you do

example1
"
     self example1 openInWorld
"
     | group |
     group _ self fromList: #('gyjYes' 'gyjNo').
     group     buttons do: [:each |
             each when: #radioSelection send: #show: to: Transcript].
     ^ group

it will look more centered.

To see better, install a true type font, and zoom the morph :)

Cheers,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220127/b62f5b0d/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 15907 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220127/b62f5b0d/attachment-0001.png>


More information about the Cuis-dev mailing list