Skip to content

Constraints should take height-for-width widget sizes into account #18

@ptomato

Description

@ptomato

I've been experimenting with translating some examples from Apple's autolayout code to Emeus. Here is my translation of http://commandshift.co.uk/blog/2013/01/31/visual-format-language-for-autolayout/, as a gist: https://gist.github.com/ptomato/4f43834abc431705f515985fd8b53fcf

(To run it, download the two files from the gist, fetch the picture with wget -O kitten.jpg http://placekitten.com/150/150, and run gjs kitten.js.)

If you run the example with the short label string in headline, it looks perfect:
screenshot from 2016-12-20 15-46-21

However, if you comment out the short string and uncomment the long string, the constraint layout doesn't make room for the label's height:
screenshot from 2016-12-20 15-46-33

I suspect this is because the constraint layout is only taking the label's minimum height (the height that it would be if it had infinite width) into account and not its natural height.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions