equal
deleted
inserted
replaced
1256 i:= 0; j:= 0; // avoid compiler hints |
1256 i:= 0; j:= 0; // avoid compiler hints |
1257 |
1257 |
1258 // TODO: Recheck height/position calculation |
1258 // TODO: Recheck height/position calculation |
1259 |
1259 |
1260 // get caption's dimensions |
1260 // get caption's dimensions |
1261 TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(caption), @i, @j); |
1261 TTF_SizeUTF8(Fontz[font].Handle, caption, @i, @j); |
1262 // width adds 36 px (image + space) |
1262 // width adds 36 px (image + space) |
1263 w:= i + 36 + wa; |
1263 w:= i + 36 + wa; |
1264 h:= j + ha; |
1264 h:= j + ha; |
1265 |
1265 |
1266 // get sub caption's dimensions |
1266 // get sub caption's dimensions |
1267 TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(subcaption), @i, @j); |
1267 TTF_SizeUTF8(Fontz[font].Handle, subcaption, @i, @j); |
1268 // width adds 36 px (image + space) |
1268 // width adds 36 px (image + space) |
1269 if w < (i + 36 + wa) then |
1269 if w < (i + 36 + wa) then |
1270 w:= i + 36 + wa; |
1270 w:= i + 36 + wa; |
1271 inc(h, j + ha); |
1271 inc(h, j + ha); |
1272 |
1272 |
1286 end; |
1286 end; |
1287 |
1287 |
1288 if extra <> '' then |
1288 if extra <> '' then |
1289 begin |
1289 begin |
1290 // get extra label's dimensions |
1290 // get extra label's dimensions |
1291 TTF_SizeUTF8(Fontz[font].Handle, Str2PChar(extra), @i, @j); |
1291 TTF_SizeUTF8(Fontz[font].Handle, extra, @i, @j); |
1292 if w < (i + wa) then |
1292 if w < (i + wa) then |
1293 w:= i + wa; |
1293 w:= i + wa; |
1294 inc(h, j + ha); |
1294 inc(h, j + ha); |
1295 end; |
1295 end; |
1296 |
1296 |