I have some old code that a user has prodded me into trying to resolve. The issue is that the window does not size correctly on its first appearance.
Stepping through my code, on initial entry to the windowDidLoad
method, the size is (800, 472), which seems to correspond with the size in Interface Builder. I go and calculate the size that I want, and in one case it turns out to be (1235, 435), and I use setContentSize
to get the window to the correct size. However, it is not that size when it appears, and when I get a chance to look at it, the size is (816, 435). When it runs through the same code in response to the user setting the scale, the size is correctly (1235, 435). Just to be non-deterministic, sometimes the height is 411. The numbers may change, but the difference in height is always either 0 or 24.
Is there something that runs after windowDidLoad
that changes the window size? Or any other clues to track down why the size changes?