Commit graph

2,205 commits

Author SHA1 Message Date
Admin
6d38bc52be compiles 2026-03-23 12:56:39 +01:00
Admin
eb0620d3cf no drawdepth 2026-03-23 10:23:17 +01:00
Admin
a169260390 cleanup 2026-03-23 10:12:37 +01:00
Admin
8a13941776 android borked 2026-03-22 17:28:18 +01:00
Admin
dd9c79d21d tree 2026-03-22 13:39:01 +01:00
Admin
111e20b7b2 cleanup xr 2026-03-22 12:24:04 +01:00
Admin
e5e3ddbdec fix xr lib 2026-03-21 15:24:19 +01:00
Admin
b2b31cce5b demo 2026-03-21 11:39:27 +01:00
Sabin Regmi
0ef3e2d9ee Some small web nits from my crazy experiement (#972)
* Schedule loader removal after presented frame

Introduce loader_after_presented_frame_id and add schedule/cancel helpers to remove the canvas loader after a presented animation frame. Cancel any pending requestAnimationFrame when the loader is removed or conditions change, and update update_startup_loader to use the new scheduling logic (remove loader only after seen animation frame and quiet frames threshold). This prevents premature removal and visual glitches while preserving the existing fallback timer.

* small fonts should be used when --profile=small

* dont include large fonts on small profile + fix compress serving

* Refactor window initialization and caption sync

Extract sync_caption_bar_state and sync_caption_title from ensure_initialized and call them before the initialized early-return so caption bar state and title are kept in sync even when the widget is re-applied. ensure_initialized still performs the original one-time setup (pass, depth texture, demo frame), but runtime chrome (VR button and caption visibility/title) is now updated up-front to avoid stale UI state.

* fix --bindgen

* Set imports.env in wasm import patches

Add additional string replacements to ensure imports.env = env is injected into generated JS for different formatting variants of the __wbg_get_imports(...) call. This makes the patch robust to variations like missing const or spacing so the env object is always attached to the wasm imports.

* Revert "Set imports.env in wasm import patches"

This reverts commit 37933234d36b4ee867690cf167474638e81febf7.

* Revert "fix --bindgen"

This reverts commit cb236b202b92a46eda3cb1ee4c678bdf6507081a.

* Reapply "fix --bindgen"

This reverts commit 27df4175bd1889222b928ffb68213aa865d1c839.

* Reapply "Set imports.env in wasm import patches"

This reverts commit 23695b4fa646d8f1b7a31a3fc27eb92f5bce0cf8.

* fix xr compilation error
2026-03-21 11:23:16 +01:00
Kevin Boos
d1cfc5cf2b Fix windows build: add missing constants in vendored windows-rs bindings (#975)
* Fix windows build: add missing constants in vendored windows-rs bindings

* fix more build errors and warnings in windows-rs vendored copy
2026-03-21 11:22:27 +01:00
Kevin Boos
cc764ba3b8 Fix svg draw shaders (#976)
* Fix windows build: add missing constants in vendored windows-rs bindings

* fix more build errors and warnings in windows-rs vendored copy

* Fix SVG parsing and vector drawing
2026-03-21 11:22:02 +01:00
Kevin Boos
4e9cff4f6e cargo makepad: fix android SDK installation (unzip step) on linux (#977)
* Fix windows build: add missing constants in vendored windows-rs bindings

* fix more build errors and warnings in windows-rs vendored copy

* Fix SVG parsing and vector drawing

* Fix erroneous unzip glob pattern that doesn't work on normal linux

* try another approach: unzip everything, cp needed dirs
2026-03-21 11:21:52 +01:00
Admin
c29f03f00a protocol 2026-03-20 10:09:40 +01:00
Admin
2537b8caab protocol 2026-03-20 09:42:35 +01:00
Admin
0b4ee8860d fix android screencap to studio 2026-03-20 09:03:50 +01:00
Kevin Boos
3a263956c8 Restore optional serde derives that were removed in Makepad 2.0 (#973) 2026-03-19 20:07:45 +01:00
Kevin Boos
95090bbc0a Ensure that the Html <br> tag obeys current line spacing settings (#971)
Without this, Html blocks that have both `<br>` and `\n` newlines
(or even just soft line wraps) look quite janky, with poor vertical spacing.
2026-03-19 20:07:28 +01:00
Kevin Boos
9977202cfa Fixed several issue in text drawing, layout, and text flow. (#970)
These are needed to support better formatting of Html code
that mixes multiple different styles together, e.g., inline code
next to normal code, or inline code within a blockquote or a heading.

Full summary of changes:

**File:** `draw/src/shader/draw_text.rs`

Added `#[live(0.0)] pub top_drop: f32` to `TextStyle`. This is a vertical offset expressed as a fraction of font size — positive values shift text downward. It's useful for aligning baselines when mixing fonts with different vertical metrics (e.g., a code font rendered inline with regular text).

**File:** `draw/src/shader/draw_text.rs`

When `temp_y_shift != 0`, the extra shift pixels are now added to `allocate_height()` and the emitted walk rect. This prevents containers (blockquotes, etc.) from clipping the descenders (g, p, q, y) of vertically-shifted text.

**File:** `widgets/src/text_flow.rs`

After selecting the appropriate text style (normal/bold/italic/fixed), `draw_text.temp_y_shift` is now set from that style's `top_drop` value. This allows each style variant to specify its own vertical offset, since `TextFlow` uses a single shared `DrawText` instance for all text rendering.

**File:** `draw/src/turtle.rs`

New public method to mutate `layout.padding.left` after a turtle has been created.

**File:** `widgets/src/text_flow.rs`

After drawing the bullet/number marker, the actual cursor position is now measured and `set_padding_left()` is called so that wrapped continuation lines align with the text after the marker, rather than being over-indented by the estimated `font_based_padding` (which was `2.5 * font_size`).

Additionally, the hardcoded `draw_text(cx, " ")` spacer after the marker was replaced with `walk_margin(cx, self.list_item_marker_pad)` for precise pixel-based control.

**File:** `widgets/src/text_flow.rs`

Added `#[live(5.0)] list_item_marker_pad: f64` — a configurable spacing (in pixels) between the list item marker (bullet/number) and the content text that follows it.
2026-03-19 20:07:13 +01:00
Admin
3a1edd3db1 fix android screencap to studio 2026-03-19 13:59:42 +01:00
Admin
378459462c fix android screencap to studio 2026-03-19 13:57:55 +01:00
Admin
df389d7c5e fix studio 2026-03-19 12:42:27 +01:00
Admin
54249f1958 fix studio 2026-03-19 11:54:38 +01:00
Admin
c1900f6e50 fix studio 2026-03-19 11:42:20 +01:00
Admin
42df96331a fix studio 2026-03-19 11:24:51 +01:00
Admin
7b5f7a177f studio ws fix 2026-03-19 10:42:55 +01:00
Admin
9f445a6c69 cleanup 2026-03-19 10:16:38 +01:00
Admin
059f8a123c helmet with real envmap 2026-03-18 01:29:59 +01:00
Admin
8393979f7b remove dep 2026-03-18 01:02:57 +01:00
Admin
c8b0a7ad4b remove dep 2026-03-18 00:06:32 +01:00
Admin
99bd8d38d4 vulkan debugging 2026-03-17 23:59:07 +01:00
offline-ant
bcd5675051 Fix Mat4f::mul to compute a*b instead of b*a (#966)
Mat4f::mul(a, b) was computing b*a due to transposed summation
indices in the multiplication loop. All call sites (glTF TRS
composition, view-projection, MVP chains, scene hierarchy) are
written expecting standard a*b order, and transform_vec4 uses
standard column-major M*v convention.

Fix: swap the operand bindings so the existing index pattern
produces the correct a*b result.

Add regression test mat4_mul_order that verifies:
- Scale(2)*Translate(5,7) yields tx=10 (scaled translation)
- transform_vec4 on result*(1,1,0,1) yields (12,16)

Co-authored-by: ant <ant@offline.click>
2026-03-17 19:43:02 +01:00
Admin
62a7fd33f4 cef 2026-03-17 19:00:28 +01:00
Admin
c4064cef6a vulkan video textures 2026-03-17 19:00:28 +01:00
Admin
41f0384a4b vulkan video textures 2026-03-17 19:00:28 +01:00
Admin
1a24696c26 vulkan video textures 2026-03-17 19:00:28 +01:00
Admin
29ade80a88 not bad 2026-03-17 19:00:28 +01:00
Admin
b49be22327 not bad 2026-03-17 19:00:28 +01:00
Admin
1205742c3b not bad 2026-03-17 19:00:28 +01:00
Admin
3bc77d8762 ok planes 2026-03-17 19:00:28 +01:00
Admin
5e96227402 quite good 2026-03-17 19:00:28 +01:00
Admin
baecc7ba3c almost good 2026-03-17 19:00:28 +01:00
Admin
5a3b938960 almost good 2026-03-17 19:00:27 +01:00
Admin
08cd456e7a almost 2026-03-17 19:00:27 +01:00
Admin
d84922d225 almost 2026-03-17 19:00:27 +01:00
Admin
a0c8bbd18d whoa 2026-03-17 19:00:27 +01:00
Admin
45c277dc59 almost reasonable 2026-03-17 19:00:27 +01:00
Kevin Boos
7ae0178c8d fix SVG handling to support SVG files with fill "none" (#961)
Also fix splash example icon paths
2026-03-16 20:44:17 +01:00
Kevin Boos
b376a3c447 Proper widget tree fix (#956)
* Fix macos platform build failures related to PR#946

* Properly fix the new breadth-first widget tree lookup
2026-03-16 19:27:32 +01:00
Admin
a67822f5f0 fix 2026-03-16 16:13:48 +01:00
Sabin Regmi
2c0410327c fix macos, ios and wasm compilation (#957) 2026-03-16 15:18:33 +01:00