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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_view.mm

Issue 2080973002: [Mac][Material Design] Fix problem with tab close button redraw. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" 5 #import "chrome/browser/ui/cocoa/tabs/tab_view.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/sdk_forward_declarations.h" 9 #include "base/mac/sdk_forward_declarations.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 597
598 - (SkColor)closeButtonColor { 598 - (SkColor)closeButtonColor {
599 return [[controller_ closeButton] iconColor]; 599 return [[controller_ closeButton] iconColor];
600 } 600 }
601 601
602 - (void)setState:(NSCellStateValue)state { 602 - (void)setState:(NSCellStateValue)state {
603 if (state_ == state) 603 if (state_ == state)
604 return; 604 return;
605 state_ = state; 605 state_ = state;
606 [self setNeedsDisplay:YES]; 606 [self setNeedsDisplay:YES];
607 [closeButton_ setNeedsDisplay:YES];
607 } 608 }
608 609
609 - (void)setClosing:(BOOL)closing { 610 - (void)setClosing:(BOOL)closing {
610 closing_ = closing; // Safe because the property is nonatomic. 611 closing_ = closing; // Safe because the property is nonatomic.
611 // When closing, ensure clicks to the close button go nowhere. 612 // When closing, ensure clicks to the close button go nowhere.
612 if (closing) { 613 if (closing) {
613 [closeButton_ setTarget:nil]; 614 [closeButton_ setTarget:nil];
614 [closeButton_ setAction:nil]; 615 [closeButton_ setAction:nil];
615 } 616 }
616 } 617 }
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 NSAffineTransform* transform = [NSAffineTransform transform]; 947 NSAffineTransform* transform = [NSAffineTransform transform];
947 [transform scaleXBy:-1 yBy:1]; 948 [transform scaleXBy:-1 yBy:1];
948 [transform translateXBy:-17.5 yBy:-0.25]; 949 [transform translateXBy:-17.5 yBy:-0.25];
949 [bezierPath transformUsingAffineTransform:transform]; 950 [bezierPath transformUsingAffineTransform:transform];
950 951
951 [[NSColor whiteColor] set]; 952 [[NSColor whiteColor] set];
952 [bezierPath fill]; 953 [bezierPath fill];
953 } 954 }
954 955
955 @end // @implementation TabView(MaterialDesign) 956 @end // @implementation TabView(MaterialDesign)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698