| 182 int row_ext = 0; |
182 int row_ext = 0; |
| 183 |
183 |
| 184 int preferred_width = 0; |
184 int preferred_width = 0; |
| 185 int preferred_height = 0; |
185 int preferred_height = 0; |
| 186 for(int j=0;j<ncols;j++) { |
186 for(int j=0;j<ncols;j++) { |
| 187 preferred_width += cols[j].preferred_size + colspacing; |
187 preferred_width += cols[j].preferred_size; |
| 188 if(cols[j].expand) { |
188 if(cols[j].expand) { |
| 189 col_ext++; |
189 col_ext++; |
| 190 } |
190 } |
| 191 } |
191 } |
| 192 for(int j=0;j<nrows;j++) { |
192 for(int j=0;j<nrows;j++) { |
| 193 preferred_height += rows[j].preferred_size + rowspacing; |
193 preferred_height += rows[j].preferred_size; |
| 194 if(rows[j].expand) { |
194 if(rows[j].expand) { |
| 195 row_ext++; |
195 row_ext++; |
| 196 } |
196 } |
| |
197 } |
| |
198 if(ncols > 0) { |
| |
199 preferred_width += (ncols-1) * colspacing; |
| |
200 } |
| |
201 if(nrows > 0) { |
| |
202 preferred_height += (nrows-1) * rowspacing; |
| 197 } |
203 } |
| 198 |
204 |
| 199 _preferredSize.width = preferred_width; |
205 _preferredSize.width = preferred_width; |
| 200 _preferredSize.height = preferred_height; |
206 _preferredSize.height = preferred_height; |
| 201 |
207 |