Skip to content

Commit

Permalink
Add shadow to banners
Browse files Browse the repository at this point in the history
  • Loading branch information
tonisevener committed Nov 2, 2022
1 parent e139b2e commit 9997c9a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Wikipedia/Code/WMFAlertManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ open class WMFAlertManager: NSObject, RMessageProtocol, Themeable {
default:
messageView.titleTextColor = theme.colors.link
}

messageView.layer.shadowColor = theme.colors.shadow.cgColor
}

}
10 changes: 10 additions & 0 deletions Wikipedia/Third Party Code/RMessage/RMessageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,16 @@ - (void)setupDesign
[self setupTitleLabel];
[self setupSubTitleLabel];
[self setupButton];

if (self.messagePosition != RMessagePositionBottom) {
self.layer.shadowOffset = CGSizeMake(0, 2);
} else {
self.layer.shadowOffset = CGSizeMake(0, -2);
}
self.layer.shadowRadius = 5;
self.layer.shadowOpacity = 1.0;

self.clipsToBounds = NO;
}

- (void)setupLayout
Expand Down

0 comments on commit 9997c9a

Please sign in to comment.