Well, it's not pretty, but seems to work.
Code: Select all
if the platform contains "mac" then set the bottom of stack "revmenubar" to the bottom of group "toolbar" of stack "revmenubar" + the height of group "revmenubar" of stack "revmenubar" /2 +6
Can you test on anything higher than 10.15 please.
- catalina-pos.png (44.95 KiB) Viewed 1685 times
- mavericks-pos.png (34.89 KiB) Viewed 1685 times
I might be barking up the wrong tree, (or just barking).
I see 'over there', they think the window titlebar height is always the same, which we know it isn't between MacOS versions.
We aren't using scalefactors either, so that's irrelevant.
As you know, and I see you've tried to make plainly clear to that lot, this is calculating the varying heights of the menubar due to differences in the OS. All they are doing is getting the height of the menubar and adding 28 to it - they are assuming that the window titlebar does not change height, which is incorrect.
using "item 2 of the working screenrect" is only effectively measuring the height of the mac menubar, and you can see it varies very slightly between Mavericks and Catalina (1px taller)
- menubar-comparison.png (25.01 KiB) Viewed 1670 times
Here's the output to show this (top one is linux, where it always measures it as 0 logically enough)
Middle is Mavericks,
Bottom pic is Catalina.
- Screenshot_2024-01-20_20-30-04.png (37.94 KiB) Viewed 1670 times
That's great if you want the height of the menubar, but what we are actually after is the height of the menubar & height of the window titlebar combined, as you've rightly explained over there, and they've missed the point.
(In fact, if I wanted the height of the menubar, I'd probably do this:)
Code: Select all
put line (the screen of stack "revMenubar") of the working screenRects
You could chuck them a copy of the screenshot we discussed previously, to show how the window titlebars on MacOS have changed height over time.
https://www.openxtalk.org/forum/viewtop ... 5392#p5392
I might just use these heights as a best guess scenario, although they might not be pixel-perfect accuracy - and that's what I'm after positioning-wise on the revMenubar.
I'll keep on trying. (I'm very trying).