Merge branch 'main' into kvark-linux

This commit is contained in:
Mikayla 2024-02-07 11:49:49 -08:00
commit 67555ee5b4
No known key found for this signature in database
238 changed files with 6624 additions and 3524 deletions

View file

@ -25,6 +25,7 @@ pub(crate) struct TestPlatform {
active_cursor: Mutex<CursorStyle>,
current_clipboard_item: Mutex<Option<ClipboardItem>>,
pub(crate) prompts: RefCell<TestPrompts>,
pub opened_url: RefCell<Option<String>>,
weak: Weak<Self>,
}
@ -45,6 +46,7 @@ impl TestPlatform {
active_window: Default::default(),
current_clipboard_item: Mutex::new(None),
weak: weak.clone(),
opened_url: Default::default(),
})
}
@ -180,6 +182,10 @@ impl Platform for TestPlatform {
Box::new(window)
}
fn window_appearance(&self) -> WindowAppearance {
WindowAppearance::Light
}
fn set_display_link_output_callback(
&self,
_display_id: DisplayId,
@ -192,8 +198,8 @@ impl Platform for TestPlatform {
fn stop_display_link(&self, _display_id: DisplayId) {}
fn open_url(&self, _url: &str) {
unimplemented!()
fn open_url(&self, url: &str) {
*self.opened_url.borrow_mut() = Some(url.to_string())
}
fn on_open_urls(&self, _callback: Box<dyn FnMut(Vec<String>)>) {