Commit Graph
3741 Commits
Author SHA1 Message Date
Liu 172b0c1908 docs(doc-viewer): add horizontal code scrolling 2026-11-02 22:31:21 +08:00
Liu 1dc63c68ee docs(doc-viewer): scroll long code blocks with line numbers 2026-11-02 22:31:19 +08:00
Liu 8c78437264 fix(widgets): contain nested scrollarea wheel events 2026-11-02 22:31:18 +08:00
Liu 49e719995c feat(widgets): add attachment widget 2026-11-02 22:31:17 +08:00
Liu 7e5350a883 fix(widgets): bind late data dialog triggers 2026-11-02 22:31:16 +08:00
Liu 860b1f1289 feat(widgets): add card widget 2026-11-02 22:31:16 +08:00
Liu ccad5ef131 feat(widgets): add toast widget 2026-11-02 22:31:15 +08:00
Liu 47014c5dbb feat(widgets): add popover widget 2026-10-28 23:40:31 +08:00
Liu 2ac38a6ca6 feat(widgets): add tooltip widget
Add Tooltip/TooltipTrigger/TooltipContent, data-tooltip attributes, Portal placement with border arrow, C attach helpers, docs, and tests.
2026-10-28 23:40:30 +08:00
Liu 16f5e91cb8 feat(widgets): update radio-group style 2026-10-18 15:42:34 +08:00
Liu e80b997c45 feat(widgets): update field style 2026-10-18 15:42:33 +08:00
Liu ad19263271 docs: update checkbox examples 2026-10-18 15:42:33 +08:00
Liu 1e48b886a0 feat(widgets): add progress label and value 2026-10-18 15:42:32 +08:00
Liu d329b1b874 docs: fix sidebar scroll 2026-10-18 15:42:31 +08:00
Liu a7a9f72c0c docs: update style
docs: update style
2026-10-18 15:42:31 +08:00
Liu 703260e1a7 style(widgets): add cursor rule 2026-10-18 15:42:30 +08:00
Liu 0d683ba618 build: update xmake-requires.lock 2026-10-18 15:42:30 +08:00
Liu ae5fc2ea75 docs: update AGENTS.md 2026-10-18 15:42:29 +08:00
Liu 3f94b84b2b docs: add specs 2026-10-18 15:42:29 +08:00
Liu bbdb80f045 feat(styles): centralize widget styles in the nova default theme
Manage all built-in widget styles in one stylesheet. `nova` is the
default theme; further themes will be added under src/styles.
2026-10-18 15:42:28 +08:00
Liu 19f52bfd2e docs: format examples 2026-10-18 15:42:26 +08:00
Liu 323b641bbc feat(widgets): add groups, scrolling, alignment and checkmark to select 2026-10-18 15:42:25 +08:00
Liu a1078ff201 feat(widgets): add spinner and shimmer widgets 2026-10-18 15:42:23 +08:00
Liu f760db2176 fix(ui): ui_widget_render should re-anchor offscreen captures in logical units 2026-10-18 15:42:22 +08:00
Liu 8876c70f93 feat(widgets): add dialog and alert-dialog widgets 2026-10-18 15:42:21 +08:00
Liu ad0ce709ee feat(pandagl): add pd_canvas_rotate and pd_canvas_mask_composite 2026-10-18 15:42:20 +08:00
Liu 20ac4484b9 feat(widgets): add empty widget 2026-10-18 15:42:19 +08:00
Liu a805852558 feat(widgets): add item widget 2026-10-18 15:42:18 +08:00
Liu b674004673 feat(widgets): add alert widget 2026-10-17 21:16:54 +08:00
Liu 6b7a4d41de feat(widgets): add badge widget 2026-10-17 21:16:53 +08:00
Liu 7154337944 feat(widgets): add button variants, sizes and themed styles with docs 2026-10-17 21:16:51 +08:00
Liu 92b46eee10 feat(widgets): add icon widget 2026-10-17 21:16:50 +08:00
Liu de31a3bc74 feat(widgets): restyle scrollbar with a slim rounded thumb 2026-10-17 21:16:49 +08:00
Liu ee08bcf9f9 feat(fonts): load system UI/CJK fonts and register generic family aliases
Windows: also load the Segoe UI faces and Noto Sans SC (variable).

