Mercurial > dwindows
comparison os2/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 |
---|---|
1139 | 1139 |
1140 tmp->parentxratio = thisbox->xratio; | 1140 tmp->parentxratio = thisbox->xratio; |
1141 tmp->parentyratio = thisbox->yratio; | 1141 tmp->parentyratio = thisbox->yratio; |
1142 | 1142 |
1143 tmp->parentpad = tmp->pad; | 1143 tmp->parentpad = tmp->pad; |
1144 tmp->hsize = thisbox->items[z].hsize; | |
1145 tmp->vsize = thisbox->items[z].vsize; | |
1144 | 1146 |
1145 /* Just in case */ | 1147 /* Just in case */ |
1146 tmp->xratio = thisbox->xratio; | 1148 tmp->xratio = thisbox->xratio; |
1147 tmp->yratio = thisbox->yratio; | 1149 tmp->yratio = thisbox->yratio; |
1148 | 1150 |
1259 upxmax = thisbox->items[z].pad*2; | 1261 upxmax = thisbox->items[z].pad*2; |
1260 } | 1262 } |
1261 } | 1263 } |
1262 else | 1264 else |
1263 { | 1265 { |
1264 if(thisbox->items[z].width == -1) | 1266 (*usedx) += thisbox->items[z].width + (thisbox->items[z].pad*2); |
1265 { | 1267 if(thisbox->items[z].hsize != SIZEEXPAND) |
1266 /* figure out how much space this item requires */ | 1268 (*usedpadx) += (thisbox->items[z].pad*2) + thisbox->items[z].width; |
1267 /* thisbox->items[z].width = */ | |
1268 } | |
1269 else | 1269 else |
1270 { | 1270 (*usedpadx) += thisbox->items[z].pad*2; |
1271 (*usedx) += thisbox->items[z].width + (thisbox->items[z].pad*2); | |
1272 if(thisbox->items[z].hsize != SIZEEXPAND) | |
1273 (*usedpadx) += (thisbox->items[z].pad*2) + thisbox->items[z].width; | |
1274 else | |
1275 (*usedpadx) += thisbox->items[z].pad*2; | |
1276 } | |
1277 } | 1271 } |
1278 if(thisbox->type == DW_HORZ) | 1272 if(thisbox->type == DW_HORZ) |
1279 { | 1273 { |
1280 int itemheight = thisbox->items[z].height + (thisbox->items[z].pad*2); | 1274 int itemheight = thisbox->items[z].height + (thisbox->items[z].pad*2); |
1281 | 1275 |
1292 upymax = thisbox->items[z].pad*2; | 1286 upymax = thisbox->items[z].pad*2; |
1293 } | 1287 } |
1294 } | 1288 } |
1295 else | 1289 else |
1296 { | 1290 { |
1297 if(thisbox->items[z].height == -1) | 1291 (*usedy) += thisbox->items[z].height + (thisbox->items[z].pad*2); |
1298 { | 1292 if(thisbox->items[z].vsize != SIZEEXPAND) |
1299 /* figure out how much space this item requires */ | 1293 (*usedpady) += (thisbox->items[z].pad*2) + thisbox->items[z].height; |
1300 /* thisbox->items[z].height = */ | |
1301 } | |
1302 else | 1294 else |
1303 { | 1295 (*usedpady) += thisbox->items[z].pad*2; |
1304 (*usedy) += thisbox->items[z].height + (thisbox->items[z].pad*2); | |
1305 if(thisbox->items[z].vsize != SIZEEXPAND) | |
1306 (*usedpady) += (thisbox->items[z].pad*2) + thisbox->items[z].height; | |
1307 else | |
1308 (*usedpady) += thisbox->items[z].pad*2; | |
1309 } | |
1310 } | 1296 } |
1311 } | 1297 } |
1312 | 1298 |
1313 (*usedx) += uxmax; | 1299 (*usedx) += uxmax; |
1314 (*usedy) += uymax; | 1300 (*usedy) += uymax; |
1401 if(thisbox->items[z].vsize != SIZEEXPAND) | 1387 if(thisbox->items[z].vsize != SIZEEXPAND) |
1402 vectory = 0; | 1388 vectory = 0; |
1403 if(thisbox->items[z].hsize != SIZEEXPAND) | 1389 if(thisbox->items[z].hsize != SIZEEXPAND) |
1404 vectorx = 0; | 1390 vectorx = 0; |
1405 | 1391 |
1392 if(thisbox->type == DW_VERT && thisbox->hsize == SIZESTATIC && thisbox->items[z].hsize == SIZEEXPAND && thisbox->width) | |
1393 { | |
1394 width = thisbox->width; | |
1395 vectorx = 0; | |
1396 } | |
1397 if(thisbox->type == DW_HORZ && thisbox->vsize == SIZESTATIC && thisbox->items[z].vsize == SIZEEXPAND && thisbox->height) | |
1398 { | |
1399 height = thisbox->height; | |
1400 vectory = 0; | |
1401 } | |
1402 | |
1406 WinQueryClassName(handle, 99, (PCH)tmpbuf); | 1403 WinQueryClassName(handle, 99, (PCH)tmpbuf); |
1407 | 1404 |
1408 if(strncmp(tmpbuf, "#2", 3)==0) | 1405 if(strncmp(tmpbuf, "#2", 3)==0) |
1409 { | 1406 { |
1410 HWND frame = (HWND)dw_window_get_data(handle, "_dw_combo_box"); | 1407 HWND frame = (HWND)dw_window_get_data(handle, "_dw_combo_box"); |