Merge pull request #620 from git-f0x/master
[Context Menu] Use radius from theme
This commit is contained in:
commit
9e77c2244d
2 changed files with 5 additions and 11 deletions
|
|
@ -295,14 +295,14 @@ pub fn context_menu<'a>(
|
||||||
text_color: Some(component.on.into()),
|
text_color: Some(component.on.into()),
|
||||||
background: Some(Background::Color(component.base.into())),
|
background: Some(Background::Color(component.base.into())),
|
||||||
border: Border {
|
border: Border {
|
||||||
radius: 8.0.into(),
|
radius: cosmic.radius_s().into(),
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
color: component.divider.into(),
|
color: component.divider.into(),
|
||||||
},
|
},
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.width(Length::Fixed(260.0))
|
.width(Length::Fixed(280.0))
|
||||||
.into()
|
.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -645,7 +645,7 @@ pub fn location_context_menu<'a>(ancestor_index: usize) -> Element<'a, tab::Mess
|
||||||
text_color: Some(component.on.into()),
|
text_color: Some(component.on.into()),
|
||||||
background: Some(Background::Color(component.base.into())),
|
background: Some(Background::Color(component.base.into())),
|
||||||
border: Border {
|
border: Border {
|
||||||
radius: 8.0.into(),
|
radius: cosmic.radius_s().into(),
|
||||||
width: 1.0,
|
width: 1.0,
|
||||||
color: component.divider.into(),
|
color: component.divider.into(),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
10
src/tab.rs
10
src/tab.rs
|
|
@ -3078,10 +3078,7 @@ impl Tab {
|
||||||
//TODO: use widget::image::viewer, when its zoom can be reset
|
//TODO: use widget::image::viewer, when its zoom can be reset
|
||||||
widget::image(widget::image::Handle::from_path(path)),
|
widget::image(widget::image::Handle::from_path(path)),
|
||||||
)
|
)
|
||||||
.align_x(Alignment::Center)
|
.center(Length::Fill)
|
||||||
.align_y(Alignment::Center)
|
|
||||||
.width(Length::Fill)
|
|
||||||
.height(Length::Fill)
|
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3090,10 +3087,7 @@ impl Tab {
|
||||||
//TODO: use widget::image::viewer, when its zoom can be reset
|
//TODO: use widget::image::viewer, when its zoom can be reset
|
||||||
widget::image(handle.clone()),
|
widget::image(handle.clone()),
|
||||||
)
|
)
|
||||||
.align_x(Alignment::Center)
|
.center(Length::Fill)
|
||||||
.align_y(Alignment::Center)
|
|
||||||
.width(Length::Fill)
|
|
||||||
.height(Length::Fill)
|
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue