comparison finch/libgnt/gntwidget.c @ 15945:92fa7d6e75b0

A few more fixes for resizing.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 27 Mar 2007 03:50:04 +0000
parents 7db39d873d52
children 223a4fca43a1 1cedd520cd18
comparison
equal deleted inserted replaced
15944:1071320641b9 15945:92fa7d6e75b0
73 } 73 }
74 74
75 static gboolean 75 static gboolean
76 gnt_widget_dummy_confirm_size(GntWidget *widget, int width, int height) 76 gnt_widget_dummy_confirm_size(GntWidget *widget, int width, int height)
77 { 77 {
78 gboolean shadow;
78 if (width < widget->priv.minw || height < widget->priv.minh) 79 if (width < widget->priv.minw || height < widget->priv.minh)
79 return FALSE; 80 return FALSE;
80 if (widget->priv.width != width && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_X)) 81 shadow = gnt_widget_has_shadow(widget);
82 if (widget->priv.width + shadow != width && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_X))
81 return FALSE; 83 return FALSE;
82 if (widget->priv.height != height && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_Y)) 84 if (widget->priv.height + shadow != height && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_Y))
83 return FALSE; 85 return FALSE;
84 return TRUE; 86 return TRUE;
85 } 87 }
86 88
87 static gboolean 89 static gboolean