Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/gjs/src/widgets/editor/phone-chrome.probe.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ export default async () => {
for (const part of report.parts) expect(part.min).toBeLessThanOrEqual(report.floorPx)
})

await it('lets the hidden selection verbs stay out of the bar minimum', async () => {
// A homogeneous stack made the unseen Edit/Copy/Move/Delete page
// (397 px in German) the bar's minimum, so the whole editor was
// allocated wider than a 360 px window and clipped on the right.
const rowB = report.parts.find((p) => p.name.trim() === 'row B')
const recent = report.parts.find((p) => p.name.trim() === 'recent tiles')
expect(rowB).toBeDefined()
expect(rowB?.min).toBe(recent?.min)
})

await it('keeps the Ground chip row inside its height budget', async () => {
// TERRAIN.md § 10.6 budgeted 76 px for the row — a 56 px chip and
// its name. The slack is for theme padding, not for a second line:
Expand Down
1 change: 1 addition & 0 deletions packages/gjs/src/widgets/editor/phone-chrome.probe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export function probePhoneChrome(): PhoneChromeReport {
report(' tool group', editor.toolGroup),
...(badgeButton ? [report(' badge button', badgeButton)] : []),
report(' recent tiles', editor.recentTiles),
report(' row B', editor._bar_row_b),
report('brush page', page),
report(' plane chips', page._plane_chips),
report(' layer row', page._layers_button.get_parent() ?? page._layers_button),
Expand Down
5 changes: 5 additions & 0 deletions packages/gjs/src/widgets/editor/scene-editor.blp
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,11 @@ template $PixelRpgSceneEditor : Adw.Bin {
// A stack rather than two `visible` flags so the row keeps one
// height and the bar above the canvas never jumps.
Gtk.Stack bar_row_b {
// Not horizontally homogeneous: the HIDDEN selection page (four
// verbs, wider in German) would otherwise set the bar's minimum
// to 397 px, and `Adw.BreakpointBin` then allocates the whole
// editor that wide - header, play row and map clip at 360 px.
hhomogeneous: false;
transition-type: crossfade;
transition-duration: 120;

Expand Down
Loading