Add support for resizing splits and docks, as well as utilities (#3595)

Making this PR to upstream changes to util and GPUI2, resizing exists
but isn't working yet.

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki
2023-12-11 13:32:06 -08:00
committed by GitHub
20 changed files with 976 additions and 512 deletions
@@ -49,6 +49,7 @@ use std::{
rc::Rc,
slice, str,
sync::Arc,
time::Duration,
};
use time::UtcOffset;
@@ -657,6 +658,13 @@ impl Platform for MacPlatform {
"macOS"
}
fn double_click_interval(&self) -> Duration {
unsafe {
let double_click_interval: f64 = msg_send![class!(NSEvent), doubleClickInterval];
Duration::from_secs_f64(double_click_interval)
}
}
fn os_version(&self) -> Result<SemanticVersion> {
unsafe {
let process_info = NSProcessInfo::processInfo(nil);
@@ -12,6 +12,7 @@ use std::{
path::PathBuf,
rc::{Rc, Weak},
sync::Arc,
time::Duration,
};
pub struct TestPlatform {
@@ -274,4 +275,8 @@ impl Platform for TestPlatform {
fn delete_credentials(&self, _url: &str) -> Result<()> {
Ok(())
}
fn double_click_interval(&self) -> std::time::Duration {
Duration::from_millis(500)
}
}