Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[release/10.0] Refactor StatusStrip DefaultPadding calculation and adjust GripWidth for improved layout consistency#14121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
LeafShi1 wants to merge1 commit intodotnet:release/10.0
base:release/10.0
Choose a base branch
Loading
fromLeafShi1:backport/pr-14068-release/10.0

Conversation

@LeafShi1
Copy link
Member

@LeafShi1LeafShi1 commentedDec 9, 2025
edited
Loading

Backport#14068 to release/10.0

Fixes#14062

Proposed changes

  • GripWidth Adjustment
    • Changed GripWidth from 12 to 15 to improve visual balance and reduce unnecessary space.
  • Refactored DefaultPadding Logic
    • Previous implementation used hardcoded values: Padding(1, 0, 14, 0) or Padding(1, 3, 1, DefaultSize.Height).
    • New implementation dynamically calculates padding based onSizingGripBounds.Width and GripWidth for horizontal orientation, and adjusts for height differences in vertical orientation.
  • Update unit test and add StatusStrip in DemoConsole

Customer Impact

  • Prevents labels and items from being pushed out of view due to fixed padding values.

Regression?

Risk

  • Low

Test methodology

  • Manual testing
  • Unit tests

… GripWidth for improved layout consistency (dotnet#14068)Fixesdotnet#14062 ## Proposed changes- **GripWidth Adjustment**    - Changed GripWidth from 12 to 15 to improve visual balance and reduce unnecessary space.- **Refactored DefaultPadding Logic**    - Previous implementation used hardcoded values: Padding(1, 0, 14, 0) or Padding(1, 3, 1, DefaultSize.Height).    - New implementation dynamically calculates padding based on `SizingGripBounds.Width` and GripWidth for horizontal orientation, and adjusts for height differences in vertical orientation.- **Update unit test and add StatusStrip to DemoConsole** <!-- We are in TELL-MODE the following section must be completed -->## Customer Impact- Prevents labels and items from being pushed out of view due to fixed padding values.## Regression? - Yes
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR backports changes from PR#14068 to the release/10.0 branch, refactoring the StatusStrip's DefaultPadding calculation to be dynamic instead of hardcoded. The changes improve layout consistency and prevent items from being pushed out of view due to fixed padding values.

Key changes:

  • Increased GripWidth constant from 12 to 15 pixels for better visual balance
  • Refactored DefaultPadding to dynamically calculate based on SizeGripBounds dimensions
  • Updated all unit and integration tests to reflect the new calculated values

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

FileDescription
src/System.Windows.Forms/System/Windows/Forms/Controls/ToolStrips/StatusStrip.csCore implementation: Changed GripWidth constant and refactored DefaultPadding calculation to use dynamic values based on SizeGripBounds
src/test/unit/System.Windows.Forms/System/Windows/Forms/StatusStripTests.csUpdated test expectations from hardcoded padding value of 14 to dynamically calculated value of 17, and adjusted all related size calculations
src/test/unit/System.Windows.Forms/System/Windows/Forms/AccessibleObjects/StatusStrip.StatusStripAccessibleObjectTests.csUpdated test data for vertical overflow sizes to account for new padding calculations, and adjusted ToolStripStatusLabel size
src/test/integration/DesignSurface/DemoConsole/MainForm.csAdded StatusStrip demonstration with two labels to surface#5, increased form width from 800 to 900 to accommodate the new control

@codecov
Copy link

codecovbot commentedDec 9, 2025

Codecov Report

❌ Patch coverage is97.77778% with1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.10704%. Comparing base (bb08309) to head (07e87c6).

Additional details and impacted files
@@                  Coverage Diff                   @@##           release/10.0      #14121         +/-   ##======================================================+ Coverage      77.10691%   77.10704%   +0.00012%======================================================  Files              3273        3273                   Lines            645033      645041          +8       Branches          47701       47703          +2     ======================================================+ Hits             497365      497372          +7+ Misses           143989      143988          -1- Partials           3679        3681          +2
FlagCoverage Δ
Debug77.10704% <97.77778%> (+0.00012%)⬆️
integration18.97578% <0.00000%> (-0.00540%)⬇️
production51.92748% <90.00000%> (+0.00098%)⬆️
test97.40998% <100.00000%> (ø)
unit49.34639% <90.00000%> (+0.00140%)⬆️

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 freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@KlausLoeffelmannKlausLoeffelmannAwaiting requested review from KlausLoeffelmann

@merriemcgawmerriemcgawAwaiting requested review from merriemcgaw

@Shyam-GuptaShyam-GuptaAwaiting requested review from Shyam-Gupta

At least 1 approving review is required to merge this pull request.

Assignees

@LeafShi1LeafShi1

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@LeafShi1

[8]ページ先頭

©2009-2025 Movatter.jp