@@ -18,6 +18,8 @@ local Group = require "cp.ui.Group"
18
18
local Image = require " cp.ui.Image"
19
19
local StaticText = require " cp.ui.StaticText"
20
20
21
+ local semver = require " semver"
22
+
21
23
local rightToLeft = axutils .compare .rightToLeft
22
24
local cache = axutils .cache
23
25
local childFromBottom = axutils .childFromBottom
@@ -30,6 +32,8 @@ local ninjaMouseClick = tools.ninjaMouseClick
30
32
31
33
local ControlBar = Group :subclass (" cp.apple.finalcutpro.viewer.ControlBar" )
32
34
35
+ local macOSVersion = tools .macOSVersion ()
36
+
33
37
--- cp.apple.finalcutpro.viewer.ControlBar.matches(element) -> boolean
34
38
--- Function
35
39
--- Checks if the element is a `ControlBar` instance.
@@ -43,6 +47,28 @@ function ControlBar.static.matches(element)
43
47
if Group .matches (element ) and # element >= 4 then
44
48
-- Note: sorting right-to-left
45
49
local children = axutils .children (element , rightToLeft )
50
+
51
+ ---- ----------------------------------------------------------------------------
52
+ -- macOS 15 Sequoia seems to have a slightly different window layout:
53
+ ---- ----------------------------------------------------------------------------
54
+ if semver (macOSVersion ) >= semver (" 15.0.0" ) then
55
+ return Button .matches (children [1 ])
56
+ and Button .matches (children [2 ])
57
+ and StaticText .matches (children [4 ])
58
+ and (
59
+ (
60
+ -- Normal Control Bar:
61
+ Button .matches (children [3 ])
62
+ and Button .matches (children [5 ])
63
+ )
64
+ or
65
+ (
66
+ -- Timecode Entry Mode:
67
+ Image .matches (children [4 ])
68
+ )
69
+ )
70
+ end
71
+
46
72
return Button .matches (children [1 ])
47
73
and Button .matches (children [2 ])
48
74
and StaticText .matches (children [3 ])
0 commit comments