summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
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.