[gtk+] GtkViewport: Don't do silly things in a setter
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkViewport: Don't do silly things in a setter
- Date: Mon, 9 Jun 2014 17:52:22 +0000 (UTC)
commit b22b2298be235722bc68190ba3234a813540cb84
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 9 13:51:58 2014 -0400
GtkViewport: Don't do silly things in a setter
Just queue a resize instead of fiddling with the size allocation.
gtk/gtkviewport.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index edba7aa..f0ac9b0 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -617,13 +617,7 @@ gtk_viewport_set_shadow_type (GtkViewport *viewport,
{
priv->shadow_type = type;
- if (gtk_widget_is_drawable (widget))
- {
- gtk_widget_get_allocation (widget, &allocation);
- gtk_widget_size_allocate (widget, &allocation);
- gtk_widget_set_allocation (widget, &allocation);
- gtk_widget_queue_draw (widget);
- }
+ gtk_widget_queue_resize (widget);
g_object_notify (G_OBJECT (viewport), "shadow-type");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]