Skip to content

Compact filter panel spacing - #752

Open
Pr0metheus2 wants to merge 2 commits into
LogExperts:Developmentfrom
Pr0metheus2:fix/compact-advanced-filter-panel
Open

Pr0metheus2 wants to merge 2 commits into
LogExperts:Developmentfrom
Pr0metheus2:fix/compact-advanced-filter-panel

Conversation

@Pr0metheus2

Copy link
Copy Markdown
Contributor

The Advanced split container have unused extra space reserving 110 px for a ProFilter panel that is only 80 px high. Also, the F4 Text filter row has unused space at the bottom, which needs to be decreased.

Before change:
image

After change:
image

Summary

Reduces unused vertical space in the filter UI.

  • The Advanced / ProFilter section now sizes itself to its actual controls instead of reserving a fixed 110 px height.
  • The F4 Text filter row is reduced from 46 px to 41 px, leaving only a minimal bottom margin.
  • The content below the Text filter row moves up accordingly.

Verification

  • Built LogExpert.UI in Debug configuration successfully.
  • Checked manually that the Advanced and F4 filter areas have less unused space.

## Summary
Reduces unused vertical space in the filter UI.

- The Advanced / ProFilter section now sizes itself to its actual controls instead of reserving a fixed 110 px height.
- The F4 Text filter row is reduced from 46 px to 41 px, leaving only a minimal bottom margin.
- The content below the Text filter row moves up accordingly.

## Verification
- Built `LogExpert.UI` in Debug configuration successfully.
- Checked manually that the Advanced and F4 filter areas have less unused space.
@Hirogen

Hirogen commented Nov 18, 2026

Copy link
Copy Markdown
Member

This must be tested with High and Low DPI as well, because this will 100% make problems on High DPI monitors, with the standard windows settings

@Pr0metheus2

Copy link
Copy Markdown
Contributor Author

You are right: the fixed 41 px F4 row is DPI-sensitive.

@Hirogen

Hirogen commented Nov 18, 2026

Copy link
Copy Markdown
Member

yeah its super annoying

Improves the Text Filter / F4 panel layout and removes unnecessary vertical space.

- Sizes the Advanced/ProFilter area from its actual content instead of a fixed splitter position.
- Reduces unused space around the F4 Text Filter and Advanced panels.
- Keeps Search, filter checkboxes, and Show advanced compact and visible at high DPI (including 200%).
- Uses consistent checkbox spacing without scaling empty gaps with DPI.
- Recalculates the layout after DPI changes and once initial control scaling has completed.
- Aligns all fields in F4 row vertically

Verification:
- Built LogExpert.UI Debug successfully (0 errors).
- Manually checked at 100%, 150%, and 200% display scaling.
@Pr0metheus2

Pr0metheus2 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Improve F4 filter-panel layout at high DPI

Improves the Text Filter / F4 panel layout and removes unnecessary vertical space.

  • Sizes the Advanced/ProFilter area from its actual content instead of a fixed splitter position.
  • Reduces unused space around the F4 Text Filter and Advanced panels.
  • Keeps Search, filter checkboxes, and Show advanced compact and visible at high DPI (including 200%).
  • Uses consistent checkbox spacing without scaling empty gaps with DPI.
  • Recalculates the layout after DPI changes and once initial control scaling has completed.
  • Aligns all fields in F4 row vertically

Verification:

  • Built LogExpert.UI Debug successfully (0 errors).
  • Manually checked at 100%, 150%, and 200% display scaling.

100% Scale
image

200% Scale
image

@Hirogen Hirogen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the tighter filter panel looks much better, and sizing the Advanced area from its real content instead of the hard-coded 110 is the right idea. A few things before we can merge:

Must fix

  1. Please revert src/setup/GeneratedFiles.iss. It's generated by the Nuke GenerateInstallerFileList target from LogExpert.deps.json (see the header). The six DLLs removed here are still in deps.json; System.Drawing.Common and System.Resources.Extensions are direct package references. InstallerCoverageTests.Installer_ShipsEveryRuntimeAssembly_DeclaredInDepsJson checks the committed file, so I'd expect it to fail. This probably came from a local build regenerating it.
  2. Guard the splitter assignments. SetAdvancedFilterSplitterDistance sets advancedFilterSplitContainer.SplitterDistance directly. SplitContainer throws (it doesn't clamp) when the value breaks Panel1/Panel2MinSize or the container size, and this container is Dock=Fill. The value now grows with DPI (about 160 px at 200%) and the method now also runs on DPI change, Load and every splitContainerLogWindow move, so a short window can crash. Please go through FilterSplitterLayout.TryClampSplitterDistance like AutoResizeFilterBox does. The same risk applies to the new filterSplitContainer.Panel1MinSize assignment in LayoutFilterControls.
  3. advancedBackPanel only gets its Top changed. It's anchored Top|Bottom|Left|Right, so moving it up 5 px without growing it leaves a 5 px empty strip at the bottom. Please adjust the height as well (e.g. via Bounds).

Should fix

  1. Vertical alignment: the checkboxes are centred on the Search button and the label on the checkboxes, but filterComboBox stays at Top=5, so "Text filter:" now sits about 7 px lower than its combo box. Centring the label (and the combo / btnAdvanced) on the same line would match "aligns all fields".
  2. Don't repeat the relayout block: OnDpiChangedAfterParent and OnLogWindowLoad call the same four methods; please pull them into one method. The constructor call to SetFilterInputPanelHeight() runs before scaling and looks unnecessary.
  3. Small things: lblTextFilter.AutoSize = true duplicates the designer. FILTER_PANEL2_CONTROL_GAP is now also used in Panel1, so a more general name would fit. Why the gap changed from 6 to 7? Panel1MinSize dropping from 200 to about 165 lets the filter box shrink further; intended? Please keep the final newlines in LogWindow.cs and LogWindow.designer.cs.

Nice to have

  1. The spacing/centring maths in LayoutFilterControls is pure arithmetic. Pulling it into FilterSplitterLayout (or a sibling) would let it be unit-tested next to FilterSplitterLayoutTests.

Thanks again for your hard work!

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.

2 participants