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

Unified Diff: chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc

Issue 1234223005: Initial gtk3 support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed abort on GtkPrintUnixDialog Created 5 years, 5 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
Index: chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
diff --git a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
index b7c931a5aadbb095d51b9153c4dac9ba5ac1cb14..55f3713cdb3fab372551e6e3cff3d98f5df142c6 100644
--- a/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
+++ b/chrome/browser/ui/libgtk2ui/native_theme_gtk2.cc
@@ -495,41 +495,13 @@ GtkStyle* NativeThemeGtk2::GetMenuItemStyle() const {
}
void NativeThemeGtk2::PaintComboboxArrow(SkCanvas* canvas,
- GtkStateType state,
+ GtkStateFlags state,
const gfx::Rect& rect) const {
- GdkPixmap* pm = gdk_pixmap_new(gtk_widget_get_window(GetRealizedWindow()),
- rect.width(),
- rect.height(),
- -1);
- // Paint the background.
- gtk_paint_flat_box(GetWindowStyle(),
- pm,
- state,
- GTK_SHADOW_NONE,
- NULL,
- GetRealizedWindow(),
- NULL, 0, 0, rect.width(), rect.height());
- gtk_paint_arrow(GetWindowStyle(),
- pm,
- state,
- GTK_SHADOW_NONE,
- NULL,
- GetRealizedWindow(),
- NULL,
- GTK_ARROW_DOWN,
- true,
- 0, 0, rect.width(), rect.height());
- GdkPixbuf* pb = gdk_pixbuf_get_from_drawable(NULL,
- pm,
- gdk_drawable_get_colormap(pm),
- 0, 0,
- 0, 0,
- rect.width(), rect.height());
- SkBitmap arrow = GdkPixbufToImageSkia(pb);
- canvas->drawBitmap(arrow, rect.x(), rect.y());
+ SkBitmap arrow;
+ arrow.allocN32Pixels(rect.width(), rect.height());
+ arrow.eraseColor(0);
- g_object_unref(pb);
- g_object_unref(pm);
+ canvas->drawBitmap(arrow, rect.x(), rect.y());
}
} // namespace libgtk2ui

Powered by Google App Engine
This is Rietveld 408576698