Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Commit aba3498

Browse files
codeman7material-automation
authored andcommitted
#Buttons Fix shadow not being the correct path.
PiperOrigin-RevId: 758702167
1 parent e28f9c5 commit aba3498

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/M3CButton/src/M3CButton.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ - (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated {
539539
if (@available(iOS 15.0, *)) {
540540
if (_buttonSizeSet) {
541541
[self updateCorners];
542+
[self updateShadows];
542543
}
543544
}
544545
};
@@ -603,7 +604,6 @@ - (void)traitCollectionDidChange:(nullable UITraitCollection *)previousTraitColl
603604
- (void)layoutSubviews {
604605
[super layoutSubviews];
605606
[self setCapsuleCornersBasedOn:self.frame.size];
606-
[self updateShadows];
607607
[self updateSymbolFont];
608608

609609
if (_buttonSizeSet) {
@@ -617,6 +617,7 @@ - (void)layoutSubviews {
617617
self.visualBackground.frame = self.bounds;
618618
}
619619
}
620+
[self updateShadows];
620621
}
621622

622623
- (void)setCapsuleCornersBasedOn:(CGSize)size {

0 commit comments

Comments
 (0)