Skip to content

fix(dock): tabbed panel groups render a blank gap above their content#64

Merged
dy-tea merged 1 commit into
vlang:mainfrom
MartenH:fix/dock-tab-blank-gap
Jun 23, 2026
Merged

fix(dock): tabbed panel groups render a blank gap above their content#64
dy-tea merged 1 commit into
vlang:mainfrom
MartenH:fix/dock-tab-blank-gap

Conversation

@MartenH

@MartenH MartenH commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Problem

A dock panel group with 2+ tabs (e.g. created by dragging one panel onto another via the center/tabify drop zone) renders a large empty band between the tab bar and the panel content. Single-tab groups are fine, so it only appears once a group has more than one tab.

Cause

In view_dock_layout.v, the per-tab separator is built as:

tab_buttons << column(width: 1, sizing: fixed_fill, color: color_sep)

That's a height-fill child placed inside the fit-height dock_tab_bar row (sizing: fill_fit). A fill child in a fit container makes the row expand to fill the available group height instead of fitting the tabs, so the tab bar balloons and pushes the content down. The separator is only added between tabs, which is why the gap appears only with 2+ tabs.

Fix

Give the separator a definite height (fixed_fixed) instead of fixed_fill, so the tab bar fits its tabs again. The divider is still drawn.

tab_buttons << column(width: 1, height: 20, sizing: fixed_fixed, color: color_sep)

Repro

Put two panels in one group:

dock_panel_group('g', ['a', 'b'], 'a')

Before: a blank band sits above the content. After: content sits directly under the tab bar.

Verified in a real ~25-panel dockable app: tabbing any two panels together now renders cleanly.

@GGRei

GGRei commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@MartenH You need to rebase/sync your branch with the current vlang/gui main branch, because your PR is still using the old Windows CI workflow with V_VERSION: 0.5.1 Thanks!

A panel group with 2+ tabs rendered a large empty gap between the tab bar and the
panel content. The per-tab separator was `column(width: 1, sizing: fixed_fill)` — a
height-fill child inside the fit-height `dock_tab_bar` row, so the row expanded to
fill the group instead of fitting the tabs, pushing the content down. It only
showed with 2+ tabs (the separator is added between tabs), so single-tab groups
were fine.

Give the separator a definite height (fixed_fixed) so the tab bar fits its tabs
again; the divider is still drawn.

Repro: put two panels in one group, e.g.
  dock_panel_group('g', ['a', 'b'], 'a')
and observe the blank band above the content; gone with this change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MartenH MartenH force-pushed the fix/dock-tab-blank-gap branch from 1486506 to 85e2ecc Compare June 22, 2026 17:31
@MartenH

MartenH commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@GGRei Done

@dy-tea dy-tea merged commit b1c65e3 into vlang:main Jun 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants