Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
TEMP
Conrad Irwin9547e88d883d
diff --git a/crates/gpui2/src/elements/overlay.rs b/crates/gpui2/src/elements/overlay.rsindex 8580ae3eb02..4d3e8fdbf7b 100644--- a/crates/gpui2/src/elements/overlay.rs+++ b/crates/gpui2/src/elements/overlay.rs@@ -1,9 +1,9 @@use smallvec::SmallVec;-use taffy::style::Position;+use taffy::style::{Display, Position};use crate::{- point, px, AbsoluteLength, AnyElement, BorrowWindow, Bounds, Component, Element, LayoutId,- ParentComponent, Pixels, Point, Size, Style,+ point, AnyElement, BorrowWindow, Bounds, Component, Element, LayoutId, ParentComponent, Pixels,+ Point, Size, Style,};pub struct OverlayState {@@ -76,6 +76,7 @@ impl<V: 'static> Element<V> for Overlay<V> {let mut overlay_style = Style::default();overlay_style.position = Position::Absolute;+ overlay_style.display = Display::Flex;let layout_id = cx.request_layout(&overlay_style, child_layout_ids.iter().copied());@@ -108,7 +109,6 @@ impl<V: 'static> Element<V> for Overlay<V> {origin: Point::zero(),size: cx.viewport_size(),};- dbg!(bounds, desired, limits);match self.fit_mode {OverlayFitMode::SnapToWindow => {diff --git a/crates/ui2/src/components/context_menu.rs b/crates/ui2/src/components/context_menu.rsindex 8024d334b55..5d4974e6315 100644--- a/crates/ui2/src/components/context_menu.rs+++ b/crates/ui2/src/components/context_menu.rs@@ -1,11 +1,11 @@use std::cell::RefCell;use std::rc::Rc;-use crate::{h_stack, prelude::*, ListItemVariant};+use crate::{prelude::*, ListItemVariant};use crate::{v_stack, Label, List, ListEntry, ListItem, ListSeparator, ListSubHeader};use gpui::{- overlay, px, Action, AnyElement, Bounds, DispatchPhase, Div, EventEmitter, FocusHandle,- Focusable, FocusableView, LayoutId, MouseButton, MouseDownEvent, Overlay, Render, View,+ overlay, px, Action, AnyElement, Bounds, DispatchPhase, EventEmitter, FocusHandle,+ FocusableView, LayoutId, MouseButton, MouseDownEvent, Overlay, Render, View,};use smallvec::SmallVec;diff --git a/crates/ui2/src/styled_ext.rs b/crates/ui2/src/styled_ext.rsindex d9911e68335..9037682807c 100644--- a/crates/ui2/src/styled_ext.rs+++ b/crates/ui2/src/styled_ext.rs@@ -5,6 +5,7 @@ use crate::{ElevationIndex, UITextSize};fn elevated<E: Styled, V: 'static>(this: E, cx: &mut ViewContext<V>, index: ElevationIndex) -> E {this.bg(cx.theme().colors().elevated_surface_background)+ .z_index(index.z_index()).rounded_lg().border().border_color(cx.theme().colors().border_variant)