Merge branch 'main' into collab-panel2

This commit is contained in:
Conrad Irwin 2023-11-29 15:40:16 -07:00
commit cd60d466b1
9 changed files with 17 additions and 18 deletions

View file

@ -2484,7 +2484,7 @@ impl CollabPanel {
| Section::Offline => true, | Section::Offline => true,
}; };
div() h_stack()
.w_full() .w_full()
.map(|el| { .map(|el| {
if can_collapse { if can_collapse {

View file

@ -15,7 +15,7 @@ use lsp::DiagnosticSeverity;
use project::{HoverBlock, HoverBlockKind, InlayHintLabelPart, Project}; use project::{HoverBlock, HoverBlockKind, InlayHintLabelPart, Project};
use settings::Settings; use settings::Settings;
use std::{ops::Range, sync::Arc, time::Duration}; use std::{ops::Range, sync::Arc, time::Duration};
use ui::Tooltip; use ui::{StyledExt, Tooltip};
use util::TryFutureExt; use util::TryFutureExt;
use workspace::Workspace; use workspace::Workspace;
@ -476,8 +476,10 @@ impl InfoPopover {
) -> AnyElement { ) -> AnyElement {
div() div()
.id("info_popover") .id("info_popover")
.elevation_2(cx)
.text_ui()
.p_2()
.overflow_y_scroll() .overflow_y_scroll()
.bg(gpui::red())
.max_w(max_size.width) .max_w(max_size.width)
.max_h(max_size.height) .max_h(max_size.height)
// Prevent a mouse move on the popover from being propagated to the editor, // Prevent a mouse move on the popover from being propagated to the editor,

View file

@ -11,7 +11,6 @@ mod keybinding;
mod label; mod label;
mod list; mod list;
mod popover; mod popover;
mod slot;
mod stack; mod stack;
mod tooltip; mod tooltip;
@ -31,7 +30,6 @@ pub use keybinding::*;
pub use label::*; pub use label::*;
pub use list::*; pub use list::*;
pub use popover::*; pub use popover::*;
pub use slot::*;
pub use stack::*; pub use stack::*;
pub use tooltip::*; pub use tooltip::*;

View file

@ -34,10 +34,9 @@ impl RenderOnce for Disclosure {
fn render(self, _cx: &mut WindowContext) -> Self::Rendered { fn render(self, _cx: &mut WindowContext) -> Self::Rendered {
IconButton::new( IconButton::new(
"toggle", "toggle",
if self.is_open { match self.is_open {
Icon::ChevronDown true => Icon::ChevronDown,
} else { false => Icon::ChevronRight,
Icon::ChevronRight
}, },
) )
.color(Color::Muted) .color(Color::Muted)

View file

@ -44,8 +44,8 @@ impl List {
self self
} }
pub fn toggle(mut self, toggle: Option<bool>) -> Self { pub fn toggle(mut self, toggle: impl Into<Option<bool>>) -> Self {
self.toggle = toggle; self.toggle = toggle.into();
self self
} }
} }

View file

@ -36,8 +36,8 @@ impl ListHeader {
} }
} }
pub fn toggle(mut self, toggle: Option<bool>) -> Self { pub fn toggle(mut self, toggle: impl Into<Option<bool>>) -> Self {
self.toggle = toggle; self.toggle = toggle.into();
self self
} }

View file

@ -70,8 +70,8 @@ impl ListItem {
self self
} }
pub fn toggle(mut self, toggle: Option<bool>) -> Self { pub fn toggle(mut self, toggle: impl Into<Option<bool>>) -> Self {
self.toggle = toggle; self.toggle = toggle.into();
self self
} }

View file

@ -2,11 +2,9 @@ use gpui::{ImageSource, SharedString};
use crate::Icon; use crate::Icon;
#[derive(Debug, Clone)]
/// A slot utility that provides a way to to pass either /// A slot utility that provides a way to to pass either
/// an icon or an image to a component. /// an icon or an image to a component.
/// #[derive(Debug, Clone)]
/// Can be filled with a []
pub enum GraphicSlot { pub enum GraphicSlot {
Icon(Icon), Icon(Icon),
Avatar(ImageSource), Avatar(ImageSource),

View file

@ -18,6 +18,7 @@ mod disableable;
mod fixed; mod fixed;
pub mod prelude; pub mod prelude;
mod selectable; mod selectable;
mod slot;
mod styled_ext; mod styled_ext;
mod styles; mod styles;
pub mod utils; pub mod utils;
@ -28,5 +29,6 @@ pub use disableable::*;
pub use fixed::*; pub use fixed::*;
pub use prelude::*; pub use prelude::*;
pub use selectable::*; pub use selectable::*;
pub use slot::*;
pub use styled_ext::*; pub use styled_ext::*;
pub use styles::*; pub use styles::*;