Add a divider below "Usage" in the Edit Prediction menu (#30284)
As it felt untidy without it. Release Notes: - N/A
This commit is contained in:
parent
dc01aef0cf
commit
7fb52ddf32
1 changed files with 32 additions and 29 deletions
|
@ -423,7 +423,8 @@ impl InlineCompletionButton {
|
||||||
|
|
||||||
if let Some(usage) = usage {
|
if let Some(usage) = usage {
|
||||||
menu = menu.header("Usage");
|
menu = menu.header("Usage");
|
||||||
menu = menu.custom_entry(
|
menu = menu
|
||||||
|
.custom_entry(
|
||||||
move |_window, cx| {
|
move |_window, cx| {
|
||||||
let used_percentage = match usage.limit {
|
let used_percentage = match usage.limit {
|
||||||
UsageLimit::Limited(limit) => {
|
UsageLimit::Limited(limit) => {
|
||||||
|
@ -436,8 +437,9 @@ impl InlineCompletionButton {
|
||||||
.flex_1()
|
.flex_1()
|
||||||
.gap_1p5()
|
.gap_1p5()
|
||||||
.children(
|
.children(
|
||||||
used_percentage
|
used_percentage.map(|percent| {
|
||||||
.map(|percent| ProgressBar::new("usage", percent, 100., cx)),
|
ProgressBar::new("usage", percent, 100., cx)
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
.child(
|
.child(
|
||||||
Label::new(match usage.limit {
|
Label::new(match usage.limit {
|
||||||
|
@ -452,7 +454,8 @@ impl InlineCompletionButton {
|
||||||
.into_any_element()
|
.into_any_element()
|
||||||
},
|
},
|
||||||
move |_, cx| cx.open_url(&zed_urls::account_url(cx)),
|
move |_, cx| cx.open_url(&zed_urls::account_url(cx)),
|
||||||
);
|
)
|
||||||
|
.separator();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue