Saturday, July 25, 2020


Tags

macOS-Big-Sur-icon

Preparing your Xojo made Mac App for macOS Big Sur

Part 1 - Basic Controls

Saturday, July 25, 2020 - Sam Rowlands

In this article, I am going to talk about some of the technology in the Ohanaware App Kit that you can integrate into your Xojo built Mac Application, which will help it to look good on macOS 10.15 Catalina and macOS 10.16 Big Sur Beta 2.

For simplicity sake, I am going to refer to macOS Big Sur as 10.16, because the header files all refer to Big Sur as 10.16.

As Apple release more beta versions or I make more progress, I will continue this series.

Control Styles

GUICheatSheetv2BSBeta2_1461

You've probably seen this image already, clicking on it will load the full resolution image (which is rather large) and allows a clear overview of what things will look like across the two differently styled OS versions.

The image alone, is only part of the story. Being able to identify which styles or materials to use, is one thing, but you need to know how to modify the standard styles to get that look. The code used to stylize the controls is all included in the Ohanaware App Kit, and in version 1.0.3 I've included the GUI Cheat Sheet, so you can see exactly what properties and code needs to be used to get that style.

Note: the tiny "Sun" icon in the top left hand corner of the window, this button makes it easy to toggle appearance while the application is running, and without having to change the system appearance. It can be copied into your own projects to aid with testing your Xojo made Mac app in both themes.

The Ohanaware App Kit is being exclusively sold via the Omegabundle.

Control sizes

controlSizesBeta2_1919

macOS Big Sur (whatever version number they go with) adds a new control size "Large". Personally I think it is for fingers... There's a Control Sizes window in the App Kit project, that shows what the control sizes look like across different OSes. I've updated the function for setting control sizes, that it correctly updates the font size also. Surprisingly, the Large control size which doesn't exist on Catalina or below, the text actually looks better to me! Weird.

Note: According to Apple, the Large size is what's used for the buttons on the skinny alerts.

More to come...

There's so much more to come, but it of course all takes time... I will add more to this series when I have more information. If there's something in particular you need help with, feel free to reach out to me either via Contact form, Twitter, ifnotnil.com or the Official Xojo Forum