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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_view.mm

Issue 2687633002: Fix using theme colors for the download shelf's close button. (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tabs/tab_view.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_view.mm b/chrome/browser/ui/cocoa/tabs/tab_view.mm
index f454cfb6a3e3e449167d9ec925cb3094894299dd..39df64487e05686ded55fb241a49254468caf26d 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_view.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_view.mm
@@ -613,6 +613,7 @@ CGFloat LineWidthFromContext(CGContextRef context) {
return;
[titleView_ setTextColor:titleColor];
[self setNeedsDisplayInRect:[titleView_ frame]];
+ [self updateAppearance];
}
- (BOOL)titleHidden {
@@ -646,11 +647,11 @@ CGFloat LineWidthFromContext(CGContextRef context) {
}
- (void)accessibilityOptionsDidChange:(id)ignored {
- [self updateLabelFont];
+ [self updateAppearance];
[self setNeedsDisplay:YES];
}
-- (void)updateLabelFont {
+- (void)updateAppearance {
CGFloat fontSize = [titleViewCell_ font].pointSize;
const ui::ThemeProvider* provider = [[self window] themeProvider];
if (provider && provider->ShouldIncreaseContrast() && state_ == NSOnState) {
@@ -658,15 +659,16 @@ CGFloat LineWidthFromContext(CGContextRef context) {
} else {
[titleViewCell_ setFont:[NSFont systemFontOfSize:fontSize]];
}
+
+ [closeButton_ setIconColor:[self iconColor]];
}
- (void)setState:(NSCellStateValue)state {
if (state_ == state)
return;
state_ = state;
- [self updateLabelFont];
+ [self updateAppearance];
[self setNeedsDisplay:YES];
- [closeButton_ setNeedsDisplay:YES];
}
- (void)setClosing:(BOOL)closing {
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698