[gtk/wip/baedert/for-master: 49/54] frame: Remove need_resize logic
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 49/54] frame: Remove need_resize logic
- Date: Tue, 13 Oct 2020 03:55:32 +0000 (UTC)
commit bdb007f99e900dcf8e0dd85fbacbf83456c80b41
Author: Timm Bäder <mail baedert org>
Date: Sun Oct 11 18:57:10 2020 +0200
frame: Remove need_resize logic
gtk_widget_set_parent() will queue a resize anyway.
gtk/gtkframe.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
---
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index 748a25fad2..b53683a81c 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -380,7 +380,6 @@ gtk_frame_set_label_widget (GtkFrame *frame,
GtkWidget *label_widget)
{
GtkFramePrivate *priv = gtk_frame_get_instance_private (frame);
- gboolean need_resize = FALSE;
g_return_if_fail (GTK_IS_FRAME (frame));
g_return_if_fail (label_widget == NULL || GTK_IS_WIDGET (label_widget));
@@ -390,10 +389,7 @@ gtk_frame_set_label_widget (GtkFrame *frame,
return;
if (priv->label_widget)
- {
- need_resize = gtk_widget_get_visible (priv->label_widget);
- gtk_widget_unparent (priv->label_widget);
- }
+ gtk_widget_unparent (priv->label_widget);
priv->label_widget = label_widget;
@@ -401,12 +397,8 @@ gtk_frame_set_label_widget (GtkFrame *frame,
{
priv->label_widget = label_widget;
gtk_widget_set_parent (label_widget, GTK_WIDGET (frame));
- need_resize |= gtk_widget_get_visible (label_widget);
}
- if (gtk_widget_get_visible (GTK_WIDGET (frame)) && need_resize)
- gtk_widget_queue_resize (GTK_WIDGET (frame));
-
g_object_freeze_notify (G_OBJECT (frame));
g_object_notify_by_pspec (G_OBJECT (frame), frame_props[PROP_LABEL_WIDGET]);
g_object_notify_by_pspec (G_OBJECT (frame), frame_props[PROP_LABEL]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]