edit predictions: Improve copywriting (#24689)
This commit is contained in:
parent
f5fd3d98ad
commit
2e7a89c5e3
4 changed files with 55 additions and 31 deletions
|
@ -598,6 +598,7 @@ impl Render for ContextMenu {
|
|||
}) => {
|
||||
let handler = handler.clone();
|
||||
let menu = cx.entity().downgrade();
|
||||
|
||||
let icon_color = if *disabled {
|
||||
Color::Muted
|
||||
} else if toggle.is_some() {
|
||||
|
@ -605,16 +606,18 @@ impl Render for ContextMenu {
|
|||
} else {
|
||||
icon_color.unwrap_or(Color::Default)
|
||||
};
|
||||
|
||||
let label_color = if *disabled {
|
||||
Color::Muted
|
||||
} else {
|
||||
Color::Default
|
||||
};
|
||||
|
||||
let label_element = if let Some(icon_name) = icon {
|
||||
h_flex()
|
||||
.gap_1p5()
|
||||
.when(
|
||||
*icon_position == IconPosition::Start,
|
||||
*icon_position == IconPosition::Start && toggle.is_none(),
|
||||
|flex| {
|
||||
flex.child(
|
||||
Icon::new(*icon_name)
|
||||
|
@ -643,8 +646,10 @@ impl Render for ContextMenu {
|
|||
.color(label_color)
|
||||
.into_any_element()
|
||||
};
|
||||
|
||||
let documentation_aside_callback =
|
||||
documentation_aside.clone();
|
||||
|
||||
div()
|
||||
.id(("context-menu-child", ix))
|
||||
.when_some(
|
||||
|
@ -675,7 +680,7 @@ impl Render for ContextMenu {
|
|||
|list_item, (position, toggled)| {
|
||||
let contents =
|
||||
div().flex_none().child(
|
||||
Icon::new(IconName::Check)
|
||||
Icon::new(icon.unwrap_or(IconName::Check))
|
||||
.color(icon_color)
|
||||
.size(*icon_size)
|
||||
)
|
||||
|
@ -778,7 +783,7 @@ impl Render for ContextMenu {
|
|||
}
|
||||
}
|
||||
},
|
||||
))),
|
||||
)))
|
||||
),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue