Mercurial > projects > mde
comparison mde/gui/widget/layout.d @ 85:56c0ddd90193
Intermediate commit (not stable). Changes to init system.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Thu, 11 Sep 2008 11:33:51 +0100 |
parents | 79a1809421aa |
children | b525ff28774b |
comparison
equal
deleted
inserted
replaced
84:e0f1ec7fe73a | 85:56c0ddd90193 |
---|---|
426 myDiff i = minWidth.length - 1; // starting from right... | 426 myDiff i = minWidth.length - 1; // starting from right... |
427 while (l < pos[i]) { // decrement while left of this column | 427 while (l < pos[i]) { // decrement while left of this column |
428 debug assert (i > 0, "getCell: l < pos[0] (code error)"); | 428 debug assert (i > 0, "getCell: l < pos[0] (code error)"); |
429 --i; | 429 --i; |
430 } // now (l >= pos[i]) | 430 } // now (l >= pos[i]) |
431 if (l >= pos[i] + width[i]) // between columns | 431 if (l >= pos[i] + width[i]) { // between columns |
432 debug assert (i+1 < minWidth.length, "getCell: l >= pos[$-1] + width[$-1] (code error)"); | |
432 return -i - 1; // note: i might be 0 so cannot just return -i | 433 return -i - 1; // note: i might be 0 so cannot just return -i |
434 } | |
433 return i; | 435 return i; |
434 } | 436 } |
435 | 437 |
436 // Calculate resizeU/resizeD, and return true if unable to resize. | 438 // Calculate resizeU/resizeD, and return true if unable to resize. |
437 bool findResize (wdim l) { | 439 bool findResize (wdim l) { |