[epiphany] gedit-overlay: always proxy main widget size request
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] gedit-overlay: always proxy main widget size request
- Date: Wed, 16 Feb 2011 12:05:48 +0000 (UTC)
commit 6087d7632df9c47377731b851022661bddcbf9e4
Author: Xan Lopez <xan gnome org>
Date: Wed Feb 16 13:03:33 2011 +0100
gedit-overlay: always proxy main widget size request
We don't want for the children to be able to overflow the main widget,
it makes sense to keep them contained in the overlay.
Bug #642451
lib/widgets/gedit-overlay.c | 30 ++++--------------------------
1 files changed, 4 insertions(+), 26 deletions(-)
---
diff --git a/lib/widgets/gedit-overlay.c b/lib/widgets/gedit-overlay.c
index 16ee8cf..902f13d 100644
--- a/lib/widgets/gedit-overlay.c
+++ b/lib/widgets/gedit-overlay.c
@@ -150,24 +150,13 @@ gedit_overlay_get_preferred_width (GtkWidget *widget,
gint *natural)
{
GeditOverlayPrivate *priv = GEDIT_OVERLAY (widget)->priv;
- GtkWidget *child;
- GSList *children;
- gint child_min, child_nat;
*minimum = 0;
*natural = 0;
- for (children = priv->children; children; children = children->next)
+ if (priv->main_widget)
{
- child = children->data;
-
- if (!gtk_widget_get_visible (child))
- continue;
-
- gtk_widget_get_preferred_width (child, &child_min, &child_nat);
-
- *minimum = MAX (*minimum, child_min);
- *natural = MAX (*natural, child_nat);
+ gtk_widget_get_preferred_width (priv->main_widget, minimum, natural);
}
}
@@ -177,24 +166,13 @@ gedit_overlay_get_preferred_height (GtkWidget *widget,
gint *natural)
{
GeditOverlayPrivate *priv = GEDIT_OVERLAY (widget)->priv;
- GtkWidget *child;
- GSList *children;
- gint child_min, child_nat;
*minimum = 0;
*natural = 0;
- for (children = priv->children; children; children = children->next)
+ if (priv->main_widget)
{
- child = children->data;
-
- if (!gtk_widget_get_visible (child))
- continue;
-
- gtk_widget_get_preferred_height (child, &child_min, &child_nat);
-
- *minimum = MAX (*minimum, child_min);
- *natural = MAX (*natural, child_nat);
+ gtk_widget_get_preferred_height (priv->main_widget, minimum, natural);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]