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

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

Issue 2360343003: cocoa browser: remove non-material tabstrip support (Closed)
Patch Set: restyle fn Created 4 years, 3 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 | « no previous file | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tabs/tab_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
index bf5a68287a3980f8e261a4e80907e675ad51127c..b0c5deaf1b0b8bd4199a9d6ac3d308db0ae2d350 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller.mm
@@ -61,9 +61,6 @@ void ExecuteCommand(int command_id, int event_flags) override {
} // TabControllerInternal namespace
+ (CGFloat)defaultTabHeight {
- if (!ui::MaterialDesignController::IsModeMaterial()) {
- return 26;
- }
return 29;
}
@@ -73,12 +70,7 @@ + (CGFloat)defaultTabHeight {
// pixels on the side. The selected tab width includes the close button width.
+ (CGFloat)minTabWidth { return 36; }
+ (CGFloat)minActiveTabWidth { return 52; }
-+ (CGFloat)maxTabWidth {
- if (!ui::MaterialDesignController::IsModeMaterial()) {
- return 214;
- }
- return 246;
-}
++ (CGFloat)maxTabWidth { return 246; }
+ (CGFloat)pinnedTabWidth { return 58; }
@@ -89,14 +81,10 @@ - (TabView*)tabView {
- (id)init {
if ((self = [super init])) {
- bool isModeMaterial = ui::MaterialDesignController::IsModeMaterial();
// Icon.
// Remember the icon's frame, so that if the icon is ever removed, a new
// one can later replace it in the proper location.
originalIconFrame_ = NSMakeRect(18, 6, 16, 16);
- if (!isModeMaterial) {
- originalIconFrame_ = NSMakeRect(19, 5, 16, 16);
- }
iconView_.reset([[SpriteView alloc] initWithFrame:originalIconFrame_]);
[iconView_ setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin];
@@ -110,9 +98,6 @@ - (id)init {
// Close button.
NSRect closeButtonFrame = NSMakeRect(129, 6, 16, 16);
- if (!isModeMaterial) {
- closeButtonFrame = NSMakeRect(127, 4, 18, 18);
- }
closeButton_.reset([[HoverCloseButton alloc] initWithFrame:
closeButtonFrame]);
[closeButton_ setAutoresizingMask:NSViewMinXMargin];
@@ -416,10 +401,6 @@ - (void)updateVisibility {
if (newShowIcon) {
newTitleFrame.origin.x = NSMaxX([iconView_ frame]) + 4;
-
- if (!ui::MaterialDesignController::IsModeMaterial()) {
- newTitleFrame.origin.x -= 4;
- }
} else {
newTitleFrame.origin.x = originalIconFrame_.origin.x;
}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698