Summary
The right-side toolbar area in the DMS Browser dialog currently reserves a static height so that all possible toolbars and icons fit when features are enabled. This leaves unnecessary vertical whitespace when features/toolbars are disabled, and the file list below starts lower than needed.
Current behavior
In CompuMaster.Dms.BrowserUI/DmsBrowser.Designer.vb:
- SplitContainer.Panel2 contains FlowLayoutPanel1 and ListViewDmsFiles.
- FlowLayoutPanel1 contains the file action, sharing, folder sharing, and properties/refresh toolbars.
- ListViewDmsFiles.Dock = DockStyle.Fill, but its initial layout starts below a statically sized toolbar area (Location currently around Y = 92).
- Feature toggles change visibility/enabled state of toolbars/buttons, but the reserved top area does not shrink/grow based on the visible toolbars.
Desired behavior
The file-list toolbar area should size itself dynamically based on the currently visible toolbars and enabled features:
- Compute or let WinForms auto-size the toolbar host height from visible ToolStrip controls.
- When sharing actions are disabled or unavailable, hidden toolbars should not reserve vertical space.
- ListViewDmsFiles should remain correctly docked directly below the visible toolbar area.
- The layout should remain correct when AllowedActions, BrowseMode, or provider capabilities such as SupportsSharingSetup change visibility.
- Resizing the dialog should not reintroduce gaps or overlap.
Possible implementation notes
- Replace the static toolbar/list positioning with a layout container, e.g. a top-docked auto-sized toolbar panel plus fill-docked list view.
- Consider FlowLayoutPanel.AutoSize = True, AutoSizeMode = GrowAndShrink, Dock = Top, and ListViewDmsFiles.Dock = Fill.
- After changing toolbar visibility, trigger layout recalculation (PerformLayout) if needed.
- Keep the designer maintainable and avoid relying on magic Y coordinates.
Acceptance criteria
- With minimal features enabled, the file list starts immediately below the visible toolbar row(s), without the current blank reserved space.
- With all relevant features enabled, all toolbar buttons still fit and wrap/display as before.
- Feature/provider visibility changes update the toolbar area height correctly.
- No overlap between toolbars and file list at common dialog sizes.
- Add/update BrowserUI smoke tests where practical to verify toolbar visibility/layout properties.
Summary
The right-side toolbar area in the DMS Browser dialog currently reserves a static height so that all possible toolbars and icons fit when features are enabled. This leaves unnecessary vertical whitespace when features/toolbars are disabled, and the file list below starts lower than needed.
Current behavior
In CompuMaster.Dms.BrowserUI/DmsBrowser.Designer.vb:
Desired behavior
The file-list toolbar area should size itself dynamically based on the currently visible toolbars and enabled features:
Possible implementation notes
Acceptance criteria