diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2015-12-28 12:21:27 -0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2015-12-28 12:21:27 -0800 |
commit | 8f3e0c3d51304f69fb21dfa6d919033ba8ee60e2 (patch) | |
tree | f53a67e878c640966f947d0c2eb4946204127c47 | |
parent | 210458389de463610d8f448034a6b3a588663442 (diff) | |
download | gtk+-wip/cosimoc/viewport-gadget.tar.gz |
viewport: don't render a background over the bin windowwip/cosimoc/viewport-gadget
GtkViewport currently tries to draw a background over the bin window.
The feature is a bit broken at the moment, as it does not take into
account padding that might have been set on the GtkViewport, but in
general it does not seem very useful, and goes somewhat against the CSS
box model where every widget/gadget is responsible to draw its own
background. For a fix, we could either have the viewport gain a "bin"
gadget, or we could stop drawing the background.
As it isn't clear that there are any users of this feature, stop drawing
the background; a client can achieve the same effect by drawing the
background on the widget inside the viewport itself.
-rw-r--r-- | gtk/gtkviewport.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 1fe575f6c1..7a67fb8de9 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -321,17 +321,6 @@ draw_bin (cairo_t *cr, gpointer user_data) { GtkWidget *widget = GTK_WIDGET (user_data); - GtkViewport *viewport = GTK_VIEWPORT (widget); - GtkViewportPrivate *priv = viewport->priv; - GtkStyleContext *context; - int x, y; - - context = gtk_widget_get_style_context (widget); - - gdk_window_get_position (priv->bin_window, &x, &y); - gtk_render_background (context, cr, x, y, - gdk_window_get_width (priv->bin_window), - gdk_window_get_height (priv->bin_window)); GTK_WIDGET_CLASS (gtk_viewport_parent_class)->draw (widget, cr); } |