Merge remote-tracking branch 'upstream/master' into local/yoda-main
# Conflicts: # Cargo.lock # Cargo.toml # src/main.rs # src/menu.rs # src/terminal.rs # src/terminal_box.rs
This commit is contained in:
commit
eda2fb1d58
38 changed files with 1406 additions and 1292 deletions
13
src/menu.rs
13
src/menu.rs
|
|
@ -3,7 +3,7 @@
|
|||
use cosmic::iced::Point;
|
||||
use cosmic::widget::menu::key_bind::KeyBind;
|
||||
use cosmic::widget::menu::{Item as MenuItem, menu_button};
|
||||
use cosmic::widget::{Column, space};
|
||||
use cosmic::widget::space;
|
||||
use cosmic::{
|
||||
Element,
|
||||
app::Core,
|
||||
|
|
@ -46,7 +46,7 @@ pub fn context_menu<'a>(
|
|||
String::new()
|
||||
};
|
||||
fn key_style(theme: &cosmic::Theme) -> TextStyle {
|
||||
let mut color = theme.cosmic().background(false).component.on;
|
||||
let mut color = theme.cosmic().background(theme.transparent).component.on;
|
||||
color.alpha *= 0.75;
|
||||
TextStyle {
|
||||
color: Some(color.into()),
|
||||
|
|
@ -143,13 +143,13 @@ pub fn context_menu<'a>(
|
|||
);
|
||||
rows.insert(2, Element::from(divider::horizontal::light()));
|
||||
}
|
||||
let content = Column::with_children(rows);
|
||||
let content = widget::menu::menu_column::MenuColumn::with_children(rows);
|
||||
widget::container(content)
|
||||
.padding(1)
|
||||
//TODO: move style to libcosmic
|
||||
.style(|theme| {
|
||||
let cosmic = theme.cosmic();
|
||||
let component = &cosmic.background(false).component;
|
||||
let component = &cosmic.background(theme.transparent).component;
|
||||
widget::container::Style {
|
||||
icon_color: Some(component.on.into()),
|
||||
text_color: Some(component.on.into()),
|
||||
|
|
@ -174,7 +174,8 @@ pub fn color_scheme_menu<'a>(
|
|||
let menu_item =
|
||||
|label, message| menu_button(vec![widget::text(label).into()]).on_press(message);
|
||||
|
||||
let mut column = widget::column::with_capacity(if id_opt.is_some() { 3 } else { 1 });
|
||||
let mut column =
|
||||
widget::menu::menu_column::MenuColumn::with_capacity(if id_opt.is_some() { 3 } else { 1 });
|
||||
if let Some(id) = id_opt {
|
||||
column = column.push(menu_item(
|
||||
fl!("rename"),
|
||||
|
|
@ -197,7 +198,7 @@ pub fn color_scheme_menu<'a>(
|
|||
//TODO: move style to libcosmic
|
||||
.style(|theme| {
|
||||
let cosmic = theme.cosmic();
|
||||
let component = &cosmic.background(false).component;
|
||||
let component = &cosmic.background(theme.transparent).component;
|
||||
widget::container::Style {
|
||||
icon_color: Some(component.on.into()),
|
||||
text_color: Some(component.on.into()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue