Commit Graph

4 Commits

Author SHA1 Message Date
der richter 7f8d069087 mac: only update touch bar items when necessary
the slider on the touch bar was always updated when any of the related
properties changed their value. this is partially dependent on the
refresh rate of the video, in the case of time-pos. too many updates to
touch bar impact the render performance.

to prevent this we only update the slider when necessary, when the touch
bar or the touch bar item is visible. the touch bar items only need a
granularity of seconds without any decimals, but the time-pos property
provides a granularity with decimals. we floor those values and only
update the touch bar items when we have at least a 1 second difference.
we also check for the visibility of the touch bar and its items.

Fixes #8477
2021-02-13 15:51:32 +01:00
der richter aa00ad06aa mac: use custom touch bar item and slider instead of a touch bar slider
the NSSliderTouchBarItem seem to be broken in a way it can't be fixed.
it has constraints set by default that can't be removed and lead to
warnings and render performance regressions.

instead of using the preconfigured NSSliderTouchBarItem we use a custom
touch bar item (NSCustomTouchBarItem) with a slider, which essential are
the same. this way we can configure our constraints ourselves, which
aren't needed in the first place.

Fixes: #7047
2021-02-13 15:51:32 +01:00
wm4 6b303d5c3c osx: change license of OSX and cocoa files to LGPL
All authors of the current code have agreed.
2017-06-24 16:29:22 +02:00
Akemi f8a223b7ac osx: initial Touch Bar support 2017-03-26 20:26:18 +02:00