Merge pull request #1715 from zed-industries/scrollbars

Add scrollbars
This commit is contained in:
Max Brunsfeld 2022-10-11 13:34:15 -07:00 committed by GitHub
commit 638e9f9477
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 228 additions and 13 deletions

View file

@ -709,6 +709,16 @@ impl platform::Platform for MacPlatform {
}
}
fn should_auto_hide_scrollbars(&self) -> bool {
#[allow(non_upper_case_globals)]
const NSScrollerStyleOverlay: NSInteger = 1;
unsafe {
let style: NSInteger = msg_send![class!(NSScroller), preferredScrollerStyle];
style == NSScrollerStyleOverlay
}
}
fn local_timezone(&self) -> UtcOffset {
unsafe {
let local_timezone: id = msg_send![class!(NSTimeZone), localTimeZone];