When CPButton -setTheme is called, the frame is not adjusted for the min/max size in the theme.
If I create a button in IB, there is no way (in 3.1 at least) to set the bezel to HUD. So I use a HUDButton subclass of CPButton that sets the theme to Aristo-HUD in the initializers. But the height of the frame is not adjusted to the max height specified in the theme and the buttons are not drawn correctly.
I fixed this by overriding CPButton -viewDidChangeTheme. A proposed patch to CPButton.j is here: http://gist.github.com/399524
I'm not sure if it should auto change the size of the frame. You can call sizeToFit after calling setTheme: to update the frame respecting the new theme values.
Calling setTheme alone causes controls to be improperly drawn. Surely that can't be the intent of setTheme. Shouldn't it respect the min/max frame sizes established by the theme?
If I have to call sizeToFit to make setTheme work correctly, then the code I proposed is equivalent (although I would hoist it to CPControl).
FYI, fonts are also not correctly changed by setTheme. The whole point of themes is to encapsulate bezel (which implies size), font, background and color. Shouldn't calling setTheme modify all of those attributes to conform to the theme?
Milestone: 1.0. Labels: #accepted, #needs-patch, #needs-reduction, AppKit, bug. What's next?
Milestone: 1.0. Labels: #wont-fix, AppKit, bug. What's next? A reviewer or core team member has decided against acting upon this issue.