fix(dropdown): missing icon on windows
This commit is contained in:
parent
e568122083
commit
5fddddf296
2 changed files with 10 additions and 1 deletions
3
res/icons/pan-down-symbolic.svg
Normal file
3
res/icons/pan-down-symbolic.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13 6L8 11L3 6H13Z" fill="#232323"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 149 B |
|
|
@ -373,8 +373,14 @@ pub struct State {
|
|||
impl State {
|
||||
/// Creates a new [`State`] for a [`Dropdown`].
|
||||
pub fn new() -> Self {
|
||||
#[cfg(target_os = "linux")]
|
||||
let icon = icon::from_name("pan-down-symbolic").size(16).handle();
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
let icon = icon::from_svg_bytes(include_bytes!("../../../res/icons/pan-down-symbolic.svg"))
|
||||
.symbolic(true);
|
||||
|
||||
Self {
|
||||
icon: match icon::from_name("pan-down-symbolic").size(16).handle().data {
|
||||
icon: match icon.data {
|
||||
icon::Data::Name(named) => named
|
||||
.path()
|
||||
.filter(|path| path.extension().is_some_and(|ext| ext == OsStr::new("svg")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue