1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -04:00

Highlight submenu buttons when hovered and open (#3780)

Submenu buttons in menues now properly highlight when hovered and when
opened.

…plus a bunch of other cleanup
This commit is contained in:
Emil Ernerfeldt
2024-01-07 22:08:32 +01:00
committed by GitHub
parent 327f599407
commit 8c30e8c5f7
13 changed files with 62 additions and 57 deletions

View File

@@ -18,6 +18,7 @@ impl ImageCrateLoader {
}
fn is_supported_uri(uri: &str) -> bool {
// TODO(emilk): use https://github.com/image-rs/image/pull/2038 when new `image` crate is released.
let Some(ext) = Path::new(uri).extension().and_then(|ext| ext.to_str()) else {
// `true` because if there's no extension, assume that we support it
return true;
@@ -27,6 +28,7 @@ fn is_supported_uri(uri: &str) -> bool {
}
fn is_unsupported_mime(mime: &str) -> bool {
// TODO(emilk): use https://github.com/image-rs/image/pull/2038 when new `image` crate is released.
mime.contains("svg")
}