Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm

Issue 2709563002: [tab_grid] Hack-in border for active tab. (Closed)
Patch Set: [tab_grid] Hack-in border for active tab. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm
index bf3f9f2a0903d91941caa85d9a1f67eaf6ff2277..0ebde50a27c7a3ee8655f79ef3076c111c357c8b 100644
--- a/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm
+++ b/ios/chrome/browser/ui/tab_switcher/tab_switcher_panel_cell.mm
@@ -75,6 +75,19 @@ CGFloat tabSwitcherLocalSessionCellTopBarHeight() {
return self;
}
+// PLACEHOLDER: This will be refined to UI mocks.
marq (ping after 24h) 2017/02/23 11:04:30 I don't want to put placeholder code into ios/chro
edchin 2017/02/23 17:41:54 Good suggestion. Done.
jif 2017/02/23 17:43:21 Or duplicate it in ios/clean?
+// Sets border around selected cell.
+- (void)setSelected:(BOOL)selected {
+ [super setSelected:selected];
+ if (selected) {
+ self.layer.cornerRadius = 2.0f;
+ self.layer.borderWidth = 4.0f;
+ self.layer.borderColor = self.tintColor.CGColor;
+ } else {
+ self.layer.borderWidth = 0.0f;
+ }
+}
+
- (void)layoutSubviews {
[super layoutSubviews];
[self updateShadow];

Powered by Google App Engine
This is Rietveld 408576698