Skip to content

Commit cbe32d1

Browse files
committed
review feedback
1 parent a19db12 commit cbe32d1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/System.Windows.Forms.Design/src/System/ComponentModel/Design/DesignerActionPanel.TextBoxPropertyLine.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ public override Size LayoutControls(int top, int width, bool measureOnly)
117117
_label!.Location = new Point(LineLeftMargin, top);
118118
int labelPreferredWidth = _label.GetPreferredSize(new Size(int.MaxValue, int.MaxValue)).Width;
119119
_label.Size = new Size(labelPreferredWidth, height);
120-
int specialPadding = 0;
121-
if (EditControl is TextBox)
122-
{
123-
specialPadding = 2;
124-
}
120+
int specialPadding = EditControl is TextBox ? 2 : 0;
125121

126122
EditControl!.Location = new Point(_editRegionLocation.X + GetTextBoxLeftPadding(textBoxPreferredHeight) + 1 + specialPadding, _editRegionLocation.Y + TextBoxLineInnerPadding + 1);
127123
EditControl.Width = _editRegionSize.Width - GetTextBoxRightPadding(textBoxPreferredHeight) - GetTextBoxLeftPadding(textBoxPreferredHeight) - specialPadding;

0 commit comments

Comments
 (0)