[gtk+/overlay: 34/34] GtkOverlay: handle GTK_ALIGN_FILL in a meaningful way
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/overlay: 34/34] GtkOverlay: handle GTK_ALIGN_FILL in a meaningful way
- Date: Sat, 11 Jun 2011 01:01:30 +0000 (UTC)
commit 5bc72150aa5c6d7f26252638ac83af71ef73b1ea
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jun 10 20:54:58 2011 -0400
GtkOverlay: handle GTK_ALIGN_FILL in a meaningful way
gtk/gtkoverlay.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkoverlay.c b/gtk/gtkoverlay.c
index 7162898..0b5f8e8 100644
--- a/gtk/gtkoverlay.c
+++ b/gtk/gtkoverlay.c
@@ -308,9 +308,11 @@ gtk_overlay_size_allocate (GtkWidget *widget,
switch (effective_align (halign, direction))
{
case GTK_ALIGN_START:
- case GTK_ALIGN_FILL:
/* nothing to do */
break;
+ case GTK_ALIGN_FILL:
+ alloc.width = main_alloc.width - 2 * child->x_offset;
+ break;
case GTK_ALIGN_CENTER:
alloc.x += main_alloc.width / 2 - req.width / 2;
break;
@@ -327,9 +329,11 @@ gtk_overlay_size_allocate (GtkWidget *widget,
switch (gtk_widget_get_valign (child->widget))
{
case GTK_ALIGN_START:
- case GTK_ALIGN_FILL:
/* nothing to do */
break;
+ case GTK_ALIGN_FILL:
+ alloc.height = main_alloc.height - 2 * child->y_offset;
+ break;
case GTK_ALIGN_CENTER:
alloc.y += main_alloc.height / 2 - req.height / 2;
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]