diff --git a/crates/bevy_image/Cargo.toml b/crates/bevy_image/Cargo.toml index 3583b21a79..fc418280e5 100644 --- a/crates/bevy_image/Cargo.toml +++ b/crates/bevy_image/Cargo.toml @@ -49,7 +49,7 @@ image = { version = "0.25.2", default-features = false } # misc bitflags = { version = "2.3", features = ["serde"] } bytemuck = { version = "1.5" } -wgpu = { version = "23", default-features = false } +wgpu = { version = "23.0.1", default-features = false } serde = { version = "1", features = ["derive"] } derive_more = { version = "1", default-features = false, features = [ "error", diff --git a/crates/bevy_mesh/Cargo.toml b/crates/bevy_mesh/Cargo.toml index fd00c8d041..9db8fde8b8 100644 --- a/crates/bevy_mesh/Cargo.toml +++ b/crates/bevy_mesh/Cargo.toml @@ -24,7 +24,7 @@ bevy_utils = { path = "../bevy_utils", version = "0.15.0-dev" } # misc bitflags = { version = "2.3", features = ["serde"] } bytemuck = { version = "1.5" } -wgpu = { version = "23", default-features = false } +wgpu = { version = "23.0.1", default-features = false } serde = { version = "1", features = ["derive"] } hexasphere = "15.0" derive_more = { version = "1", default-features = false, features = [ diff --git a/crates/bevy_render/Cargo.toml b/crates/bevy_render/Cargo.toml index 8c1ec9b58d..8a28253c5e 100644 --- a/crates/bevy_render/Cargo.toml +++ b/crates/bevy_render/Cargo.toml @@ -68,7 +68,7 @@ codespan-reporting = "0.11.0" # It is enabled for now to avoid having to do a significant overhaul of the renderer just for wasm. # When the 'atomics' feature is enabled `fragile-send-sync-non-atomic` does nothing # and Bevy instead wraps `wgpu` types to verify they are not used off their origin thread. -wgpu = { version = "23", default-features = false, features = [ +wgpu = { version = "23.0.1", default-features = false, features = [ "wgsl", "dx12", "metal", diff --git a/crates/bevy_text/src/pipeline.rs b/crates/bevy_text/src/pipeline.rs index 92b5cd902e..f8e7274ef3 100644 --- a/crates/bevy_text/src/pipeline.rs +++ b/crates/bevy_text/src/pipeline.rs @@ -107,6 +107,12 @@ impl TextPipeline { computed.entities.clear(); for (span_index, (entity, depth, span, text_font, color)) in text_spans.enumerate() { + // Save this span entity in the computed text block. + computed.entities.push(TextEntity { entity, depth }); + + if span.is_empty() { + continue; + } // Return early if a font is not loaded yet. if !fonts.contains(text_font.font.id()) { spans.clear(); @@ -122,9 +128,6 @@ impl TextPipeline { return Err(TextError::NoSuchFont); } - // Save this span entity in the computed text block. - computed.entities.push(TextEntity { entity, depth }); - // Get max font size for use in cosmic Metrics. font_size = font_size.max(text_font.font_size); diff --git a/crates/bevy_ui/src/focus.rs b/crates/bevy_ui/src/focus.rs index a2eb37ee31..cc1d68526a 100644 --- a/crates/bevy_ui/src/focus.rs +++ b/crates/bevy_ui/src/focus.rs @@ -197,16 +197,19 @@ pub fn ui_focus_system( else { return None; }; + let window = windows.get(window_ref.entity()).ok()?; let viewport_position = camera .physical_viewport_rect() .map(|rect| rect.min.as_vec2()) .unwrap_or_default(); - windows - .get(window_ref.entity()) - .ok() - .and_then(Window::physical_cursor_position) - .or_else(|| touches_input.first_pressed_position()) + window + .physical_cursor_position() + .or_else(|| { + touches_input + .first_pressed_position() + .map(|pos| pos * window.scale_factor()) + }) .map(|cursor_position| (entity, cursor_position - viewport_position)) }) .collect(); diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs index 4a867b90ff..704b1d0b03 100644 --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -2191,10 +2191,10 @@ impl BorderRadius { bottom_left: f32, ) -> Self { Self { - top_left: Val::Px(top_left), - top_right: Val::Px(top_right), - bottom_right: Val::Px(bottom_right), - bottom_left: Val::Px(bottom_left), + top_left: Val::Percent(top_left), + top_right: Val::Percent(top_right), + bottom_right: Val::Percent(bottom_right), + bottom_left: Val::Percent(bottom_left), } }