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:
Danilo Leal 2025-05-08 14:19:51 -03:00 committed by GitHub
parent dc01aef0cf
commit 7fb52ddf32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -423,7 +423,8 @@ impl InlineCompletionButton {
if let Some(usage) = usage {
menu = menu.header("Usage");
menu = menu.custom_entry(
menu = menu
.custom_entry(
move |_window, cx| {
let used_percentage = match usage.limit {
UsageLimit::Limited(limit) => {
@ -436,8 +437,9 @@ impl InlineCompletionButton {
.flex_1()
.gap_1p5()
.children(
used_percentage
.map(|percent| ProgressBar::new("usage", percent, 100., cx)),
used_percentage.map(|percent| {
ProgressBar::new("usage", percent, 100., cx)
}),
)
.child(
Label::new(match usage.limit {
@ -452,7 +454,8 @@ impl InlineCompletionButton {
.into_any_element()
},
move |_, cx| cx.open_url(&zed_urls::account_url(cx)),
);
)
.separator();
}
}