Tighten up project share notifications
This commit is contained in:
parent
9a06b7e77d
commit
7b51f73826
1 changed files with 24 additions and 26 deletions
|
@ -23,7 +23,7 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut AppContext) {
|
||||||
} => {
|
} => {
|
||||||
let window_size = Size {
|
let window_size = Size {
|
||||||
width: px(400.),
|
width: px(400.),
|
||||||
height: px(96.),
|
height: px(72.),
|
||||||
};
|
};
|
||||||
|
|
||||||
for screen in cx.displays() {
|
for screen in cx.displays() {
|
||||||
|
@ -139,35 +139,33 @@ impl Render for ProjectSharedNotification {
|
||||||
.text_ui()
|
.text_ui()
|
||||||
.justify_between()
|
.justify_between()
|
||||||
.size_full()
|
.size_full()
|
||||||
|
.overflow_hidden()
|
||||||
.elevation_3(cx)
|
.elevation_3(cx)
|
||||||
.p_2()
|
.p_2()
|
||||||
.gap_2()
|
.gap_2()
|
||||||
.child(
|
.child(
|
||||||
h_stack()
|
img(self.owner.avatar_uri.clone())
|
||||||
.gap_2()
|
.w_12()
|
||||||
.child(
|
.h_12()
|
||||||
img(self.owner.avatar_uri.clone())
|
.rounded_full(),
|
||||||
.w_16()
|
)
|
||||||
.h_16()
|
.child(
|
||||||
.rounded_full(),
|
v_stack()
|
||||||
)
|
.overflow_hidden()
|
||||||
.child(
|
.child(Label::new(self.owner.github_login.clone()))
|
||||||
v_stack()
|
.child(Label::new(format!(
|
||||||
.child(Label::new(self.owner.github_login.clone()))
|
"is sharing a project in Zed{}",
|
||||||
.child(Label::new(format!(
|
if self.worktree_root_names.is_empty() {
|
||||||
"is sharing a project in Zed{}",
|
""
|
||||||
if self.worktree_root_names.is_empty() {
|
} else {
|
||||||
""
|
":"
|
||||||
} else {
|
}
|
||||||
":"
|
)))
|
||||||
}
|
.children(if self.worktree_root_names.is_empty() {
|
||||||
)))
|
None
|
||||||
.children(if self.worktree_root_names.is_empty() {
|
} else {
|
||||||
None
|
Some(Label::new(self.worktree_root_names.join(", ")))
|
||||||
} else {
|
}),
|
||||||
Some(Label::new(self.worktree_root_names.join(", ")))
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
v_stack()
|
v_stack()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue