# 030 — Forking Estuary 21.3

Status: approved 2026-09-30. Built in F1.

## 1. Source

- Repository `xbmc/xbmc`, tag **`21.3-Omega`** (commit `a3a448d26b`, the same
  build as the installed Kodi), directory `addons/skin.estuary` — Estuary
  4.0.0 with loose PNG media and theme folders.
- Fetch with `gh` (sparse checkout or tarball of the tag) into a scratch
  directory, then copy to `resources/skin.milionar/`. Record the source
  commit in `resources/skin.milionar/changelog.txt` ("Forked from Estuary
  4.0.0, xbmc/xbmc 21.3-Omega a3a448d26b").
- Do **not** copy from `/Applications/Kodi.app/.../skin.estuary`: it has only
  packed `.xbt` media.

## 2. Mechanical renames (the only edits in F1 besides branding)

| What | From | To |
|------|------|----|
| `addon.xml` `id` / `name` | `skin.estuary` / `Estuary` | `skin.milionar` / `Milionář` |
| `addon.xml` `version` | `4.0.0` | `1.0.0` (own semver, 040 §3) |
| `addon.xml` `provider-name` | `phil65, Ichabod Fletchman` | `Milionář (fork of Estuary by phil65, Ichabod Fletchman)` |
| `addon.xml` summary/description | Estuary texts in 50+ languages | cs_CZ, sk_SK, en_GB only, stating it is based on Estuary |
| `addon.xml` `<assets>` | Estuary icon, fanart, screenshots | own icon/fanart; screenshots taken in F5 |
| `xbmc.gui` import | `5.17.0` | unchanged |
| `special://skin/` paths, include names, window ids | — | unchanged |

Search the tree for any `skin.estuary` literal (`grep -rn "skin.estuary"`)
and replace only where it names this skin (e.g. `Skin.HasSetting` does not
take an id; `special://skin` is id-free). Record every hit in the F1 result.

## 3. Branding and licence

- Keep `LICENSE.txt` (CC BY-SA 4.0 + GPL-2.0) and the Estuary credits; the
  fork is published under the same licences.
- **Home logo:** Estuary draws the Kodi logo top-left on Home: `Home.xml`
  (line ~1132 in 21.3) image `left 4 / width 192 / height 56 /
  aspectratio keep` inside a group at `left 90 / top 30`, texture
  `special://xbmc/media/vendor_logo.png`. Replace only the texture with
  `media/milionar/logo.png` so nothing else moves.
- **Decided: a wordmark built from the addon icon**, in the layout of the Kodi
  logo it replaces (emblem left, word right). Source
  `resources/media/icons/Milionar.png` is 800x800 **RGB without alpha**
  (gold ring emblem with a clapperboard on a dark teal gradient). A PIL
  script `resources/media/generate_skin_logo.py` (next to the addon's other
  texture generators) writes `resources/skin.milionar/media/milionar/logo.png`:
  1. crops the emblem (ring + clapperboard, drop the "WCS" mark) and removes
     the teal background by colour distance to the sampled background with a
     soft edge, giving an RGBA emblem;
  2. draws "MILIONÁŘ" to its right in the icon's cream letter colour
     (sampled from the icon), NotoSans Bold
     (`scripts/dialog_harness/fonts/NotoSans-Bold.ttf`), cap height ≈ 45 %
     of the box height, vertically centred;
  3. writes `logo.png` at 384x112 px (2× the 192x56 box, transparent
     background); Kodi shows it with `aspectratio keep`.
  The user sees a live Home capture of the logo before F1 is handed off.
- **Decided: dialog header icon stays Kodi's.** Estuary draws
  `special://xbmc/media/vendor_icon.png` as the unfocused close button in
  dialog headers (`Includes.xml` ~959/961); it is not changed (Estuary 1:1).
- Skin `resources/icon.png`: the addon icon `Milionar.png` resized to
  512x512 (LANCZOS). Skin `resources/fanart.jpg`: Estuary's until F5, then a
  live Home capture of skin.milionar scaled to 1920x1080 (JPEG q90).
- No Kodi logo or trademark in the skin's own assets.

## 4. What may differ from Estuary

Only the items listed in this plan:

1. `addon.xml`, `changelog.txt`, `resources/` assets (§2, §3).
2. Home logo (§3).
3. `Home.xml` main menu items, widget groups, top-bar settings/search
   `onclick` (050).
4. New files: `Custom_1108_MilionarSettingsMenu.xml` (050 §4),
   `Custom_1120_MilionarSearch.xml` (070), `Custom_1121_MilionarActions.xml`
   (080 §2), `Custom_1122_MilionarGame.xml` (050 §4a),
   `media/milionar/logo.png` (§3).
5. `SkinSettings.xml` Milionář section (050 §5), default-hidden Estuary menu
   items (050 §2).
6. `DialogVideoInfo.xml` one extra button (080 §2).
6a. milionar-library additions (docs/plan/milionar-library 060, 070, 2026-10-01): `Custom_1123_MilionarRows.xml` (widget
   manager, 2026-10-02: list + buttons, Back through the hidden button 9200; `Home.xml` control 9000 got `<oninfo>`), `Includes_MilionarSlots.xml` (generated by `scripts/skin_harness/gen_slots.py`) registered in `Includes.xml`;
   `Includes.xml` hides the codec / resolution / audio flags for items with `ListItem.Property(milionar.type)`;
   `Includes_Home.xml` `WidgetListPoster` gets the param `widget_limit` (default 15, as `WidgetListEpisodes` already has);
   `Variables.xml` shows watched / total counts and episode ratings for those items (`ListLabel2Var`,
   `WatchedStatusVar`, `ItemStatusIconVar`); `DialogContextMenu.xml`: for items with `milionar.type` Kodi's own menu is
   hidden and closed and the addon opens Kodi's native menu populated only with its actions (`ctx_open`, guard property
   `milionar.ctx.active`). The 170 follow-up adds item context metadata, a per-widget menu editor button,
   and a Home-only keymap installed from the addon (C/menu/long Enter/OK).
