chore: frosted glass

This commit is contained in:
Ashley Wulber 2026-07-06 09:29:59 -04:00
parent dfcef22632
commit 171de79535
4 changed files with 143 additions and 102 deletions

View file

@ -121,7 +121,8 @@ pub fn context_menu<'a>(
entity: segmented_button::Entity,
) -> Element<'a, Message> {
fn key_style(theme: &cosmic::Theme) -> TextStyle {
let mut color = theme.cosmic().background.component.on;
// TODO use wayland popups
let mut color = theme.cosmic().background(false).component.on;
color.alpha *= 0.75;
TextStyle {
color: Some(color.into()),
@ -147,20 +148,22 @@ pub fn context_menu<'a>(
.on_press(Message::TabContextAction(entity, menu_action))
};
widget::container(column!(
menu_item(fl!("undo"), Action::Undo),
menu_item(fl!("redo"), Action::Redo),
divider::horizontal::light(),
menu_item(fl!("cut"), Action::Cut),
menu_item(fl!("copy"), Action::Copy),
menu_item(fl!("paste"), Action::Paste),
menu_item(fl!("select-all"), Action::SelectAll),
))
widget::container(
cosmic::widget::menu::menu_column::MenuColumn::with_children([
menu_item(fl!("undo"), Action::Undo).into(),
menu_item(fl!("redo"), Action::Redo).into(),
divider::horizontal::light().into(),
menu_item(fl!("cut"), Action::Cut).into(),
menu_item(fl!("copy"), Action::Copy).into(),
menu_item(fl!("paste"), Action::Paste).into(),
menu_item(fl!("select-all"), Action::SelectAll).into(),
]),
)
.padding(1)
//TODO: move style to libcosmic
.style(|theme| {
let cosmic = theme.cosmic();
let component = &cosmic.background.component;
let component = &cosmic.background(false).component;
widget::container::Style {
icon_color: Some(component.on.into()),
text_color: Some(component.on.into()),