One thing I have wondered about is whether it might be better to
define getBaseline() as a no-arg method, rather than having it take a
width constraint argument. This way, baseline would always be defined
as relative to the current size. From a high level, it seems like this
should be OK, since baseline alignment isn't so much about setting
size as it is aligning things after their sizes have been set.
There may be issues with the idea - not sure. However, if it helps
simplify the solution to the min. aspect ratio issue in PushButton, it
might be worth considering.
G
- Baseline alignment Greg Brown
-