Enable/disable scrollbar auto-hide based on OS setting
This commit is contained in:
parent
b229bc69b9
commit
e2700ff8c6
4 changed files with 35 additions and 9 deletions
|
@ -699,6 +699,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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue