diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 02:33:51 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 02:33:51 +0000 |
commit | d07d1efa23c18b1e81e989439539a0e8483af26a (patch) | |
tree | abded7e00d11a021f1e375edaec8389397478977 /chrome/browser/gtk/tabs | |
parent | 72ea2411d2b872e9c620854265653b2d39968c18 (diff) | |
download | chromium_src-d07d1efa23c18b1e81e989439539a0e8483af26a.zip chromium_src-d07d1efa23c18b1e81e989439539a0e8483af26a.tar.gz chromium_src-d07d1efa23c18b1e81e989439539a0e8483af26a.tar.bz2 |
Paint the spy guy.
BUG=none
TEST=go incognito, toggle custom frame drawing
Review URL: http://codereview.chromium.org/146122
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19220 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs')
-rwxr-xr-x | chrome/browser/gtk/tabs/tab_strip_gtk.cc | 3 | ||||
-rw-r--r-- | chrome/browser/gtk/tabs/tab_strip_gtk.h | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc index 0867e8d..20e14ec 100755 --- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc @@ -622,7 +622,8 @@ gfx::Rect TabStripGtk::GetIdealBounds(int index) { gfx::Point TabStripGtk::GetTabStripOriginForWidget(GtkWidget* target) { int x, y; - if (!gtk_widget_translate_coordinates(widget(), target, 0, 0, &x, &y)) { + if (!gtk_widget_translate_coordinates(widget(), target, + -widget()->allocation.x, 0, &x, &y)) { // If the tab strip isn't showing, give the coordinates relative to the // toplevel instead. gtk_widget_translate_coordinates( diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.h b/chrome/browser/gtk/tabs/tab_strip_gtk.h index 01fbf39..aa731e8 100644 --- a/chrome/browser/gtk/tabs/tab_strip_gtk.h +++ b/chrome/browser/gtk/tabs/tab_strip_gtk.h @@ -74,9 +74,13 @@ class TabStripGtk : public TabStripModelObserver, // Retrieve the ideal bounds for the Tab at the specified index. gfx::Rect GetIdealBounds(int index); - // Return the origin of the tab strip in coordinates relative to the GdkWindow - // of |widget|. Used to help other widgets draw their background relative to - // the tabstrip. + // Return the origin of the tab strip in coordinates relative to where we + // start drawing the background theme image. This is the x coordinate of + // the origin of the GdkWindow of widget(), but the y coordinate of the origin + // of widget() itself. + // Used to help other widgets draw their background relative to the tabstrip. + // Should only be called after both the tabstrip and |widget| have been + // allocated. gfx::Point GetTabStripOriginForWidget(GtkWidget* widget); protected: |