[libhandy/wip/exalm/leaflet-transltions: 3/10] stackable-box: Reduce amount of set_child_visible() calls
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/wip/exalm/leaflet-transltions: 3/10] stackable-box: Reduce amount of set_child_visible() calls
- Date: Sun, 31 May 2020 17:02:48 +0000 (UTC)
commit 11b3c2f29da89d0ad52650f1ec07735ff4a4eec7
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri May 29 00:34:59 2020 +0500
stackable-box: Reduce amount of set_child_visible() calls
Only call it once for each child per allocation, this will prevent spurious
signal emissions later.
Signed-off-by: Alexander Mikhaylenko <alexm gnome org>
src/hdy-stackable-box.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/hdy-stackable-box.c b/src/hdy-stackable-box.c
index a9cd5b7f..66ee138f 100644
--- a/src/hdy-stackable-box.c
+++ b/src/hdy-stackable-box.c
@@ -1455,7 +1455,7 @@ hdy_stackable_box_size_allocate_folded (HdyStackableBox *self,
child_info->widget == self->last_visible_child->widget)
continue;
- gtk_widget_set_child_visible (child_info->widget, FALSE);
+ child_info->visible = FALSE;
}
if (visible_child->widget == NULL)
@@ -1463,12 +1463,12 @@ hdy_stackable_box_size_allocate_folded (HdyStackableBox *self,
/* FIXME is this needed? */
if (!gtk_widget_get_visible (visible_child->widget)) {
- gtk_widget_set_child_visible (visible_child->widget, FALSE);
+ visible_child->visible = FALSE;
return;
}
- gtk_widget_set_child_visible (visible_child->widget, TRUE);
+ visible_child->visible = TRUE;
mode_transition_type = self->transition_type;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]