Requested in the chat on 2026-09-27, filed afterwards so the work has a place.
Wanted
Theme.headerPadding = 4 for the top bar and the header bar of the tabs, instead of Theme.padding (8). Only these two bars use it, the rest of the editor keeps its padding.
The Scene tab gets a header bar like the other tabs.
The visibility dropdown (the eye) moves there from the top bar.
A Fit button. The scene view is pixel-perfect, so Fit lands on a whole zoom step like Auto in the Game tab.
Fit with a camera: if there is an active camera (the Game tab shows something), Fit frames the camera exactly like the Game tab does. Switching between the two tabs should show the same picture.
Requested in the chat on 2026-09-27, filed afterwards so the work has a place.
## Wanted
- **`Theme.headerPadding` = 4** for the top bar and the header bar of the tabs, instead of `Theme.padding` (8). Only these two bars use it, the rest of the editor keeps its padding.
- **The Scene tab gets a header bar** like the other tabs.
1. The visibility dropdown (the eye) moves there from the top bar.
2. A **Fit** button. The scene view is pixel-perfect, so Fit lands on a whole zoom step like *Auto* in the Game tab.
- **Fit with a camera:** if there is an active camera (the Game tab shows something), Fit frames the camera exactly like the Game tab does. Switching between the two tabs should show the same picture.
Done in 30de4d3, with the letterbox colour change in a90ef4c just before it.
Behaviour
Slimmer bars: the top bar and the tab header bars use Theme.headerPadding (4) instead of Theme.padding (8) and are 32 instead of 40 px high. Nothing else uses the new value.
Scene tab header: new ScenePane with Fit and the visibility eye. The eye is gone from the top bar, which keeps the menu, undo and redo. The bar spans the whole tab, the tilemap panel included, like the Game tab.
Fit with a camera: the scene view shows the world exactly as the Game tab at its chosen step. Same zoom, and the camera centre on the same screen pixel. At Auto that is a whole step, at Fit the same fraction as in the Game tab. Rule: pure freeViewOfCamera in src/viewport/view.ts, letterbox snapping included.
Fit without a camera: frames all content on a whole step, as before.
Letterbox (a90ef4c): the Game tab draws the bars in Theme.colors.background instead of black. e2e 3f now compares against #1b1d22, otherwise the check would pass whatever is drawn.
Limitation
The two views only match while they have the same size. With the tilemap panel open the scene view is narrower, and Auto may pick a smaller step.
Tests
./check.sh: 178 files, 2575 tests, CHECK EXIT 0
2 new unit tests in view.test.ts (three cameras times four steps, Auto stays whole)
e2e 3h, 2 checks, real click on Fit at Auto and Fit: crate, camera frame and view box match in both tabs
GM_STEPS=1-3,46: ALL PASSED, 94 checks, on the final state including the letterbox change
Counter-probes: without the centre offset the unit test fails, with Fit ignoring the camera both 3h checks fail
Not run: the full e2e suite. Both bars are lower and the scene view has one bar more, so modules with fixed positions may tip over. CI will show.
Wiki: Scene editing (Fit and the eye), Architecture, Development (sum 1457, computed), commit 82dd9f1.
Done in `30de4d3`, with the letterbox colour change in `a90ef4c` just before it.
## Behaviour
- **Slimmer bars:** the top bar and the tab header bars use `Theme.headerPadding` (4) instead of `Theme.padding` (8) and are 32 instead of 40 px high. Nothing else uses the new value.
- **Scene tab header:** new `ScenePane` with **Fit** and the visibility eye. The eye is gone from the top bar, which keeps the menu, undo and redo. The bar spans the whole tab, the tilemap panel included, like the Game tab.
- **Fit with a camera:** the scene view shows the world exactly as the Game tab at its chosen step. Same zoom, and the camera centre on the same screen pixel. At *Auto* that is a whole step, at *Fit* the same fraction as in the Game tab. Rule: pure `freeViewOfCamera` in `src/viewport/view.ts`, letterbox snapping included.
- **Fit without a camera:** frames all content on a whole step, as before.
- **Letterbox (`a90ef4c`):** the Game tab draws the bars in `Theme.colors.background` instead of black. e2e 3f now compares against `#1b1d22`, otherwise the check would pass whatever is drawn.
## Limitation
The two views only match while they have the same size. With the tilemap panel open the scene view is narrower, and *Auto* may pick a smaller step.
## Tests
- `./check.sh`: 178 files, 2575 tests, `CHECK EXIT 0`
- 2 new unit tests in `view.test.ts` (three cameras times four steps, Auto stays whole)
- e2e 3h, 2 checks, real click on Fit at Auto and Fit: crate, camera frame and view box match in both tabs
- `GM_STEPS=1-3,46`: ALL PASSED, 94 checks, on the final state including the letterbox change
- Counter-probes: without the centre offset the unit test fails, with Fit ignoring the camera both 3h checks fail
- Not run: the full e2e suite. Both bars are lower and the scene view has one bar more, so modules with fixed positions may tip over. CI will show.
Wiki: *Scene editing* (Fit and the eye), *Architecture*, *Development* (sum 1457, computed), commit `82dd9f1`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Requested in the chat on 2026-09-27, filed afterwards so the work has a place.
Wanted
Theme.headerPadding= 4 for the top bar and the header bar of the tabs, instead ofTheme.padding(8). Only these two bars use it, the rest of the editor keeps its padding.Done in
30de4d3, with the letterbox colour change ina90ef4cjust before it.Behaviour
Theme.headerPadding(4) instead ofTheme.padding(8) and are 32 instead of 40 px high. Nothing else uses the new value.ScenePanewith Fit and the visibility eye. The eye is gone from the top bar, which keeps the menu, undo and redo. The bar spans the whole tab, the tilemap panel included, like the Game tab.freeViewOfCamerainsrc/viewport/view.ts, letterbox snapping included.a90ef4c): the Game tab draws the bars inTheme.colors.backgroundinstead of black. e2e 3f now compares against#1b1d22, otherwise the check would pass whatever is drawn.Limitation
The two views only match while they have the same size. With the tilemap panel open the scene view is narrower, and Auto may pick a smaller step.
Tests
./check.sh: 178 files, 2575 tests,CHECK EXIT 0view.test.ts(three cameras times four steps, Auto stays whole)GM_STEPS=1-3,46: ALL PASSED, 94 checks, on the final state including the letterbox changeWiki: Scene editing (Fit and the eye), Architecture, Development (sum 1457, computed), commit
82dd9f1.