# Normal dialog padding correction — 2026-10-28

The Normal material recipe replaced native button textures with edge-to-edge
images. Kodi's dialog layouts include 20px of transparent padding in their
button geometry, so the replacement painted outside the dialog panel. The
same problem affected both Normal layouts.

`gen_flat.py` now generates square native button textures with the original
canvas/insets: dialog/settings buttons 80×80 with a 20px margin and 40px slice;
keyboard button focus 120×120 with a 20px margin. Full-bleed OSD and list focus
keep their separate existing geometry. `gen_styles.py` shares the recipe with
Normal; no dialog-by-dialog offsets or duplicated material source were added.

Verification:

- All 99 dialog/custom-window definitions rendered as fixtures in real Kodi in
  each Normal layout (198 captures, `layouts.json`). Additional 22 footer
  captures populate controls supplied by DefaultDialogButton includes and wait
  for animations (`footer-states.json`). Layout previews are JPEG; real native
  confirmation screenshots remain lossless PNG in `final/`.
- Actual Kodi Keep skin confirmation, focused Yes and No, captured while
  switching to each Normal skin. Both focus rectangles end at native y946,
  inside the panel ending at y960 (14px margin), `keep-button-bounds.json`.
- Actual native OK, selection, text viewer, text input, numeric input,
  background progress and notification windows in both skins,
  `native-states.json`. No settings or backend actions were submitted.
- All 34 native dialog XML definitions match between Normal and Normal Horizont.
- 90 targeted tests pass: shared styles 18, Flat 10, Glass 14, commands 10,
  picker 13, update 11, Modern 14. Modern tests run in a separate process because
  the existing suites retain different mocked Kodi modules when combined.
- All composed Normal XML parses. The regression test asserts native texture
  alpha bounds, canvas sizes and slice borders in both Normal variants.

The broad captures test layouts with sample data, not PVR/controller backend
functionality. Fixtures strip open/close hooks and never activate their actions;
actual native calls supplement synthetic layouts for runtime-populated controls.
The reproducible runner is `scripts/skin_harness/audit_dialogs.py`; its temporary
XML staging directory is removed before packaging. Normal Horizont is restored.

Publication was requested with this fix and the preceding widget corrections;
the authoritative release result is `.agents/state/release.json`.
