The new macOS Tahoe changes the appearance of buttons in my applet. The dialog (and buttons) are created using DTP. In Tahoe the buttons are all wider and now visibly overlap. “equal widths” is off.
Is there a way to restore the separation between buttons to stop the overlap ?
Is there a way to do that without affecting users on pre-Tahoe macOS ?
I haven’t upgraded to Tahoe, but I imagine it’s just a bit of judicious editing of the maths in the library. Unfortunately I’m in no position to update it – hopefully someone here will step up.
Yes, it looks like reducing buttonLeft in prepareEnhancedWindowMainThread() helps. So, my change was from this:
set buttonLeft to (buttonLeft - buttonWidth + 5) [*]
to this:
set buttonLeft to (buttonLeft - buttonWidth - 5)
That gives a passable separation between buttons.
[* Note that my old code was customised. DTP 1.1.3 had no increase in buttonLeft. Also, I have minimumButtonWidth set to 25.]
Frustratingly, running from the Desktop, buttons look OK. But, when running applet from within SD buttons are further apart. They also have different shading.
More frustrating is that the button separation is much the same as in SD, in macOS 12 (Monterey).
To address the button separation issue, I’ve added some code to the DTP script library.
In the prepareEnhancedWindowMainThread handler, before the repeat loop:
set user_sysinfo to system info
set user_os_version to system version of user_sysinfo as string
considering numeric strings
if user_os_version is greater than or equal to 26 then
set buttonLeftDelta to -5
else
set buttonLeftDelta to 5
end if
end considering
Then, inside the repeat loop change:
set buttonLeft to (buttonLeft - buttonWidth)
to
set buttonLeft to (buttonLeft - buttonWidth + buttonLeftDelta)
Tested on macOS 26 and 12.7.6 and seems to work – buttons are positioned correctly.