Allow leaving calls once project is unshared

This commit is contained in:
Conrad Irwin 2024-01-16 19:35:26 -07:00
parent 26a3f68080
commit 1d5b237b64
2 changed files with 9 additions and 8 deletions

View file

@ -25,7 +25,7 @@ use futures::{
Future, FutureExt, StreamExt,
};
use gpui::{
actions, canvas, div, impl_actions, point, size, Action, AnyElement, AnyModel, AnyView,
actions, canvas, div, impl_actions, point, px, size, Action, AnyElement, AnyModel, AnyView,
AnyWeakView, AppContext, AsyncAppContext, AsyncWindowContext, BorrowWindow, Bounds, Context,
Div, DragMoveEvent, Element, Entity, EntityId, EventEmitter, FocusHandle, FocusableView,
GlobalPixels, InteractiveElement, IntoElement, KeyContext, LayoutId, ManagedView, Model,
@ -4302,6 +4302,10 @@ fn parse_pixel_size_env_var(value: &str) -> Option<Size<GlobalPixels>> {
Some(size((width as f64).into(), (height as f64).into()))
}
pub fn titlebar_height(cx: &mut WindowContext) -> Pixels {
(1.75 * cx.rem_size()).max(px(32.))
}
struct DisconnectedOverlay;
impl Element for DisconnectedOverlay {
@ -4318,7 +4322,7 @@ impl Element for DisconnectedOverlay {
.bg(background)
.absolute()
.left_0()
.top_0()
.top(titlebar_height(cx))
.size_full()
.flex()
.items_center()