Skip to content

Commit 76546d4

Browse files
committed
Fix disclosure button being outside its superview bounds. Issue 12729
The centerX constraint on the label was pushing the disclosure button outside the view's leading edge, making it barely clickable.
1 parent 0a4b3ea commit 76546d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sources/iTermDisclosableView.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ - (instancetype)initWithFrame:(NSRect)frameRect prompt:(NSString *)prompt messag
170170
[self addSubview:_textView];
171171
}
172172

173+
[_disclosureButton.leadingAnchor constraintEqualToAnchor:self.leadingAnchor].active = YES;
173174
[_disclosureButton.centerYAnchor constraintEqualToAnchor:_labelField.centerYAnchor].active = YES;
174175
[_labelField.leadingAnchor constraintEqualToAnchor:_disclosureButton.trailingAnchor constant:4].active = YES;
175-
[_labelField.centerXAnchor constraintEqualToAnchor:self.centerXAnchor].active = YES;
176176
[_labelField.topAnchor constraintEqualToAnchor:self.topAnchor].active = YES;
177177
if (_scrollView) {
178178
[_scrollView.leadingAnchor constraintEqualToAnchor:self.leadingAnchor constant:8].active = YES;

0 commit comments

Comments
 (0)