fontconfig/plain-Linux: register sans-serif/serif/monospace aliases, and guard pd_font_find_path() NULL before load.
2026-10-17 21:16:48 +08:00
Liu 218f900a58 feat(pandagl): support variable fonts and fix font fallback
Expand variable fonts into static weight instances via the wght axis so font-weight resolves to a real face.

Add pd_font_get_glyph_index and skip faces lacking a glyph during family fallback, so a missing glyph keeps falling back instead of stopping at a cached .notdef.

Fix an off-by-one in find_bolder_weight/find_lighter_weight (must index weights[weight-1]), which dereferenced NULL and crashed on sparse-weight families.

Cover these with variable-font, CJK-fallback and weight-fallback tests.
2026-10-17 21:16:48 +08:00
Liu 708611a727 feat(ui-server): sync system cursor with hovered widget style
Expose ui_get_mouseover() and, at the end of ui_server_update(), resolve
the first non-auto cursor up the hover ancestor chain (emulating CSS
inheritance), then apply it to the owning window. Runs after style
recomputation so :hover and dynamic changes take effect in the same
frame; resets to auto when the hovered widget is destroyed.
2026-10-17 21:16:47 +08:00
Liu 237a5b66f2 feat(ptk): add per-window cursor api for win32, x11 and fb
Add ptk_window_set/get_cursor() and a driver vtable. Win32 keeps the
cursor via WM_SETCURSOR (NONE hides it), X11 defines a cached cursor-font
shape (NONE uses a transparent pixmap), framebuffer records only. Values
map to the closest system cursor where no exact match exists.
2026-10-17 21:16:46 +08:00
Liu 844802374d feat(css): support cursor property with standard keyword values
Register the `cursor` property (36 standard keywords, no url() images),
add css_cursor_t, a 6-bit type_bits field and the 34 new keywords, and
implement css_cascade_cursor(). Defaults to `auto`.
2026-10-17 21:16:46 +08:00
Liu a1a0c2cebe docs: document supported cursor values and platform caveats 2026-10-17 21:16:45 +08:00
Liu 251bf2fa54 feat(ui): propagate inherited CSS values to dependent children 2026-10-17 21:16:45 +08:00
Liu 604e9226e8 feat(css): add CSS property inheritance support 2026-10-17 21:16:44 +08:00
Liu 9d5d8d5a1d fix(widgets): snapshot text source in ui_text_set_content_w
The function freed the previous `txt->content` buffer before running
`y_wcsdup(text)` on the caller-supplied pointer. When the caller passes
`txt->content` itself (e.g. trimming flip in ui_text_on_parse_attr),
wcslen() then walks freed memory, returns a stale length, and wcscpy()
overruns the freshly allocated buffer.

Snapshot the source into a local `content` pointer first, release the
previous buffer, and reuse that snapshot for both `txt->content` and
the task queue copy.
2026-10-17 21:16:44 +08:00
Liu 916aac4850 feat(ui): render text underlines with offset and thickness control 2026-10-17 21:16:42 +08:00
Liu 11f8c66a65 feat(pandagl): add text underline render support 2026-10-17 21:16:42 +08:00
Liu 812391f1f5 feat(css): support CSS Color 4 rgb alpha syntax 2026-10-17 21:16:41 +08:00
Liu ae5b7d2ed9 feat(css): add text-decoration property 2026-10-17 21:16:41 +08:00
Liu b69a033056 docs: update website url 2026-10-17 21:16:40 +08:00
Liu 7676dd110b docs: update page generator 2026-10-17 21:16:40 +08:00
Liu 2b3c33a246 fix(pandagl): free unused fallback glyph bitmaps 2026-10-17 21:16:39 +08:00
Liu 53ef6ac477 fix(ui): destroy temporary string style values 2026-10-17 21:16:39 +08:00