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

Unified Diff: chrome/browser/views/tabs/side_tab.cc

Issue 2821011: Removes phantom tabs. (Closed)
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/tabs/dragged_tab_controller.cc ('k') | chrome/browser/views/tabs/tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/side_tab.cc
diff --git a/chrome/browser/views/tabs/side_tab.cc b/chrome/browser/views/tabs/side_tab.cc
index c2448d2fc8cc991c1a8b7d392d8a1bb4ea96ad75..d8d54f40d8528d8fa6abe6ac2fa6a057a955a5be 100644
--- a/chrome/browser/views/tabs/side_tab.cc
+++ b/chrome/browser/views/tabs/side_tab.cc
@@ -21,16 +21,12 @@ const int kTitleCloseSpacing = 4;
const SkScalar kRoundRectRadius = 4;
const SkColor kTabBackgroundColor = SK_ColorWHITE;
const SkColor kTextColor = SK_ColorBLACK;
-const SkColor kPhantomTextColor = SK_ColorGRAY;
// Padding between the edge and the icon.
const int kIconLeftPadding = 5;
// Location the title starts at.
const int kTitleX = kIconLeftPadding + kFavIconSize + 5;
-
-// Alpha value phantom tab icons are rendered at.
-const int kPhantomTabIconAlpha = 100;
};
////////////////////////////////////////////////////////////////////////////////
@@ -95,20 +91,10 @@ void SideTab::Paint(gfx::Canvas* canvas) {
SkIntToScalar(kRoundRectRadius), paint);
}
- if (ShouldShowIcon()) {
- if (data().phantom) {
- SkRect bounds;
- bounds.set(0, 0, SkIntToScalar(width()), SkIntToScalar(height()));
- canvas->saveLayerAlpha(&bounds, kPhantomTabIconAlpha,
- SkCanvas::kARGB_ClipLayer_SaveFlag);
- PaintIcon(canvas, icon_bounds_.x(), icon_bounds_.y());
- canvas->restore();
- } else {
- PaintIcon(canvas, icon_bounds_.x(), icon_bounds_.y());
- }
- }
+ if (ShouldShowIcon())
+ PaintIcon(canvas, icon_bounds_.x(), icon_bounds_.y());
- PaintTitle(canvas, data().phantom ? kPhantomTextColor : kTextColor);
+ PaintTitle(canvas, kTextColor);
}
gfx::Size SideTab::GetPreferredSize() {
« no previous file with comments | « chrome/browser/views/tabs/dragged_tab_controller.cc ('k') | chrome/browser/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698