[libhandy] stackable-box: Fix allocation during mode transitions
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] stackable-box: Fix allocation during mode transitions
- Date: Fri, 19 Jun 2020 12:13:36 +0000 (UTC)
commit 31af86acb52538390e102e2ca05f781775dbfa7d
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Jun 18 23:43:04 2020 +0500
stackable-box: Fix allocation during mode transitions
On the very last frame the size doesn't change anymore, and
queue_resize() fails. Use get_allocate() instead, also clean up the
unused comments.
This will help to prevent glitches later with HdyHeaderGroup in
combination with
https://gitlab.gnome.org/GNOME/libhandy/-/merge_requests/480
Since all children will be visible during mode transitions,
HdyHeaderGroup will switch the decoration layout on the last frame of
the transition, and it's important that it gets a relayout it needs.
Signed-off-by: Alexander Mikhaylenko <alexm gnome org>
src/hdy-stackable-box.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
---
diff --git a/src/hdy-stackable-box.c b/src/hdy-stackable-box.c
index 0b9169dc..7b591f90 100644
--- a/src/hdy-stackable-box.c
+++ b/src/hdy-stackable-box.c
@@ -700,18 +700,7 @@ hdy_stackable_box_set_position (HdyStackableBox *self,
new_visible != gtk_widget_get_child_visible (child))
gtk_widget_set_child_visible (child, new_visible);
- /* FIXME Copied from GtkRevealer IIRC, check whether it's useful. */
- /* transition = effective_transition (self); */
- /* if (transition == GTK_REVEALER_TRANSITION_TYPE_CROSSFADE) { */
- /* gtk_widget_set_opacity (GTK_WIDGET (self->container), self->mode_transition.current_pos); */
- /* gtk_widget_queue_draw (GTK_WIDGET (self->container)); */
- /* } */
- /* else */
- gtk_widget_queue_resize (GTK_WIDGET (self->container));
- /* } */
-
- /* if (self->mode_transition.current_pos == self->mode_transition.target_pos) */
- /* g_object_notify_by_pspec (G_OBJECT (self), props[PROP_CHILD_REVEALED]); */
+ gtk_widget_queue_allocate (GTK_WIDGET (self->container));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]