winforms icon indicating copy to clipboard operation
winforms copied to clipboard

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

Open LeafShi1 opened this issue 1 month ago • 1 comments

Backport https://github.com/dotnet/winforms/pull/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 on SizingGripBounds.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?

  • Yes- regression PR https://github.com/dotnet/winforms/pull/13620

Risk

  • Low

Test methodology

  • Manual testing
  • Unit tests

LeafShi1 avatar Dec 09 '25 02:12 LeafShi1

Codecov Report

:x: Patch coverage is 97.77778% with 1 line in your changes missing coverage. Please review. :white_check_mark: 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     
Flag Coverage Δ
Debug 77.10704% <97.77778%> (+0.00012%) :arrow_up:
integration 18.97578% <0.00000%> (-0.00540%) :arrow_down:
production 51.92748% <90.00000%> (+0.00098%) :arrow_up:
test 97.40998% <100.00000%> (ø)
unit 49.34639% <90.00000%> (+0.00140%) :arrow_up:

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

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

codecov[bot] avatar Dec 09 '25 03:12 codecov[bot]