status-area: Use .svg from IconThemePath if present
This commit is contained in:
parent
d04314957b
commit
08c7157555
1 changed files with 5 additions and 1 deletions
|
|
@ -529,7 +529,11 @@ fn menu_icon_button<'a>(
|
||||||
(_, name, Some(theme_path)) if name != "" => {
|
(_, name, Some(theme_path)) if name != "" => {
|
||||||
let mut path = theme_path.to_owned();
|
let mut path = theme_path.to_owned();
|
||||||
// XXX right way to lookup icon in dir?
|
// XXX right way to lookup icon in dir?
|
||||||
path.push(name.to_owned() + ".png");
|
path.push(name.to_owned() + ".svg");
|
||||||
|
if !path.exists() {
|
||||||
|
path.pop();
|
||||||
|
path.push(name.to_owned() + ".png");
|
||||||
|
}
|
||||||
let icon = cosmic::widget::icon::from_path(path).symbolic(true);
|
let icon = cosmic::widget::icon::from_path(path).symbolic(true);
|
||||||
applet.icon_button_from_handle(icon)
|
applet.icon_button_from_handle(icon)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue