revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!
https://www.outrunlabs.com/revery/
MIT License
8.06k stars 196 forks source link

feat(macOS): add API to get titlebar size #1019

Closed zbaylin closed 3 years ago

zbaylin commented 3 years ago

Since macOS Big Sur changes the size of the titlebar by default, it can lead to things looking kind of strange when you roll your own titlebar (like in Oni). This adds an API to get the size of the titlebar from Cocoa itself, so we don't have to make guesses from the version of macOS or something like that.