Rename fill to bg

This commit is contained in:
Antonio Scandurra
2023-10-18 09:39:23 +02:00
parent 597a9f9548
commit 296a2b8e5d
35 changed files with 136 additions and 106 deletions
+6 -2
View File
@@ -39,7 +39,7 @@ impl<S: 'static + Send + Sync> Avatar<S> {
img.uri(self.src.clone())
.size_4()
.fill(theme.middle.warning.default.foreground)
.bg(theme.middle.warning.default.foreground)
}
}
@@ -64,7 +64,11 @@ mod stories {
}
}
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
fn render(
&mut self,
_view: &mut S,
cx: &mut ViewContext<S>,
) -> impl Element<ViewState = S> {
Story::container(cx)
.child(Story::title_for::<_, Avatar<S>>(cx))
.child(Story::label(cx, "Default"))
+1 -1
View File
@@ -162,7 +162,7 @@ impl<S: 'static + Send + Sync + Clone> Button<S> {
.rounded_md()
.border()
.border_color(border_color)
.fill(self.background_color(cx));
.bg(self.background_color(cx));
match (self.icon, self.icon_position) {
(Some(_), Some(IconPosition::Left)) => {
+2 -2
View File
@@ -87,11 +87,11 @@ impl<S: 'static + Send + Sync> Input<S> {
.px_2()
.border()
.border_color(border_color_default)
.fill(background_color_default)
.bg(background_color_default)
.hover(|style| {
style
.border_color(border_color_hover)
.fill(background_color_active)
.bg(background_color_active)
})
// .active(|a| .border_color(border_color_active))
.flex()
+6 -2
View File
@@ -141,7 +141,7 @@ impl<S: 'static + Send + Sync + Clone> Label<S> {
.my_auto()
.w_full()
.h_px()
.fill(LabelColor::Hidden.hsla(cx)),
.bg(LabelColor::Hidden.hsla(cx)),
)
})
.children(runs.into_iter().map(|run| {
@@ -185,7 +185,11 @@ mod stories {
}
}
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
fn render(
&mut self,
_view: &mut S,
cx: &mut ViewContext<S>,
) -> impl Element<ViewState = S> {
Story::container(cx)
.child(Story::title_for::<_, Label<S>>(cx))
.child(Story::label(cx, "Default"))
+1 -1
View File
@@ -18,6 +18,6 @@ impl<S: 'static + Send + Sync> ToolDivider<S> {
fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<ViewState = S> {
let theme = theme(cx);
div().w_px().h_3().fill(theme.lowest.base.default.border)
div().w_px().h_3().bg(theme.lowest.base.default.border)
}
}