Merge remote-tracking branch 'origin/main' into gpui2-no-send

This commit is contained in:
Nathan Sobo
2023-11-01 21:10:31 -06:00
133 changed files with 14910 additions and 7230 deletions
+1 -1
View File
@@ -47,8 +47,8 @@ where
subscribers.remove(&subscriber_id);
if subscribers.is_empty() {
lock.subscribers.remove(&emitter_key);
return;
}
return;
}
// We didn't manage to remove the subscription, which means it was dropped
+6
View File
@@ -506,6 +506,12 @@ impl<'a, 'w> WindowContext<'a, 'w> {
self.window.rem_size
}
/// Sets the size of an em for the base font of the application. Adjusting this value allows the
/// UI to scale, just like zooming a web page.
pub fn set_rem_size(&mut self, rem_size: impl Into<Pixels>) {
self.window.rem_size = rem_size.into();
}
/// The line height associated with the current text style.
pub fn line_height(&self) -> Pixels {
let rem_size = self.rem_size();