diff --git a/scripts/uosc/elements/Controls.lua b/scripts/uosc/elements/Controls.lua index 6e97742..1abad69 100644 --- a/scripts/uosc/elements/Controls.lua +++ b/scripts/uosc/elements/Controls.lua @@ -325,5 +325,6 @@ function Controls:on_dispositions() self:reflow() end function Controls:on_display() self:update_dimensions() end function Controls:on_prop_border() self:update_dimensions() end function Controls:on_prop_fullormaxed() self:update_dimensions() end +function Controls:on_timeline_enabled() self:update_dimensions() end return Controls diff --git a/scripts/uosc/elements/Timeline.lua b/scripts/uosc/elements/Timeline.lua index 491e9f3..4af64d1 100644 --- a/scripts/uosc/elements/Timeline.lua +++ b/scripts/uosc/elements/Timeline.lua @@ -24,7 +24,9 @@ function Timeline:get_visibility() end function Timeline:decide_enabled() - self.enabled = not self.obstructed and state.duration and state.duration > 0 and state.time + local previous = self.enabled + self.enabled = not self.obstructed and state.duration ~= nil and state.duration > 0 and state.time ~= nil + if self.enabled ~= previous then Elements:trigger('timeline_enabled', self.enabled) end end function Timeline:get_effective_size_min()