Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
486 changes: 160 additions & 326 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ gpui-component-macros = { path = "crates/macros", version = "0.5.1" }
gpui-component-assets = { path = "crates/assets", version = "0.5.1" }
story = { path = "crates/story" }

gpui = { git = "https://github.com/BumpyClock/gpui", rev = "510dedc3b44fcf80c791ab17e59530ae66e80558", features = ["font-kit"] }
gpui_platform = { git = "https://github.com/BumpyClock/gpui", rev = "510dedc3b44fcf80c791ab17e59530ae66e80558", features = ["font-kit"] }
gpui = { git = "https://github.com/BumpyClock/gpui", rev = "24cfa81ca2a9f954b96320e14b393dd519078618", features = ["font-kit"] }
gpui_platform = { git = "https://github.com/BumpyClock/gpui", rev = "24cfa81ca2a9f954b96320e14b393dd519078618", features = ["font-kit"] }
gpui-macros = "0.2.2"
sum-tree = { version = "0.2.0", package = "zed-sum-tree" }
# reqwest = { version = "0.12.15-zed", package = "zed-reqwest" }
Expand Down
2 changes: 1 addition & 1 deletion crates/ui/src/dock/tab_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ impl TabPanel {
div()
.id("tab-bar-empty-space")
.h_full()
.flex_grow()
.flex_grow(1.)
.min_w_16()
.when(state.droppable, |this| {
this.drag_over::<DragPanel>(|this, _, _, cx| {
Expand Down
4 changes: 2 additions & 2 deletions crates/ui/src/form/field.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::rc::Rc;

use gpui::{
AlignItems, AnyElement, AnyView, App, Axis, Div, Element, ElementId, InteractiveElement as _,
AlignItems, AnyElement, AnyView, App, Axis, Div, ElementId, InteractiveElement as _,
IntoElement, ParentElement, Pixels, Rems, RenderOnce, SharedString, Styled, Window, div,
prelude::FluentBuilder as _, px,
};
Expand Down Expand Up @@ -53,7 +53,7 @@ impl RenderOnce for FieldBuilder {
match self {
FieldBuilder::String(value) => value.into_any_element(),
FieldBuilder::Element(builder) => builder(window, cx),
FieldBuilder::View(view) => view.into_any(),
FieldBuilder::View(view) => view.into_any_element(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/ui/src/input/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2239,7 +2239,7 @@ impl Render for InputState {
.id("input-state")
.flex_1()
.when(self.mode.is_multi_line(), |this| this.h_full())
.flex_grow()
.flex_grow(1.)
.overflow_x_hidden()
.child(TextElement::new(cx.entity()).placeholder(self.placeholder.clone()))
.children(self.diagnostic_popover.clone())
Expand Down
2 changes: 1 addition & 1 deletion crates/ui/src/list/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ where
let scroll_handle = self.scroll_handle.clone();

v_flex()
.flex_grow()
.flex_grow(1.)
.relative()
.size_full()
.when_some(self.options.max_height, |this, h| this.max_h(h))
Expand Down
4 changes: 2 additions & 2 deletions crates/ui/src/resizable/panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ impl RenderOnce for ResizablePanel {
div()
.id(("resizable-panel", self.panel_ix))
.flex()
.flex_grow()
.flex_grow(1.)
.size_full()
.relative()
.when(self.axis.is_vertical(), |this| {
Expand All @@ -262,7 +262,7 @@ impl RenderOnce for ResizablePanel {
// 1. initial_size is None, to use auto size.
// 2. initial_size is Some and size is none, to use the initial size of the panel for first time render.
// 3. initial_size is Some and size is Some, use `size`.
.when(self.initial_size.is_none(), |this| this.flex_shrink())
.when(self.initial_size.is_none(), |this| this.flex_shrink(1.))
.when_some(self.initial_size, |this, initial_size| {
// The `self.size` is None, that mean the initial size for the panel,
// so we need set `flex_shrink_0` To let it keep the initial size.
Expand Down
4 changes: 2 additions & 2 deletions crates/ui/src/table/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,7 @@ where
this.children(empty_view)
} else {
this.child(
h_flex().id("table-body").flex_grow().size_full().child(
h_flex().id("table-body").flex_grow(1.).size_full().child(
uniform_list(
"table-uniform-list",
render_rows_count,
Expand Down Expand Up @@ -1894,7 +1894,7 @@ where
},
),
)
.flex_grow()
.flex_grow(1.)
.size_full()
.with_sizing_behavior(ListSizingBehavior::Auto)
.track_scroll(&self.vertical_scroll_handle)
Expand Down
2 changes: 1 addition & 1 deletion crates/ui/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ impl Render for TreeState {
items
})
})
.flex_grow()
.flex_grow(1.)
.size_full()
.track_scroll(&self.scroll_handle)
.with_sizing_behavior(ListSizingBehavior::Auto)
Expand Down
4 changes: 2 additions & 2 deletions crates/webview/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,14 @@ impl Element for WebViewElement {
)),
}) {
let message: SharedString = format!("Failed to resize webview: {err}").into();
let _ = self.parent.update(cx, |parent, cx| {
self.parent.update(cx, |parent, cx| {
parent.set_error(message.clone());
cx.notify();
});
return None;
}

let _ = self.parent.update(cx, |parent, cx| {
self.parent.update(cx, |parent, cx| {
if parent.last_error.is_some() {
parent.clear_error();
cx.notify();
Expand Down
1 change: 1 addition & 0 deletions examples/webview/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use gpui::prelude::FluentBuilder as _;
use gpui::*;
use gpui_component::{
ActiveTheme as _, Root, h_flex,
Expand Down
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.95.0"
profile = "minimal"
components = ["rustfmt", "clippy"]
2 changes: 1 addition & 1 deletion vendor/gpui
Submodule gpui updated 134 files