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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 1510763002: More differentiation in multiselect mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « chrome/browser/ui/views/tabs/tab.cc ('k') | 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 #include "chrome/browser/ui/views/tabs/tab_strip.h" 5 #include "chrome/browser/ui/views/tabs/tab_strip.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 void TabStrip::SetImmersiveStyle(bool enable) { 920 void TabStrip::SetImmersiveStyle(bool enable) {
921 if (immersive_style_ == enable) 921 if (immersive_style_ == enable)
922 return; 922 return;
923 immersive_style_ = enable; 923 immersive_style_ = enable;
924 } 924 }
925 925
926 SkAlpha TabStrip::GetInactiveAlpha(bool for_new_tab_button) const { 926 SkAlpha TabStrip::GetInactiveAlpha(bool for_new_tab_button) const {
927 static const SkAlpha kInactiveTabAlphaAsh = 230; 927 static const SkAlpha kInactiveTabAlphaAsh = 230;
928 static const SkAlpha kInactiveTabAlphaGlass = 200; 928 static const SkAlpha kInactiveTabAlphaGlass = 200;
929 static const SkAlpha kInactiveTabAlphaOpaque = 255; 929 static const SkAlpha kInactiveTabAlphaOpaque = 255;
930 static const double kMultiSelectionMultiplier = 0.75; 930 static const double kMultiSelectionMultiplier = 0.6;
931 931
932 const chrome::HostDesktopType host_desktop_type = 932 const chrome::HostDesktopType host_desktop_type =
933 chrome::GetHostDesktopTypeForNativeView(GetWidget()->GetNativeView()); 933 chrome::GetHostDesktopTypeForNativeView(GetWidget()->GetNativeView());
934 SkAlpha base_alpha = kInactiveTabAlphaOpaque; 934 SkAlpha base_alpha = kInactiveTabAlphaOpaque;
935 if (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH) 935 if (host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH)
936 base_alpha = kInactiveTabAlphaAsh; 936 base_alpha = kInactiveTabAlphaAsh;
937 else if (GetWidget()->ShouldWindowContentsBeTransparent()) 937 else if (GetWidget()->ShouldWindowContentsBeTransparent())
938 base_alpha = kInactiveTabAlphaGlass; 938 base_alpha = kInactiveTabAlphaGlass;
939 return (for_new_tab_button || (GetSelectionModel().size() <= 1)) ? 939 return (for_new_tab_button || (GetSelectionModel().size() <= 1)) ?
940 base_alpha : static_cast<SkAlpha>(kMultiSelectionMultiplier * base_alpha); 940 base_alpha : static_cast<SkAlpha>(kMultiSelectionMultiplier * base_alpha);
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
2691 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point); 2691 ConvertPointToViewAndGetEventHandler(this, newtab_button_, point);
2692 if (view) 2692 if (view)
2693 return view; 2693 return view;
2694 } 2694 }
2695 Tab* tab = FindTabForEvent(point); 2695 Tab* tab = FindTabForEvent(point);
2696 if (tab) 2696 if (tab)
2697 return ConvertPointToViewAndGetEventHandler(this, tab, point); 2697 return ConvertPointToViewAndGetEventHandler(this, tab, point);
2698 } 2698 }
2699 return this; 2699 return this;
2700 } 2700 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698