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

Unified Diff: ui/base/gtk/tooltip_window_gtk.cc

Issue 8646002: GTK: Port ui/base/gtk to use avoid deprecated API and accessors (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased version to fix AUTHORS file merge problem Created 9 years, 1 month 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 | « ui/base/gtk/gtk_floating_container.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/gtk/tooltip_window_gtk.cc
diff --git a/ui/base/gtk/tooltip_window_gtk.cc b/ui/base/gtk/tooltip_window_gtk.cc
index 0a5900ff4d5c5aa4ebdd27c792084936c6ac9810..2ef65ee715279b0fe10e43ea42d91f758f5650ad 100644
--- a/ui/base/gtk/tooltip_window_gtk.cc
+++ b/ui/base/gtk/tooltip_window_gtk.cc
@@ -64,16 +64,18 @@ void TooltipWindowGtk::Init() {
// Paints our customized tooltip window.
gboolean TooltipWindowGtk::OnPaint(GtkWidget* widget, GdkEventExpose* event) {
- gtk_paint_flat_box(widget->style,
- widget->window,
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(widget, &allocation);
+ gtk_paint_flat_box(gtk_widget_get_style(widget),
+ gtk_widget_get_window(widget),
GTK_STATE_NORMAL,
GTK_SHADOW_OUT,
NULL,
widget,
"tooltip",
0, 0,
- widget->allocation.width,
- widget->allocation.height);
+ allocation.width,
+ allocation.height);
return FALSE;
}
@@ -81,11 +83,12 @@ gboolean TooltipWindowGtk::OnPaint(GtkWidget* widget, GdkEventExpose* event) {
// Style change handler.
void TooltipWindowGtk::OnStyleSet(GtkWidget* widget,
GtkStyle* previous_style) {
+ GtkStyle* style = gtk_widget_get_style(widget);
gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_),
- widget->style->ythickness,
- widget->style->ythickness,
- widget->style->xthickness,
- widget->style->xthickness);
+ style->ythickness,
+ style->ythickness,
+ style->xthickness,
+ style->xthickness);
gtk_widget_queue_draw(widget);
}
« no previous file with comments | « ui/base/gtk/gtk_floating_container.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698