Fix toolbar label placement #3

Merged
hannah-vernon merged 1 commit from fix/toolbar-labels into dev 2026-06-12 15:12:39 -05:00

What does this PR do?

Fixes a cosmetic toolbar bug where the field labels rendered on the wrong side of their input boxes. Out of the box the toolbar showed [*.log] Pattern: [0] Lines: ..., making it look like Pattern: labelled the Lines box and Lines: labelled the Subfolders checkbox.

Root cause: the toolbar controls were each DockPanel.Dock="Right". A DockPanel places right-docked children from the right edge inward in XAML order, so the box (written after its label) rendered to the left of its label. The result was every label appearing to belong to the field on its right instead of its left.

The fix wraps the right-hand controls in a single horizontal StackPanel listed in natural left-to-right order, which renders as:

📁 Folder…   <folder path>   Pattern: [*.log]  Lines: [0]  ☐ Subfolders  ☑ Auto-scroll  Apply Pause Clear Forget New Window

Control names and Click handlers are unchanged - this is a layout-only change with no logic impact.

How was this tested?

  • dotnet build Tayler.slnx -c Debug - 0 errors, 0 warnings (WarningsAsErrors active; Release builds clean too).
  • Reviewed the XAML ordering: a horizontal StackPanel lays children out left-to-right in declared order, so each label now precedes its field.

Checklist

  • I have read the Contributing Guide
  • Changes are focused - one logical change per PR
  • Documentation updated (if user-visible behavior changed) - not needed; labels only
  • New dependencies are MIT/Apache-2.0 and security-vetted (no new dependencies)
  • No commented-out code or debug leftovers
## What does this PR do? Fixes a cosmetic toolbar bug where the field labels rendered on the wrong side of their input boxes. Out of the box the toolbar showed `[*.log] Pattern: [0] Lines: ...`, making it look like `Pattern:` labelled the Lines box and `Lines:` labelled the Subfolders checkbox. Root cause: the toolbar controls were each `DockPanel.Dock="Right"`. A `DockPanel` places right-docked children from the right edge inward in XAML order, so the box (written after its label) rendered to the left of its label. The result was every label appearing to belong to the field on its right instead of its left. The fix wraps the right-hand controls in a single horizontal `StackPanel` listed in natural left-to-right order, which renders as: ``` 📁 Folder… <folder path> Pattern: [*.log] Lines: [0] ☐ Subfolders ☑ Auto-scroll Apply Pause Clear Forget New Window ``` Control names and `Click` handlers are unchanged - this is a layout-only change with no logic impact. ## How was this tested? - [x] `dotnet build Tayler.slnx -c Debug` - 0 errors, 0 warnings (WarningsAsErrors active; Release builds clean too). - [x] Reviewed the XAML ordering: a horizontal `StackPanel` lays children out left-to-right in declared order, so each label now precedes its field. ## Checklist - [x] I have read the [Contributing Guide](../CONTRIBUTING.md) - [x] Changes are focused - one logical change per PR - [x] Documentation updated (if user-visible behavior changed) - not needed; labels only - [x] New dependencies are MIT/Apache-2.0 and security-vetted (no new dependencies) - [x] No commented-out code or debug leftovers
The toolbar controls were individually docked right, and DockPanel places
right-docked children from the right edge inward in XAML order. That put
each label to the right of its own field, so 'Pattern:' appeared to label
the Lines box and 'Lines:' appeared to label the Subfolders checkbox.

Wrap the right-hand controls in a single horizontal StackPanel listed in
natural left-to-right order. Control names and event handlers are
unchanged; this is a layout-only fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hannah-vernon/tayler-log-tailer!3
No description provided.