Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Merge branch 'main' into diagnostics-style-2

Marshall Bowersfb352af35cba
diff --cc crates/ui2/src/components/button/button.rs
index d80b4a7ebf8,d5f8ce92879..c1262321ced
--- a/crates/ui2/src/components/button/button.rs
+++ b/crates/ui2/src/components/button/button.rs
@@@ -1,7 -1,11 +1,11 @@@
-use gpui::AnyView;
+use gpui::{AnyView, DefiniteLength};
use crate::prelude::*;
- use crate::{ButtonCommon, ButtonLike, ButtonSize, ButtonStyle, Label, LineHeightStyle};
+ use crate::{
+ ButtonCommon, ButtonLike, ButtonSize, ButtonStyle, Icon, IconSize, Label, LineHeightStyle,
+ };
+
+ use super::button_icon::ButtonIcon;
#[derive(IntoElement)]
pub struct Button {
diff --cc crates/ui2/src/components/button/button_like.rs
index 6af81cae77d,71aa31ced21..4bef6bff774
--- a/crates/ui2/src/components/button/button_like.rs
+++ b/crates/ui2/src/components/button/button_like.rs
@@@ -267,12 -321,8 +336,11 @@@ impl RenderOnce for ButtonLike
fn render(self, cx: &mut WindowContext) -> Self::Rendered {
h_stack()
.id(self.id.clone())
+ .group("")
+ .flex_none()
.h(self.size.height())
+ .when_some(self.width, |this, width| this.w(width))
.rounded_md()
- .cursor_pointer()
.gap_1()
.px_1()
.bg(self.style.enabled(cx).background)
diff --cc crates/ui2/src/components/button/icon_button.rs
index ae6c9a4ec27,981eb3aaca2..94431ef642e
--- a/crates/ui2/src/components/button/icon_button.rs
+++ b/crates/ui2/src/components/button/icon_button.rs
@@@ -1,7 -1,9 +1,9 @@@
-use gpui::{Action, AnyView};
+use gpui::{Action, AnyView, DefiniteLength};
use crate::prelude::*;
- use crate::{ButtonCommon, ButtonLike, ButtonSize, ButtonStyle, Icon, IconElement, IconSize};
+ use crate::{ButtonCommon, ButtonLike, ButtonSize, ButtonStyle, Icon, IconSize};
+
+ use super::button_icon::ButtonIcon;
#[derive(IntoElement)]
pub struct IconButton {