qulogic/libgnt
Clone
Summary
Browse
Changes
Graph
Tweak the box-resizing a bit.
2010-04-02, Sadrul Habib Chowdhury
e2e041e8e37d
Parents
11f5e4943b5b
Children
1842d086cbc0
Tweak the box-resizing a bit.
This change should make the widgets inside a window resize a bit more
predictably. Still not perfect, but better than before.
1 files changed, 4 insertions(+), 1 deletions(-)
+4
-1
gntbox.c
--- a/gntbox.c Wed Mar 24 02:38:56 2010 +0000
+++ b/gntbox.c Fri Apr 02 02:16:25 2010 +0000
@@ -422,7 +422,7 @@
gnt_widget_get_size(wid, &w, &h);
- if (wid != last && !child && gnt_widget_confirm_size(wid, w - wchange, h - hchange)) {
+ if (wid != last && !child && w > 0 && h > 0 && gnt_widget_confirm_size(wid, w - wchange, h - hchange)) {
child = wid;
break;
}
@@ -442,6 +442,9 @@
GntWidget *wid = iter->data;
int w, h;
+ if (wid == child)
+ continue;
+
gnt_widget_get_size(wid, &w, &h);
if (box->vertical) {
/* For a vertical box, if we are changing the width, make sure the widgets