@@ -1,9 +1,11 @@
use std::sync::Arc;
-use gpui::{div, rems, DefiniteLength, Hsla, MouseButton, WindowContext};
+use gpui::{div, DefiniteLength, Hsla, MouseButton, WindowContext};
-use crate::{h_stack, Icon, IconColor, IconElement, Label, LabelColor, LineHeightStyle};
-use crate::{prelude::*, IconButton};
+use crate::{
+ h_stack, prelude::*, Icon, IconButton, IconColor, IconElement, Label, LabelColor,
+ LineHeightStyle,
+};
/// Provides the flexibility to use either a standard
/// button or an icon button in a given context.
@@ -167,10 +169,10 @@ impl<V: 'static> Button<V> {
let icon_color = self.icon_color();
let mut button = h_stack()
- .relative()
.id(SharedString::from(format!("{}", self.label)))
+ .relative()
.p_1()
- .text_size(rems(1.))
+ .text_ui()
.rounded_md()
.bg(self.variant.bg_color(cx))
.hover(|style| style.bg(self.variant.bg_color_hover(cx)))
@@ -217,7 +219,7 @@ impl<V: 'static> ButtonGroup<V> {
}
fn render(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {
- let mut el = h_stack().text_size(rems(1.));
+ let mut el = h_stack().text_ui();
for button in self.buttons {
el = el.child(button.render(_view, cx));
@@ -94,7 +94,7 @@ impl Input {
.active(|style| style.bg(input_active_bg))
.flex()
.items_center()
- .child(div().flex().items_center().text_sm().map(|this| {
+ .child(div().flex().items_center().text_ui_sm().map(|this| {
if self.value.is_empty() {
this.child(placeholder_label)
} else {
@@ -30,7 +30,7 @@ impl Breadcrumb {
h_stack()
.id("breadcrumb")
.px_1()
- .text_sm()
+ .text_ui_sm()
.text_color(cx.theme().colors().text_muted)
.rounded_md()
.hover(|style| style.bg(cx.theme().colors().ghost_element_hover))
@@ -77,7 +77,7 @@ impl CollabPanel {
.items_center()
.child(
div()
- .text_sm()
+ .text_ui_sm()
.text_color(cx.theme().colors().text_placeholder)
.child("Find..."),
),