7. `language/resource.language.{cs_cz,sk_sk,en_gb}/strings.po` new strings
   from **#31900** up (Estuary ends at #31611). Other languages fall back to
   en_gb.

8. Branding/accent facelift (180, 2026-10-03): `colors/defaults.xml` retains the
   existing gold accent; `colors/milionar-*.xml` add five accent-only alternatives,
   including runtime logo tints. `Font.xml` adds an alias of the existing Estuary
   font for addon brand headers (`fonts/NotoSans-MilionarBrand.ttf`), avoiding
   substitution by the addon's pre-existing font file. Other fonts/text stay
   untouched. Background colours remain untouched. Exact
   sidebar mark reused in all brand assets; current promotional captures.

9. Cinematic Home section (190, 2026-10-05): new generated `Includes_MilionarCinema.xml` registered in
   `Includes.xml`, textures `media/milionar/cinema/`, `Home.xml` Filmy and Seriály groups and a backdrop at the window root,
   `Font.xml` sizes `font20` / `font80_title`, `colors/defaults.xml` `cinema_*`, skin string 31991.

10. Media detail on Home (200, 2026-10-05): generated `Includes_MilionarDetail.xml` registered in
    `Includes.xml`, shared hero/button/row templates in `Includes_MilionarCinema.xml`, Home detail group
    and sidebar exit handling, and `DialogVideoInfo.xml` redirect for addon TMDb items.

11. Milionář-only Home (2026-10-08, `900-decisions.md`): `Home.xml` has no Estuary menu items or widget groups
    (Filmy/Seriály/Videa/Doplňky from the Kodi library, Hudba, TV, Rádio, Obrázky, Hry, Počasí, Oblíbené, Disc,
    Hudební videa); `SkinSettings.xml` has no "Hlavní nabídka" category; `Custom_1108_MilionarSettingsMenu.xml`
    is unchanged; `Custom_1121_MilionarActions.xml` and the Kodi-library buttons of
    `DialogVideoInfo.xml` (Milionář menu for library items, set, music-video albums, versions, extras) are gone;
    the unused `*OnClickAction*` variables in `Variables.xml` are gone. The skin supports no Kodi library item;
    the addon (`lib_*`, `kodi.context.item`, `LibraryManager`) keeps it for other skins.

12. Collapsing Home sidebar (230, 2026-10-12): new `Includes_MilionarSidebar.xml` registered in `Includes.xml`,
    `Home.xml` sidebar / content / logo hooks, `SkinSettings.xml` switch 709, skin string 31919.

Everything else is byte-identical to the tag. A diff script in the harness
(100 §4) lists every changed file against the tag; a file outside this list
fails the F-phase check.

## 5. Media packing

Ship loose PNGs (Kodi loads `media/` files when `Textures.xbt` is absent).
TexturePacker is not installed and the loose media are 0.86 MB. Revisit only
if Home load time measured in F2 is worse than Estuary's by more than 10 %
(120 §3); then build `kodi-texturepacker` from the 21.3 source.

Themes `curial` and `flat` stay as folders (Kodi reads loose theme folders
the same way); verify in F1 that switching theme in skin settings still works.

## 6. Result (F1, 2026-09-30)

- Fork of `xbmc/xbmc` tag `21.3-Omega` (`a3a448d26b`) in `resources/skin.milionar/`;
  `baseline.py difftree` lists exactly: `addon.xml`, `changelog.txt`,
  `resources/icon.png`, 8 removed Estuary screenshots, `media/milionar/logo.png`
  (new), `xml/Home.xml`, and from F2 the files listed in §4; 0 files outside §4.
- The only `skin.estuary` literal outside the language files' header comments
  is the `<source>` URL of the fork base in `addon.xml` (kept on purpose).
- Logo: `resources/media/generate_skin_logo.py` -> `media/milionar/logo.png`
  (384x112). It shows the whole icon emblem (ring + clapperboard) with
  "MILIONÁŘ" to its right, so the word appears twice; the emblem has the
  word baked in.
- Non-Home screens are pixel-identical to Estuary (videos views, info dialog,
  context menu, OSD: `same`; dialogs over Home and the Skin value in
  Settings > Interface differ as declared).
- Skin settings of the fork start empty; `baseline.py capture` copies
  Estuary's skin settings into it first (`sync_skin_settings`) so both skins
  run under the same conditions.
