diff --git a/Cargo.toml b/Cargo.toml index f90ffe15..100044e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,13 +14,13 @@ exclude = ["assets/*", "screenshots/*", "book"] members = ["kayak_ui_macros", "kayak_font"] [features] -svg = [] #["dep:bevy_svg"] +svg = ["dep:bevy_svg"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] bevy = { version = "0.13", default-features = false, features = ["bevy_render", "bevy_asset", "bevy_core_pipeline"] } -# bevy_svg = { version="0.12", default-features = false, optional = true } +bevy_svg = { git = "https://github.com/arnfaldur/bevy_svg", rev="53a53e5af050a7b5b236068546be46c5729674e3", default-features = false, optional = true } bitflags = "1.3.2" bytemuck = "1.12" dashmap = "5.4" diff --git a/kayak_font/src/ttf/loader.rs b/kayak_font/src/ttf/loader.rs index 1b40b063..41266a64 100644 --- a/kayak_font/src/ttf/loader.rs +++ b/kayak_font/src/ttf/loader.rs @@ -65,12 +65,14 @@ impl AssetLoader for TTFLoader { u32::from_str_radix(kttf.char_range_start.trim_start_matches("0x"), 16).unwrap(); let char_range_end = u32::from_str_radix(kttf.char_range_end.trim_start_matches("0x"), 16).unwrap(); + + let mut cache_path = std::path::PathBuf::from(load_context.path()); + cache_path.set_file_name(kttf.file.clone()); let font_bytes = load_context - .read_asset_bytes(kttf.file.clone()) + .read_asset_bytes(cache_path.clone()) .await .unwrap(); - let mut cache_path = std::path::PathBuf::from(load_context.path()); let file_name = load_context .path() .file_name() diff --git a/src/render/svg/mod.rs b/src/render/svg/mod.rs index 97f3c3c9..b0df765f 100644 --- a/src/render/svg/mod.rs +++ b/src/render/svg/mod.rs @@ -29,6 +29,7 @@ pub fn extract_svg_asset( changed_assets.remove(id); render_assets.remove(id); } + _ => {} } } diff --git a/src/widgets/accordion/summary.rs b/src/widgets/accordion/summary.rs index 70228cb9..37b6a006 100644 --- a/src/widgets/accordion/summary.rs +++ b/src/widgets/accordion/summary.rs @@ -61,7 +61,7 @@ pub fn render( .with_style(styles) .with_style(KStyle { render_command: RenderCommand::Layout.into(), - cursor: KCursorIcon(CursorIcon::Hand).into(), + cursor: KCursorIcon(CursorIcon::Pointer).into(), width: Units::Stretch(1.0).into(), height: Units::Auto.into(), ..Default::default() @@ -97,7 +97,7 @@ pub fn render( height: Units::Auto.into(), padding: Edge::new(Units::Pixels(12.0), Units::Pixels(16.0), Units::Pixels(16.0), Units::Pixels(16.0)).into(), layout_type: LayoutType::Row.into(), - cursor: KCursorIcon(CursorIcon::Hand).into(), + cursor: KCursorIcon(CursorIcon::Pointer).into(), ..Default::default() }} on_event={on_event} @@ -107,7 +107,7 @@ pub fn render( styles={KStyle { width: Units::Pixels(25.0).into(), height: Units::Pixels(20.0).into(), - cursor: KCursorIcon(CursorIcon::Hand).into(), + cursor: KCursorIcon(CursorIcon::Pointer).into(), ..Default::default() }} > @@ -117,7 +117,7 @@ pub fn render(