Skip to content

Commit

Permalink
Merge branch 'main' into nine-patch-improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
StarArawn committed Mar 24, 2024
2 parents 2dfb514 + 25f9ece commit ba96ad3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 4 additions & 2 deletions kayak_font/src/ttf/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions src/render/svg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub fn extract_svg_asset(
changed_assets.remove(id);
render_assets.remove(id);
}
_ => {}
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/widgets/accordion/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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}
Expand All @@ -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()
}}
>
Expand All @@ -117,7 +117,7 @@ pub fn render(
<KSvgBundle
styles={KStyle {
background_color: Color::WHITE.into(),
cursor: KCursorIcon(CursorIcon::Hand).into(),
cursor: KCursorIcon(CursorIcon::Pointer).into(),
width: Units::Pixels(35.0).into(),
height: Units::Pixels(30.0).into(),
top: Units::Pixels(-10.0).into(),
Expand All @@ -131,7 +131,7 @@ pub fn render(
<KSvgBundle
styles={KStyle {
background_color: Color::WHITE.into(),
cursor: KCursorIcon(CursorIcon::Hand).into(),
cursor: KCursorIcon(CursorIcon::Pointer).into(),
width: Units::Pixels(35.0).into(),
height: Units::Pixels(30.0).into(),
top: Units::Pixels(-10.0).into(),
Expand Down

0 comments on commit ba96ad3

Please sign in to comment.