Since I update my Mac to Monterey absolutely all my apps show the same issue. There is a gap between the window toolbar and the window contents. As soon as I resize the window the gap disappears though.
I have init code in the window constructors rather than open event handler, so place the above code at the end fixes the issue. Wondering if this is the best way to get around this issue.
Thanks Christophe for the link. I wasnât aware of the new ToolBar types that came with Big Sur.
However the problem Iâm seeing occurs when apps are run on Monterey only and to me doesnât look like an issue with selecting the correct ToolBar type. Iâm happy with the default âExpandedâ type that Xojo selects. Itâs just the objects on the window arenât vertically aligned correctly for some of my ToolBar windows when run on Monterey. I havenât been able to create a test app that isolates the issue. For now Iâll just refresh the window using my code above. Thanks
The âExpandedâ toolbar is NOT the default for apps built against the macOS 11 SDK (like 2021rx apps are), so the Xojo Framework is setting this for you at some point during the window creation.
This problem is not unique to Big Sur or Monterey, itâs been around for a while now. I solved it in one of my apps by removing the Toolbar and re-adding it. So I think it may have something to do with the initialization order of the window controls, or I guess I should now say DesktopWindow DesktopUIControls⊠<shudders/>
As ever, thanks for clarifying Sam. An issue with window control initialization order would make sense to me.
FWIW I tried creating a Xojo test app. I tried adding a couple of controls to the window, then adding a ToolBar. This didnât reproduce the issue. In my previous test apps I added the ToolBar to the window first.
Youâre welcome, but please understand that I do not know for sure, this is just a guess based upon the result of removing and re-adding the toolbar. It could be far more complicated, or even far simpler, but as I donât have access to Xojoâs source code, I canât take a peek.