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

Unified Diff: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc

Issue 6933037: Multi-tab selection for Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing unused include Created 9 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
Index: chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
diff --git a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
index 95336a16187a0392403e6425221f4b16e013ba9e..c32bb6790eb3137adfb79f2c952f9d9f2e974975 100644
--- a/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc
@@ -349,6 +349,10 @@ bool TabRendererGtk::is_blocked() const {
return data_.blocked;
}
+bool TabRendererGtk::IsActive() const {
+ return true;
+}
+
bool TabRendererGtk::IsSelected() const {
return true;
}
@@ -390,7 +394,7 @@ void TabRendererGtk::PaintFaviconArea(GdkEventExpose* event) {
// Paint the background behind the favicon.
int theme_id;
int offset_y = 0;
- if (IsSelected()) {
+ if (IsActive()) {
theme_id = IDR_THEME_TOOLBAR;
} else {
if (!data_.incognito) {
@@ -407,7 +411,7 @@ void TabRendererGtk::PaintFaviconArea(GdkEventExpose* event) {
favicon_bounds_.x(), favicon_bounds_.y(),
favicon_bounds_.width(), favicon_bounds_.height());
- if (!IsSelected()) {
+ if (!IsActive()) {
double throb_value = GetThrobValue();
if (throb_value > 0) {
SkRect bounds;
@@ -434,7 +438,7 @@ bool TabRendererGtk::ShouldShowIcon() const {
return true;
} else if (!data_.show_icon) {
return false;
- } else if (IsSelected()) {
+ } else if (IsActive()) {
// The selected tab clips favicon before close button.
sky 2011/06/23 18:14:03 selected -> active
dpapad 2011/06/23 19:56:02 Done.
return IconCapacity() >= 2;
}
@@ -822,7 +826,7 @@ void TabRendererGtk::PaintTitle(gfx::Canvas* canvas) {
Browser::FormatTitleForDisplay(&title);
}
- SkColor title_color = IsSelected() ? selected_title_color_
+ SkColor title_color = IsActive() ? selected_title_color_
sky 2011/06/23 18:14:03 On windows we use IsSelected for this one.
dpapad 2011/06/23 19:56:02 Done.
: unselected_title_color_;
canvas->DrawStringInt(title, *title_font_, title_color,
title_bounds_.x(), title_bounds_.y(),
@@ -879,7 +883,7 @@ void TabRendererGtk::PaintIcon(gfx::Canvas* canvas) {
}
void TabRendererGtk::PaintTabBackground(gfx::Canvas* canvas) {
- if (IsSelected()) {
+ if (IsActive()) {
PaintActiveTabBackground(canvas);
} else {
PaintInactiveTabBackground(canvas);
@@ -904,6 +908,8 @@ void TabRendererGtk::PaintInactiveTabBackground(gfx::Canvas* canvas) {
int tab_id = data_.incognito ?
IDR_THEME_TAB_BACKGROUND_INCOGNITO : IDR_THEME_TAB_BACKGROUND;
+ if (IsSelected())
+ tab_id = IDR_THEME_TAB_BACKGROUND_V;
SkBitmap* tab_bg = theme_service_->GetBitmapNamed(tab_id);
@@ -992,7 +998,7 @@ int TabRendererGtk::IconCapacity() const {
bool TabRendererGtk::ShouldShowCloseBox() const {
// The selected tab never clips close button.
- return !mini() && (IsSelected() || IconCapacity() >= 3);
+ return !mini() && (IsActive() || IconCapacity() >= 3);
}
CustomDrawButton* TabRendererGtk::MakeCloseButton() {

Powered by Google App Engine
This is Rietveld 408576698