summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs/tab_strip_gtk.cc
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-23 00:37:27 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-23 00:37:27 +0000
commit8ee2adfed1b3c34d1031b1a0e4f8e0380f4e1707 (patch)
treed6f3616b6af66ea8c4aacff2df304a12d670bd4b /chrome/browser/gtk/tabs/tab_strip_gtk.cc
parent811430d640be417604665d1f73a4d02e9eb50f56 (diff)
downloadchromium_src-8ee2adfed1b3c34d1031b1a0e4f8e0380f4e1707.zip
chromium_src-8ee2adfed1b3c34d1031b1a0e4f8e0380f4e1707.tar.gz
chromium_src-8ee2adfed1b3c34d1031b1a0e4f8e0380f4e1707.tar.bz2
GTK: Change the vertical offsets in non-custom tab background images depending on how the window is configured.
This fixes the vertical positioning of transparent tabs when no tab background image was specified. BUG=34815 TEST=none Review URL: http://codereview.chromium.org/650076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs/tab_strip_gtk.cc')
-rw-r--r--chrome/browser/gtk/tabs/tab_strip_gtk.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
index cb63413..858b88b 100644
--- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
@@ -514,6 +514,7 @@ TabStripGtk::TabStripGtk(TabStripModel* model, BrowserWindowGtk* window)
current_selected_width_(TabGtk::GetStandardSize().width()),
available_width_for_tabs_(-1),
needs_resize_layout_(false),
+ tab_vertical_offset_(0),
model_(model),
window_(window),
theme_provider_(GtkThemeProvider::GetFrom(model->profile())),
@@ -612,6 +613,7 @@ void TabStripGtk::Layout() {
const gfx::Rect& bounds = tab_data_.at(i).ideal_bounds;
TabGtk* tab = GetTabAt(i);
tab->set_animating_pinned_change(false);
+ tab->set_vertical_offset(tab_vertical_offset_);
SetTabBounds(tab, bounds);
tab_right = bounds.right();
tab_right += GetTabHOffset(i + 1);
@@ -702,6 +704,11 @@ gfx::Rect TabStripGtk::GetIdealBounds(int index) {
return tab_data_.at(index).ideal_bounds;
}
+void TabStripGtk::SetVerticalOffset(int offset) {
+ tab_vertical_offset_ = offset;
+ Layout();
+}
+
gfx::Point TabStripGtk::GetTabStripOriginForWidget(GtkWidget* target) {
int x, y;
if (!gtk_widget_translate_coordinates(widget(), target,