Skip to content

Fit the Paint tab's Materials section in a 1000 px dock - #1380

Merged
saworbit merged 2 commits into
mainfrom
fix/paint-tab-fit
Oct 21, 2026
Merged

saworbit merged 2 commits into
mainfrom
fix/paint-tab-fit

Conversation

@saworbit

Copy link
Copy Markdown
Owner

With only Materials open in a 1000 px dock, the Paint tab still scrolled, so finding a texture meant scrolling the tab to reach the grid.

Measured headless at 1000 px with a level open: the tab has 778 px and its content was 1092 px. The headers, hint and margins with only Materials open cost 390 px. That leaves 388 px for the section, and the four-row grid floor from #1332 is 356 px by itself. So the issue's proposal alone (fold the library buttons, move the status line) cannot make it fit. The grid's floor has to give way too.

  • The seven palette buttons (Add, Remove, Refresh Prototypes, Remove Unused, Clear, Save Library, Load Library) sit under a nested Material Library section, closed by default and remembered like Displacement and Bevel. They are still the same Buttons, so signals, tooltips and the palette's actions are unchanged.
  • The browser's count moves into the section header ("Materials · 150 materials"). Section headers can carry a short note, trimmed with an ellipsis rather than widening the dock.
  • The search field shares the pattern and view row, and wraps to its own line in a narrow dock. Face Select Mode and Clear Face Selection share one row.
  • GRID_MIN_ROWS goes from 4 to 2. The grid still takes all the height the tab has left: two rows at 1000 px, four from 1200 px up. This trades [Paint] Let the material browser show more than two rows #1332's four rows at 1000 px for a tab that does not scroll; the grid scrolls inside itself instead.

Tests in test_dock_tab_width.gd, now on a real level with the 150 prototypes: the tab fits at 1000 px with at least two rows; a 700 px dock keeps two; the library buttons stay hidden until Material Library opens; the header reads "150 materials". The four-row test now runs at 1200 px and checks the tab does not scroll. Mutation checked: the old floor or the library rows back under the grid both fail the fit test.

Docs: the lines that named the buttons' old place or the old status line, in the User Guide, Texture Materials, Prototype Textures, the smoke checklist and Data Portability. ui_material_browser.png retaken from this branch.

Local: test_dock_tab_width 9/9, test_material (5 scripts, 154), test_dock (12 scripts, 104), test_plugin_ (18 scripts, 224), and the viewport, prefs and palette scripts, all green.

Fixes #1366

@saworbit
saworbit enabled auto-merge (squash) October 21, 2026 00:26
@github-actions github-actions Bot added area: docs README, guides, spec, roadmap, changelog tests The GUT suite and its fixtures labels Oct 21, 2026
@saworbit
saworbit merged commit e7fc0dc into main Oct 21, 2026
11 checks passed
@saworbit
saworbit deleted the fix/paint-tab-fit branch October 21, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs README, guides, spec, roadmap, changelog tests The GUT suite and its fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Paint] The Paint tab still scrolls with only Materials open in a 1000 px dock

1 participant