Updownquark / Quick

Quark's User Interface Creation Kit
0 stars 0 forks source link

Change layouts to take a bounds parameter #21

Closed Updownquark closed 11 years ago

Updownquark commented 12 years ago

To allow for the rounded corners style and potentially other styles, layouts can't use the container's size to lay out children in. They need to take a bounds parameter that is the container's size minus any margins that affect a container's usable size.

Perhaps textures should be consulted from doLayout() for how much size they take up.

Updownquark commented 12 years ago

Not exactly sure how textures will interact with this feature. For example, it's not a crime to place components in the shaded border of a raised texture, but buttons should probably not have text in there.

Maybe a better approach would be for the button to have a content pane that is inset from the button container and lay the components out inside that. Need templates to do that.

Updownquark commented 11 years ago

Think I'll close this for now. I've worked around the issue with buttons by assuming that whatever texture is being used will use the corner-radius style. If I decide later that this is needed after all, I'll reopen it.