forked from 1b-agent/opencadstudio-upstream
Merge pull request #1672 from MarcelP102/fixes-for-right-click-menu
[UX] Context menu: trailing check mark, faded icons on disabled rows
This commit is contained in:
commit
9fe290e875
2 files changed
+23
-11
No files matched your search
+5
-2
@@ -509,13 +509,16 @@ pub fn themed_secondary<'a, M: 'a>(bytes: &'static [u8], size: f32) -> Element<'
|
||||
.into()
|
||||
}
|
||||
|
||||
/// Render disabled chrome with the active Iced theme's text color.
|
||||
/// Render disabled chrome with the active Iced theme's text color, faded
|
||||
/// like disabled text. The fade goes through the widget's opacity: an SVG
|
||||
/// tint only replaces RGB, so alpha on the style colour would be ignored.
|
||||
pub fn themed_disabled<'a, M: 'a>(bytes: &'static [u8], size: f32) -> Element<'a, M> {
|
||||
svg(themed_handle(bytes))
|
||||
.width(size)
|
||||
.height(size)
|
||||
.opacity(0.42_f32)
|
||||
.style(|theme: &Theme, _| svg::Style {
|
||||
color: Some(theme.palette().background.base.text.scale_alpha(0.42)),
|
||||
color: Some(theme.palette().background.base.text),
|
||||
})
|
||||
.into()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user