summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 09:59:31 +0000
committervarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-24 09:59:31 +0000
commit7794b5c3e9daeb3fb72e2af785cac3714584aee6 (patch)
tree4b0bceb73540ceb30e1708d4377c9b8465ed86fd
parent3c0d25a46373041316cb0be672236e05dfe0271a (diff)
downloadchromium_src-7794b5c3e9daeb3fb72e2af785cac3714584aee6.zip
chromium_src-7794b5c3e9daeb3fb72e2af785cac3714584aee6.tar.gz
chromium_src-7794b5c3e9daeb3fb72e2af785cac3714584aee6.tar.bz2
Make inactive tab background 90% opaque for chromeos.
BUG=137351 TEST=manual Review URL: https://chromiumcodereview.appspot.com/10871045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153179 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/tabs/tab_strip.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 88af36e..67fe7bcb 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -69,6 +69,12 @@ static const int kNativeFrameInactiveTabAlpha = 200;
// even more transparent.
static const int kNativeFrameInactiveTabAlphaMultiSelection = 150;
+#if defined(USE_ASH)
+static const int kInactiveTabAlpha = 230;
+#else
+static const int kInactiveTabAlpha = 255;
+#endif
+
// Inverse ratio of the width of a tab edge to the width of the tab. When
// hovering over the left or right edge of a tab, the drop indicator will
// point between tabs.
@@ -1164,6 +1170,9 @@ void TabStrip::PaintChildren(gfx::Canvas* canvas) {
// painting changes as we switch between the two.
bool stacking = layout_type_ == TAB_STRIP_LAYOUT_STACKED;
+ if (kInactiveTabAlpha < 255)
+ canvas->SaveLayerAlpha(kInactiveTabAlpha);
+
PaintClosingTabs(canvas, tab_count());
for (int i = tab_count() - 1; i >= 0; --i) {
@@ -1202,6 +1211,8 @@ void TabStrip::PaintChildren(gfx::Canvas* canvas) {
tab->Paint(canvas);
}
}
+ if (kInactiveTabAlpha < 255)
+ canvas->Restore();
if (GetWidget()->ShouldUseNativeFrame()) {
bool multiple_tabs_selected = (!selected_tabs.empty() ||