Commit graph

1,792 commits

Author SHA1 Message Date
Admin
d50d15f16b protocol 2026-03-20 09:42:35 +01:00
Admin
2cff94d01b fix android screencap to studio 2026-03-20 09:03:50 +01:00
Kevin Boos
be1229492d
Restore optional serde derives that were removed in Makepad 2.0 (#973) 2026-03-19 20:07:45 +01:00
Kevin Boos
7e51266f5b
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
7134504e82
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
785b823751 fix android screencap to studio 2026-03-19 13:59:42 +01:00
Admin
840b8b5cb3 fix android screencap to studio 2026-03-19 13:57:55 +01:00
Admin
2914c74b79 fix studio 2026-03-19 12:42:27 +01:00
Admin
d5e73849a5 fix studio 2026-03-19 11:54:38 +01:00
Admin
02411768e1 fix studio 2026-03-19 11:42:20 +01:00
Admin
23e1973ac9 fix studio 2026-03-19 11:24:51 +01:00
Admin
bb24dbd50a studio ws fix 2026-03-19 10:42:55 +01:00
Admin
5a4bef21d6 cleanup 2026-03-19 10:16:38 +01:00
Admin
4c7b806524 helmet with real envmap 2026-03-18 01:29:59 +01:00
Admin
6cd202a553 remove dep 2026-03-18 01:02:57 +01:00
Admin
52afaf022b remove dep 2026-03-18 00:06:32 +01:00
Admin
1a0f01ce89 vulkan debugging 2026-03-17 23:59:07 +01:00
offline-ant
1fe83a5c6c
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
987f21bea4 cef 2026-03-17 19:00:28 +01:00
Admin
3803e091de vulkan video textures 2026-03-17 19:00:28 +01:00
Admin
efb38f2f89 vulkan video textures 2026-03-17 19:00:28 +01:00
Admin
91f0873847 vulkan video textures 2026-03-17 19:00:28 +01:00
Admin
72269c0da2 not bad 2026-03-17 19:00:28 +01:00
Admin
543ae72c34 not bad 2026-03-17 19:00:28 +01:00
Admin
c3585c7b98 not bad 2026-03-17 19:00:28 +01:00
Admin
a7c5942177 ok planes 2026-03-17 19:00:28 +01:00
Admin
a8f5877687 quite good 2026-03-17 19:00:28 +01:00
Admin
36a1a6b62a almost good 2026-03-17 19:00:28 +01:00
Admin
49750e5d54 almost good 2026-03-17 19:00:27 +01:00
Admin
c1cee9c216 almost 2026-03-17 19:00:27 +01:00
Admin
debd9f33ed almost 2026-03-17 19:00:27 +01:00
Admin
a2a3347144 whoa 2026-03-17 19:00:27 +01:00
Admin
c3ad851992 almost reasonable 2026-03-17 19:00:27 +01:00
Kevin Boos
94711aa64b
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
a9fe1a8090
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
1cf51b3261 fix 2026-03-16 16:13:48 +01:00
Sabin Regmi
2b79d27b44
fix macos, ios and wasm compilation (#957) 2026-03-16 15:18:33 +01:00
Admin
53fa2aa86b it compiles 2026-03-15 16:06:36 +01:00
Admin
6658d6515f slow voxels 2026-03-15 15:36:30 +01:00
Admin
b070eb7477 bricks 2026-03-15 13:35:58 +01:00
Admin
64b1a7c74b vulkan back 2026-03-15 13:20:49 +01:00
Admin
92e751ffde rapier vendored 2026-03-15 09:52:45 +01:00
Admin
da93a47467 physics 2026-03-15 09:52:45 +01:00
Admin
8ee34e0e84 otw 2026-03-15 09:52:45 +01:00
Admin
057035243b works again 2026-03-15 09:52:44 +01:00
Admin
0525556ceb works again! 2026-03-15 09:52:44 +01:00
Admin
3e3f4fd2e0 zbuf back 2026-03-15 09:52:44 +01:00
Admin
4db21794fe fixup 2026-03-15 08:49:21 +01:00
Jason Yau
f4279de855
Fix windows build errors again (#953)
* regenerate windows-rs to export D3D11_DEPTH_WRITE_MASK_ZERO constant

* fix build errors

---------

Co-authored-by: jasonqiu <jasonqiuchen@outlook.com>
2026-03-14 15:26:55 +01:00
Sabin Regmi
51f23402b5
Expose WEB URL and Location Handling (#941)
* Add web URL/location and history handling

Sync browser location and history with the WASM app on the Web platform.

- Cx API: add default CxOsApi methods browser_update_url and browser_history_go and Cx wrappers to call them.
- Web/WASM IPC: add ToWasmLocationChange, FromWasmBrowserUpdateUrl, FromWasmBrowserHistoryGo structs for message passing and register them in init.
- Web JS: emit_location_change on popstate, and implement FromWasmBrowserUpdateUrl and FromWasmBrowserHistoryGo to update history (push/replace/back/forward/go).
- Cx web runtime: add normalize_web_pathname, split_web_location and update_web_location_state helpers; handle incoming ToWasmLocationChange to update internal state and signal events; implement browser_update_url and browser_history_go to forward requests to JS and update internal location state.

These changes enable SPA-style URL updates, history navigation, and app-side reactions to browser location changes while avoiding redundant updates.

* Handle hashchange and improve URL parsing

Add a window "hashchange" listener to emit location changes and trigger the wasm pump so fragment navigation updates are handled. Update FromWasmBrowserUpdateUrl to construct URLs relative to the current full location (window.location.href) so fragment- and relative-only updates resolve correctly. Tighten split_web_location parsing to treat '/', '?', and '#' as path delimiters after a scheme, ensuring queries and fragments are detected when extracting the path.

* fix wasm run without --release

* LTO off in small profile
2026-03-14 12:13:28 +01:00