Checkpoint

This commit is contained in:
Antonio Scandurra 2023-10-17 22:16:48 +02:00
parent a8697df9e3
commit 4db0350f06
18 changed files with 117 additions and 66 deletions

View file

@ -1,6 +1,6 @@
use gpui3::{
div, svg, view, AppContext, Context, Element, ElementId, IntoAnyElement, ParentElement,
ScrollState, SharedString, StyleHelpers, Styled, View, ViewContext, WindowContext,
div, svg, view, Active, AppContext, Context, Element, ElementId, Hover, IntoAnyElement,
ParentElement, ScrollState, SharedString, Styled, View, ViewContext, WindowContext,
};
use ui::{theme, Theme};
@ -132,8 +132,7 @@ impl CollabPanel {
.flex()
.justify_between()
.items_center()
.active()
.fill(theme.highest.accent.default.background)
.active(|style| style.fill(theme.highest.accent.default.background))
.child(div().flex().gap_1().text_sm().child(label))
.child(
div().flex().h_full().gap_1().items_center().child(
@ -174,18 +173,19 @@ impl CollabPanel {
.text_sm()
.child(
div()
.id(0)
.id("avatar")
// .uri(avatar_uri)
.size_3p5()
.rounded_full()
.fill(theme.middle.positive.default.foreground)
.shadow()
.group_hover("")
.fill(theme.middle.negative.default.foreground)
.hover()
.fill(theme.middle.warning.default.foreground)
.group_active("")
.fill(theme.middle.accent.default.foreground),
.group_hover("", |style| {
style.fill(theme.middle.negative.default.foreground)
})
.hover(|style| style.fill(theme.middle.warning.default.foreground))
.group_active("", |style| {
style.fill(theme.middle.accent.default.foreground)
}),
)
.child(label),
)

View file

@ -1,4 +1,4 @@
use gpui3::{div, view, white, Context, ParentElement, StyleHelpers, View, WindowContext};
use gpui3::{div, view, white, Context, ParentElement, Styled, View, WindowContext};
pub struct TextStory {
text: View<()>,

View file

@ -59,7 +59,7 @@ impl<S: 'static + Send + Sync> ZIndexStory<S> {
}
}
trait Styles: StyleHelpers {
trait Styles: Styled + Sized {
// Trailing `_` is so we don't collide with `block` style `StyleHelpers`.
fn block_(self) -> Self {
self.absolute()

View file

@ -3,7 +3,7 @@ use crate::{
themes::rose_pine,
};
use gpui3::{
div, img, svg, view, Context, Element, ParentElement, StyleHelpers, Styled, View, ViewContext,
div, img, svg, view, Context, Element, Hover, ParentElement, Styled, View, ViewContext,
WindowContext,
};
use ui::{theme, themed};
@ -42,10 +42,10 @@ impl Workspace {
div()
.size_5()
.fill(theme.middle.negative.default.foreground)
.group_hover("")
.fill(theme.middle.positive.default.foreground)
.hover()
.fill(theme.middle.variant.default.foreground),
.group_hover("", |style| {
style.fill(theme.middle.positive.default.foreground)
})
.hover(|style| style.fill(theme.middle.variant.default.foreground)),
),
)
}