[gtk/wip/baedert/for-master] viewport: Small cleanup
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master] viewport: Small cleanup
- Date: Sun, 27 Dec 2020 17:21:31 +0000 (UTC)
commit 50aee7ab6ce7fa69e2233bc485d8b0b002fe05b4
Author: Timm Bäder <mail baedert org>
Date: Sun Dec 27 18:05:44 2020 +0100
viewport: Small cleanup
No need to check for visibility before calling gtk_widget_measure().
gtk/gtkviewport.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 42bf850864..0581a95e9d 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -71,7 +71,7 @@ struct _GtkViewport
GtkAdjustment *hadjustment;
GtkAdjustment *vadjustment;
-
+
/* GtkScrollablePolicy needs to be checked when
* driving the scrollable adjustment values */
guint hscroll_policy : 1;
@@ -244,9 +244,7 @@ gtk_viewport_measure (GtkWidget *widget,
{
GtkViewport *viewport = GTK_VIEWPORT (widget);
- *minimum = *natural = 0;
-
- if (viewport->child && gtk_widget_get_visible (viewport->child))
+ if (viewport->child)
gtk_widget_measure (viewport->child,
orientation,
for_size,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]