finch/libgnt/gntbox.c

changeset 29944
195cf568207b
parent 29918
d4fffd2ce664
child 30446
8e144545c362
equal deleted inserted replaced
29943:8bd0701c9bbd 29944:195cf568207b
420 GntWidget *wid = iter->data; 420 GntWidget *wid = iter->data;
421 int w, h; 421 int w, h;
422 422
423 gnt_widget_get_size(wid, &w, &h); 423 gnt_widget_get_size(wid, &w, &h);
424 424
425 if (wid != last && !child && gnt_widget_confirm_size(wid, w - wchange, h - hchange)) { 425 if (wid != last && !child && w > 0 && h > 0 && gnt_widget_confirm_size(wid, w - wchange, h - hchange)) {
426 child = wid; 426 child = wid;
427 break; 427 break;
428 } 428 }
429 } 429 }
430 430
439 439
440 if (child) { 440 if (child) {
441 for (iter = box->list; iter; iter = iter->next) { 441 for (iter = box->list; iter; iter = iter->next) {
442 GntWidget *wid = iter->data; 442 GntWidget *wid = iter->data;
443 int w, h; 443 int w, h;
444
445 if (wid == child)
446 continue;
444 447
445 gnt_widget_get_size(wid, &w, &h); 448 gnt_widget_get_size(wid, &w, &h);
446 if (box->vertical) { 449 if (box->vertical) {
447 /* For a vertical box, if we are changing the width, make sure the widgets 450 /* For a vertical box, if we are changing the width, make sure the widgets
448 * in the box will fit after resizing the width. */ 451 * in the box will fit after resizing the width. */

mercurial