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

Unified Diff: chrome/browser/gtk/nine_box.cc

Issue 115438: Linux: Just enough toolbar theming to make everything look normal again.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « chrome/browser/gtk/nine_box.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/nine_box.cc
===================================================================
--- chrome/browser/gtk/nine_box.cc (revision 16275)
+++ chrome/browser/gtk/nine_box.cc (working copy)
@@ -4,7 +4,9 @@
#include "chrome/browser/gtk/nine_box.h"
+#include "app/gfx/gtk_util.h"
#include "app/resource_bundle.h"
+#include "app/theme_provider.h"
#include "base/gfx/gtk_util.h"
#include "base/gfx/point.h"
#include "base/logging.h"
@@ -26,6 +28,10 @@
cairo_fill(cr);
}
+GdkPixbuf* GetPixbufNamed(ThemeProvider* theme_provider, int name) {
+ return gfx::GdkPixbufFromSkBitmap(theme_provider->GetBitmapNamed(name));
+}
+
} // namespace
NineBox::NineBox(int top_left, int top, int top_right, int left, int center,
@@ -42,6 +48,29 @@
images_[8] = bottom_right ? rb.GetPixbufNamed(bottom_right) : NULL;
}
+NineBox::NineBox(ThemeProvider* theme_provider,
+ int top_left, int top, int top_right, int left, int center,
+ int right, int bottom_left, int bottom, int bottom_right) {
+ images_[0] = top_left ?
+ GetPixbufNamed(theme_provider, top_left) : NULL;
+ images_[1] = top ?
+ GetPixbufNamed(theme_provider, top) : NULL;
+ images_[2] = top_right ?
+ GetPixbufNamed(theme_provider, top_right) : NULL;
+ images_[3] = left ?
+ GetPixbufNamed(theme_provider, left) : NULL;
+ images_[4] = center ?
+ GetPixbufNamed(theme_provider, center) : NULL;
+ images_[5] = right ?
+ GetPixbufNamed(theme_provider, right) : NULL;
+ images_[6] = bottom_left ?
+ GetPixbufNamed(theme_provider, bottom_left) : NULL;
+ images_[7] = bottom ?
+ GetPixbufNamed(theme_provider, bottom) : NULL;
+ images_[8] = bottom_right ?
+ GetPixbufNamed(theme_provider, bottom_right) : NULL;
+}
+
NineBox::~NineBox() {
}
« no previous file with comments | « chrome/browser/gtk/nine_box.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698