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

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

Issue 2073523002: [Mac][Material Design] Fix problem with tab close button redraw. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 596
597 - (SkColor)closeButtonColor { 597 - (SkColor)closeButtonColor {
598 return [[controller_ closeButton] iconColor]; 598 return [[controller_ closeButton] iconColor];
599 } 599 }
600 600
601 - (void)setState:(NSCellStateValue)state { 601 - (void)setState:(NSCellStateValue)state {
602 if (state_ == state) 602 if (state_ == state)
603 return; 603 return;
604 state_ = state; 604 state_ = state;
605 [self setNeedsDisplay:YES]; 605 [self setNeedsDisplay:YES];
606 [closeButton_ setNeedsDisplay:YES];
606 } 607 }
607 608
608 - (void)setClosing:(BOOL)closing { 609 - (void)setClosing:(BOOL)closing {
609 closing_ = closing; // Safe because the property is nonatomic. 610 closing_ = closing; // Safe because the property is nonatomic.
610 // When closing, ensure clicks to the close button go nowhere. 611 // When closing, ensure clicks to the close button go nowhere.
611 if (closing) { 612 if (closing) {
612 [closeButton_ setTarget:nil]; 613 [closeButton_ setTarget:nil];
613 [closeButton_ setAction:nil]; 614 [closeButton_ setAction:nil];
614 } 615 }
615 } 616 }
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 NSAffineTransform* transform = [NSAffineTransform transform]; 946 NSAffineTransform* transform = [NSAffineTransform transform];
946 [transform scaleXBy:-1 yBy:1]; 947 [transform scaleXBy:-1 yBy:1];
947 [transform translateXBy:-17.5 yBy:-0.25]; 948 [transform translateXBy:-17.5 yBy:-0.25];
948 [bezierPath transformUsingAffineTransform:transform]; 949 [bezierPath transformUsingAffineTransform:transform];
949 950
950 [[NSColor whiteColor] set]; 951 [[NSColor whiteColor] set];
951 [bezierPath fill]; 952 [bezierPath fill];
952 } 953 }
953 954
954 @end // @implementation TabView(MaterialDesign) 955 @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