[libhandy] stackable-box: Skip children with 0 size
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] stackable-box: Skip children with 0 size
- Date: Fri, 12 Jun 2020 16:42:53 +0000 (UTC)
commit cb7b63d2bdec2a63c80859747189e9bb5c898f17
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Fri Jun 12 19:12:14 2020 +0500
stackable-box: Skip children with 0 size
Specifically, non-revealed revealers.
Signed-off-by: Alexander Mikhaylenko <alexm gnome org>
src/hdy-stackable-box.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/hdy-stackable-box.c b/src/hdy-stackable-box.c
index 56020304..dd64e091 100644
--- a/src/hdy-stackable-box.c
+++ b/src/hdy-stackable-box.c
@@ -2053,6 +2053,9 @@ hdy_stackable_box_size_allocate (HdyStackableBox *self,
if (!child_info->widget)
continue;
+ if (child_info->nat.width <= 0)
+ continue;
+
nat_box_size += child_info->nat.width;
nat_max_size = MAX (nat_max_size, child_info->nat.width);
visible_children++;
@@ -2069,6 +2072,9 @@ hdy_stackable_box_size_allocate (HdyStackableBox *self,
if (!child_info->widget)
continue;
+ if (child_info->nat.height <= 0)
+ continue;
+
nat_box_size += child_info->nat.height;
nat_max_size = MAX (nat_max_size, child_info->nat.height);
visible_children++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]