Skip to content

Fix ToolStripManager restore issue when ToolStripPanel padding is asymmetric - #15070

Open
KSaiSivani wants to merge 1 commit into
dotnet:mainfrom
KSaiSivani:Fix_issue_4449
Open

Fix ToolStripManager restore issue when ToolStripPanel padding is asymmetric#15070
KSaiSivani wants to merge 1 commit into
dotnet:mainfrom
KSaiSivani:Fix_issue_4449

Conversation

@KSaiSivani

@KSaiSivani KSaiSivani commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #4449

Proposed changes

  • Corrected comparison in ToolStripPanel.MoveInsideContainer for horizontal orientation to use Padding.Top instead of Padding.Left.

  • Ensures row insertion logic respects asymmetric padding values consistently.

  • Added unit tests to validate behavior.

Customer Impact

  • Toolbars restored via ToolStripManager.LoadSettings now appear in the correct location when ToolStripPanel.Padding is asymmetric.

  • Prevents unexpected row shifts and incorrect toolbar placement, improving layout persistence reliability.

Regression?

  • No

Risk

  • Low

Screenshots

Before

on load:
Screenshot 2026-09-09 175436

on save:
Screenshot 2026-09-09 180526

After

on load:
Screenshot 2026-09-09 175625

on save:
Screenshot 2026-09-09 180556

Test methodology

  • Manual test and unit test

Test environment(s)

  • .NET SDK 11.0.100-preview.6.26359.118
Microsoft Reviewers: Open in CodeFlow

@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.24166%. Comparing base (b0a7c95) to head (513859d).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##                main      #15070   +/-   ##
=============================================
  Coverage   37.24166%   37.24166%           
=============================================
  Files            246         246           
  Lines           9774        9774           
  Branches        1029        1029           
=============================================
  Hits            3640        3640           
  Misses          5970        5970           
  Partials         164         164           
Flag Coverage Δ
Debug 37.24166% <ø> (ø)
production 39.36526% <ø> (ø)
test 20.64923% <ø> (ø)
unit 39.36526% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Incorrect toolbar location when restored via ToolStripManager.LoadSettings

1 participant