- tools/gen_palette_icons.py draws all 36 glyphs (PIL, same style as
CWidgets icons: ink + section accent, white turned transparent) into
icons/<Key>.png; tools/verify_palette_icons.py checks 36/36 distinct.
- src/main.cpp: palette_attach_icons() puts a GtkImage left of each
button label (icons/ with ../icons/ fallback, text-only if missing);
self-test asserts 36/36 icons, palette 250x780, no scrolling.
- Fixed the round-3 tight CSS, which never applied: the builder id is
not the widget name (it stayed GtkWindow), and the per-widget style
provider never reached the buttons. Name is now set explicitly and
the provider is screen-wide (selector still scopes it to the palette);
button labels 9pt so icon + label fit the 250-wide window.
- tests/palette_icons_tests.sh (13 checks) + Memo click coordinate fix
in tests/palette_window_tests.sh for the shorter rows.
- screenshots 15 (palette with icons) + 16 (three windows with icons).
- open_code_view() now parks the code window on first creation: right
of the palette window when visible (2560x1440: design 0..1150, palette
1162..1412, code 1424..2424), else right of / below the design window,
else a small cascade offset. Previously it opened at 0,0 exactly over
the design window, hiding the canvas and menu bar, so palette clicks
and the View menu could not reach the designer (palette-places-widgets
and palette-reopens-from-view-menu failed on the merged tree).
- Startup order: palette window opens before the code window so the
parking geometry can read the palette position.
- tests/code_window_tests.sh: wait for any previous :99 server (the
self-test xvfb-run -a instance) to go quiet before starting our own
Xvfb, wait for the display to answer, and verify our Xvfb survived
startup; fixes the flaky cannot-open-display failure.
Integration of round 3: code-window (f30b285) + palette-window.
Conflict in src/main.cpp startup block resolved additively: both the
code window (open_code_view + 200 ms debugger poll) and the palette
window (tight CSS + park beside design window) open at startup.
ui/designer.ui merged cleanly (both top-level windows + both View
menu items). Build: make clean && make, 0 warnings.
- Move the palette out of main_paned into a new top-level GtkWindow
(palette_window, title FDesigner — Widgets), opened with the designer
and parked beside the design window (left if room, else right).
- Plain top-level window, never transient/modal; delete-event hides it
instead of destroying it, View -> Widget Palette (check item) toggles
it back, state stays in sync.
- Tight Lazarus-style packing: palette_box is now a 2-column GtkGrid
(row/column spacing 2, 2px margins), buttons compact via USER-priority
CSS (min-height 20px, 1px vertical padding); all 36 buttons + 5
section labels render, all 24 grid rows fit without scrolling.
- New tests/palette_window_tests.sh (16 checks: separate windows,
not transient, beside-main placement, palette clicks place widgets,
WM_DELETE hide + app survives, View-menu reopen, clean log).
Tests (VPS, Xvfb): make 0 warnings; matrix 21/0 (re-run; first run 20/1
on the known flaky chart-pro-render pixel check, no code change);
debugger console 37/37 + GTK 7/7; widget 5/5 (+40/40 markers);
font ALL PASS; theme ALL PASS; event 6/6 + runtime 41/41;
cmake probe 31/31 + script 4/4; self-test 29 PASS;
palette_window_tests 16/16.
- The code view is now its own top-level window (FDesigner — Code),
opened together with the designer at startup; View -> Code View
toggles it. Closing hides it (app keeps running); reopening
restores it with fresh content.
- Automatic variable inspection pane at the bottom of the code
window: on every debugger stop it shows the current scope
(function — file:line (reason)) and the frame locals
(name/type/value) from the SAME shared GdbSession (200 ms poll
in main; no second gdb). While running it shows a running state
and never presents stale values; on exit it shows the exit code.
On stop the stopped file is loaded into the code view if needed
and any fold hiding the paused line is unfolded.
- Paused line: solid red (#c00000) full-line background with white
text, plus a white gutter arrow — Lazarus-style execution-point
marking (ahaExecutionPoint: full-line background + gutter arrow,
distinct from the red-dot breakpoint marker), adapted to the
user-requested red. The paused tag outranks the current-line tag
and syntax tags; it clears on resume and moves on step.
- Debugger window: F5 Continue / F10 Step Over / F11 Step Into
shortcuts (tooltips already promised them); new accessors for the
code-window poll (poll_events, session_state, stop_seq,
last_stop, locals, refresh_on_stop) and a debugger_autorun test
hook; GdbSession gains a stop_seq() accessor.
- Tests: tests/code_window_tests.sh drives the real app under Xvfb
(separate window, stop + locals in two scopes, red-band pixels,
step moves the band, resume clears it, running state, gutter
click stages/removes a breakpoint in the backend, close/reopen)
plus self-test checks for the paused tag colours/priority and the
inspection API. FDESIGNER_DEBUG_TARGET/BREAK and
FDESIGNER_CODEWIN_DUMP hooks support it.
Color themes (src/theme.h/.cpp): four built-ins (Light, Dark, Monokai,
Solarized Dark) colouring keywords, types, strings, comments, numbers,
preprocessor lines, background/foreground and the current line. View ->
Color Theme... opens the picker (built-in combo + per-role colour
buttons); the choice persists to ~/.config/fdesigner/theme.conf
(FDESIGNER_THEME_CONF overrides). Deliberately separate from the
font-settings branch settings.conf so the two merge cleanly.
Code view (src/codeview.h/.cpp): View -> Code View shows the generated
C++ with a gutter (line numbers, red-dot breakpoints, [-]/[+] fold
toggles) and themed highlighting. Gutter clicks toggle breakpoints
through the real debugger backend (debugger_toggle_breakpoint() in
debugger_ui, new GdbSession::remove_staged_breakpoint() for the
not-yet-live case) and persist to debugger_bps.conf.
Folding covers #region/#endregion, every matched-brace span
(functions, if/else, loops, classes, structs, namespaces,
initializers), multi-line /* */ comments and #if...#endif blocks,
nested in all directions. Braces in strings/chars/raw strings/comments
are ignored; unbalanced input fails gracefully (extra } ignored,
unclosed {/region/#if at EOF produces no fold). Folded lines hide via
an invisible tag (proven to collapse to zero height), so file line
numbers stay exact.
Tests: tests/theme_tests.sh (harness 57 checks) + self-test Phase 8 +
xdotool smoke tests for the code view window and theme dialog.
Clean build, zero warnings; matrix 21/0; debugger 31/31 + 5/5;
widget 40/40 + 5/5.
- src/events.h (new): natural GTK signal per widget type for all 36
types (27 with signals, 9 with an explicit no-events note); kinds
cover simple, switch-page, row-activated, row-selected, text-buffer,
delete-event, draw, per-item toolbar/menu, and spreadsheet cells.
- Generator emits a stub handler + g_signal_connect for every
connected signal (Widget.signals); Shape/Plot/StockChart draw stays
wired exactly once. Stubs print an EVENT trace line under
FDESIGNER_EVENT_TRACE (test harness only).
- Designer: Events section in the property pane — one check button
per signal, builtin draw shown as always-connected, no-event types
show the reason. Connections persist in .fdj as "signals".
- Self-test Phase 8: UI check-button toggle, all-signal generation
checks, .fdj round-trip.
- tests/event_handler_tests.sh/.cpp + event_handler_runtime.cpp:
36/36 generation markers, warning-free generated build, 41/41
runtime triggers under Xvfb.
Interface font + code/text-view font picked with GtkFontButton
widgets, persisted to ~/.config/fdesigner/settings.conf (font=,
code_font=, Pango descriptions; FDESIGNER_SETTINGS_CONF overrides
the path for tests), applied live at startup and on Apply via
screen-wide CSS providers (interface font) and a textview CSS rule
(code font, so Text/Memo views use it). Sizes clamp to 6-48 pt;
empty/invalid values fall back to defaults.
New: src/preferences.h/.cpp, tests/font_tests.{cpp,sh} (20-check
harness + self-test + Preferences dialog smoke/Apply test).
Wired: Edit menu + mi_preferences in ui/designer.ui, menu hook,
startup apply, FDESIGNER_OPEN_PREFERENCES test hook and a font
block in the self-test (src/main.cpp); Makefile build line;
DESIGN.md section.