Add style leader selection container
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
9b92a8e3fe
commit
dbe5b0205c
3 changed files with 22 additions and 4 deletions
|
@ -644,8 +644,8 @@ impl CollabTitlebarItem {
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
if let Some(replica_id) = replica_id {
|
if let Some(replica_id) = replica_id {
|
||||||
if followed_by_self {
|
if followed_by_self {
|
||||||
let selection = dbg!(theme.editor.replica_selection_style(replica_id).selection);
|
let selection = theme.editor.replica_selection_style(replica_id).selection;
|
||||||
background_color = dbg!(Color::blend(selection, background_color));
|
background_color = Color::blend(selection, background_color);
|
||||||
background_color.a = 255;
|
background_color.a = 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -692,14 +692,18 @@ impl CollabTitlebarItem {
|
||||||
.flatten(),
|
.flatten(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let mut container = face_pile
|
||||||
|
.contained()
|
||||||
|
.with_style(theme.workspace.titlebar.leader_selection);
|
||||||
|
|
||||||
if let Some(replica_id) = replica_id {
|
if let Some(replica_id) = replica_id {
|
||||||
if followed_by_self {
|
if followed_by_self {
|
||||||
let color = theme.editor.replica_selection_style(replica_id).selection;
|
let color = theme.editor.replica_selection_style(replica_id).selection;
|
||||||
return face_pile.contained().with_background_color(color).boxed();
|
container = container.with_background_color(color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
face_pile.boxed()
|
container.boxed()
|
||||||
}))
|
}))
|
||||||
.with_children((|| {
|
.with_children((|| {
|
||||||
let replica_id = replica_id?;
|
let replica_id = replica_id?;
|
||||||
|
|
|
@ -77,6 +77,7 @@ pub struct Titlebar {
|
||||||
pub avatar_margin: f32,
|
pub avatar_margin: f32,
|
||||||
pub avatar_ribbon: AvatarRibbon,
|
pub avatar_ribbon: AvatarRibbon,
|
||||||
pub follower_avatar_overlap: f32,
|
pub follower_avatar_overlap: f32,
|
||||||
|
pub leader_selection: ContainerStyle,
|
||||||
pub offline_icon: OfflineIcon,
|
pub offline_icon: OfflineIcon,
|
||||||
pub avatar: AvatarStyle,
|
pub avatar: AvatarStyle,
|
||||||
pub inactive_avatar: AvatarStyle,
|
pub inactive_avatar: AvatarStyle,
|
||||||
|
|
|
@ -116,6 +116,19 @@ export default function workspace(colorScheme: ColorScheme) {
|
||||||
outerCornerRadius: followerAvatarOuterWidth / 2,
|
outerCornerRadius: followerAvatarOuterWidth / 2,
|
||||||
},
|
},
|
||||||
followerAvatarOverlap: 8,
|
followerAvatarOverlap: 8,
|
||||||
|
leaderSelection: {
|
||||||
|
margin: {
|
||||||
|
top: 4,
|
||||||
|
bottom: 4,
|
||||||
|
},
|
||||||
|
padding: {
|
||||||
|
left: 2,
|
||||||
|
right: 2,
|
||||||
|
top: 4,
|
||||||
|
bottom: 4,
|
||||||
|
},
|
||||||
|
cornerRadius: 6,
|
||||||
|
},
|
||||||
avatarRibbon: {
|
avatarRibbon: {
|
||||||
height: 3,
|
height: 3,
|
||||||
width: 12,
|
width: 12,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue