summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-09 01:14:29 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-09 01:14:29 +0000
commita2ac1f5ab862f38704bd03813eaac001169f9aa0 (patch)
treeb78534c7798d4d2ae99aa8067616e217effda1dd /chrome
parente8cebdcccc324f2dd16e08e24a589150ca45b85f (diff)
downloadchromium_src-a2ac1f5ab862f38704bd03813eaac001169f9aa0.zip
chromium_src-a2ac1f5ab862f38704bd03813eaac001169f9aa0.tar.gz
chromium_src-a2ac1f5ab862f38704bd03813eaac001169f9aa0.tar.bz2
linux: offset toolbar graphic so tabs merge in properly.
Review URL: http://codereview.chromium.org/63148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13401 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gtk/browser_toolbar_gtk.cc3
-rw-r--r--chrome/browser/gtk/nine_box.cc8
-rw-r--r--chrome/browser/gtk/nine_box.h2
3 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc
index 0eca5b5..37cbd5d 100644
--- a/chrome/browser/gtk/browser_toolbar_gtk.cc
+++ b/chrome/browser/gtk/browser_toolbar_gtk.cc
@@ -270,7 +270,8 @@ gboolean BrowserToolbarGtk::OnContentAreaExpose(GtkWidget* widget,
GdkEventExpose* e,
BrowserToolbarGtk* toolbar) {
toolbar->background_ninebox_.get()->RenderTopCenterStrip(widget,
- 0, widget->allocation.width);
+ 0, widget->allocation.width, -2);
+
return FALSE; // Allow subwidgets to paint.
}
diff --git a/chrome/browser/gtk/nine_box.cc b/chrome/browser/gtk/nine_box.cc
index 5b8e45f..e2c42f6 100644
--- a/chrome/browser/gtk/nine_box.cc
+++ b/chrome/browser/gtk/nine_box.cc
@@ -68,7 +68,7 @@ void NineBox::RenderToWidget(GtkWidget* dst) {
if (images[0])
DrawPixbuf(dst, images[0], 0, 0);
if (images[1])
- RenderTopCenterStrip(dst, x1, x2);
+ RenderTopCenterStrip(dst, x1, x2, 0);
if (images[2])
DrawPixbuf(dst, images[2], x2, 0);
@@ -106,10 +106,10 @@ void NineBox::RenderToWidget(GtkWidget* dst) {
DrawPixbuf(dst, images[2], x2, y2);
}
-void NineBox::RenderTopCenterStrip(GtkWidget* dst, int x1, int x2) {
+void NineBox::RenderTopCenterStrip(GtkWidget* dst, int x1, int x2, int y1) {
TileImage(dst, images_[1],
- x1, 0,
- x2, 0);
+ x1, y1,
+ x2, y1);
}
void NineBox::TileImage(GtkWidget* dst, GdkPixbuf* src,
diff --git a/chrome/browser/gtk/nine_box.h b/chrome/browser/gtk/nine_box.h
index 47c5f78..cf15b81 100644
--- a/chrome/browser/gtk/nine_box.h
+++ b/chrome/browser/gtk/nine_box.h
@@ -31,7 +31,7 @@ class NineBox {
// Render the top row of images to |dst| between |x1| and |x2|.
// This is split from RenderToWidget so the toolbar can use it.
- void RenderTopCenterStrip(GtkWidget* dst, int x1, int x2);
+ void RenderTopCenterStrip(GtkWidget* dst, int x1, int x2, int y1);
private:
// Repeatedly stamp src across dst.