comparison win/dw.c @ 1436:18c1b999dd65

Similar fix for OS/2 and Windows as just committed on Mac... Also removed some old code that was never used and is now obsolete on OS/2, Mac and Windows.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 07 Dec 2011 19:03:05 +0000
parents 2cca36ec3da6
children bde7ebced556
comparison
equal deleted inserted replaced
1435:3c5287b8eebb 1436:18c1b999dd65
1206 1206
1207 tmp->parentxratio = thisbox->xratio; 1207 tmp->parentxratio = thisbox->xratio;
1208 tmp->parentyratio = thisbox->yratio; 1208 tmp->parentyratio = thisbox->yratio;
1209 1209
1210 tmp->parentpad = tmp->pad; 1210 tmp->parentpad = tmp->pad;
1211 tmp->hsize = thisbox->items[z].hsize;
1212 tmp->vsize = thisbox->items[z].vsize;
1211 1213
1212 /* Just in case */ 1214 /* Just in case */
1213 tmp->xratio = thisbox->xratio; 1215 tmp->xratio = thisbox->xratio;
1214 tmp->yratio = thisbox->yratio; 1216 tmp->yratio = thisbox->yratio;
1215 1217
1326 upxmax = thisbox->items[z].pad*2; 1328 upxmax = thisbox->items[z].pad*2;
1327 } 1329 }
1328 } 1330 }
1329 else 1331 else
1330 { 1332 {
1331 if(thisbox->items[z].width == -1) 1333 (*usedx) += thisbox->items[z].width + (thisbox->items[z].pad*2);
1332 { 1334 if(thisbox->items[z].hsize != SIZEEXPAND)
1333 /* figure out how much space this item requires */ 1335 (*usedpadx) += (thisbox->items[z].pad*2) + thisbox->items[z].width;
1334 /* thisbox->items[z].width = */
1335 }
1336 else 1336 else
1337 { 1337 (*usedpadx) += thisbox->items[z].pad*2;
1338 (*usedx) += thisbox->items[z].width + (thisbox->items[z].pad*2);
1339 if(thisbox->items[z].hsize != SIZEEXPAND)
1340 (*usedpadx) += (thisbox->items[z].pad*2) + thisbox->items[z].width;
1341 else
1342 (*usedpadx) += thisbox->items[z].pad*2;
1343 }
1344 } 1338 }
1345 if(thisbox->type == DW_HORZ) 1339 if(thisbox->type == DW_HORZ)
1346 { 1340 {
1347 int itemheight = (thisbox->items[z].pad*2) + thisbox->items[z].height; 1341 int itemheight = (thisbox->items[z].pad*2) + thisbox->items[z].height;
1348 1342
1359 upymax = thisbox->items[z].pad*2; 1353 upymax = thisbox->items[z].pad*2;
1360 } 1354 }
1361 } 1355 }
1362 else 1356 else
1363 { 1357 {
1364 if(thisbox->items[z].height == -1) 1358 (*usedy) += thisbox->items[z].height + (thisbox->items[z].pad*2);
1365 { 1359 if(thisbox->items[z].vsize != SIZEEXPAND)
1366 /* figure out how much space this item requires */ 1360 (*usedpady) += (thisbox->items[z].pad*2) + thisbox->items[z].height;
1367 /* thisbox->items[z].height = */
1368 }
1369 else 1361 else
1370 { 1362 (*usedpady) += thisbox->items[z].pad*2;
1371 (*usedy) += thisbox->items[z].height + (thisbox->items[z].pad*2);
1372 if(thisbox->items[z].vsize != SIZEEXPAND)
1373 (*usedpady) += (thisbox->items[z].pad*2) + thisbox->items[z].height;
1374 else
1375 (*usedpady) += thisbox->items[z].pad*2;
1376 }
1377 } 1363 }
1378 } 1364 }
1379 1365
1380 (*usedx) += uxmax; 1366 (*usedx) += uxmax;
1381 (*usedy) += uymax; 1367 (*usedy) += uymax;
1468 if(thisbox->items[z].vsize != SIZEEXPAND) 1454 if(thisbox->items[z].vsize != SIZEEXPAND)
1469 vectory = 0; 1455 vectory = 0;
1470 if(thisbox->items[z].hsize != SIZEEXPAND) 1456 if(thisbox->items[z].hsize != SIZEEXPAND)
1471 vectorx = 0; 1457 vectorx = 0;
1472 1458
1459 if(thisbox->type == DW_VERT && thisbox->hsize == SIZESTATIC && thisbox->items[z].hsize == SIZEEXPAND && thisbox->width)
1460 {
1461 width = thisbox->width;
1462 vectorx = 0;
1463 }
1464 if(thisbox->type == DW_HORZ && thisbox->vsize == SIZESTATIC && thisbox->items[z].vsize == SIZEEXPAND && thisbox->height)
1465 {
1466 height = thisbox->height;
1467 vectory = 0;
1468 }
1469
1473 GetClassName(handle, tmpbuf, 99); 1470 GetClassName(handle, tmpbuf, 99);
1474 1471
1475 if(strnicmp(tmpbuf, COMBOBOXCLASSNAME, strlen(COMBOBOXCLASSNAME)+1)==0) 1472 if(strnicmp(tmpbuf, COMBOBOXCLASSNAME, strlen(COMBOBOXCLASSNAME)+1)==0)
1476 { 1473 {
1477 /* Handle special case Combobox */ 1474 /* Handle special case Combobox */