|
Lines 2234-2252
Link Here
|
| 2234 |
topRightRect.y = onBottom ? size.y - borderBottom - tabHeight: borderTop + 1; |
2234 |
topRightRect.y = onBottom ? size.y - borderBottom - tabHeight: borderTop + 1; |
| 2235 |
topRightRect.height = tabHeight - 1; |
2235 |
topRightRect.height = tabHeight - 1; |
| 2236 |
} else { |
2236 |
} else { |
| 2237 |
int compWidth = size.x - borderLeft - borderRight; |
2237 |
Rectangle bodyTrim = renderer.computeTrim(CTabFolderRenderer.PART_BODY, SWT.NONE, 0, 0, 0, 0); |
| 2238 |
Point preferredSize = topRight.computeSize(SWT.DEFAULT, SWT.DEFAULT); |
2238 |
Point preferredSize = topRight.computeSize(SWT.DEFAULT, SWT.DEFAULT); |
|
|
2239 |
int bodyRight = bodyTrim.width + bodyTrim.x; |
| 2240 |
int bodyLeft = -bodyTrim.x; |
| 2241 |
int compWidth = size.x - bodyLeft - bodyRight; |
| 2239 |
if (compWidth > preferredSize.x) { |
2242 |
if (compWidth > preferredSize.x) { |
| 2240 |
topRightRect.width = preferredSize.x; |
2243 |
topRightRect.width = preferredSize.x; |
| 2241 |
topRightRect.y = tabHeight + 1 + borderTop; |
2244 |
topRightRect.y = -bodyTrim.y; |
| 2242 |
topRightRect.height = preferredSize.y; |
2245 |
topRightRect.height = preferredSize.y; |
| 2243 |
topRightRect.x = compWidth - preferredSize.x + borderLeft; |
2246 |
topRightRect.x = size.x - preferredSize.x - bodyRight; |
| 2244 |
} else { |
2247 |
} else { |
| 2245 |
preferredSize = topRight.computeSize(compWidth, SWT.DEFAULT); |
2248 |
preferredSize = topRight.computeSize(compWidth, SWT.DEFAULT); |
| 2246 |
topRightRect.width = compWidth; |
2249 |
topRightRect.width = compWidth; |
| 2247 |
topRightRect.y = tabHeight + 1 + borderTop; |
2250 |
topRightRect.y = -bodyTrim.y; |
| 2248 |
topRightRect.height = preferredSize.y; |
2251 |
topRightRect.height = preferredSize.y; |
| 2249 |
topRightRect.x = compWidth - preferredSize.x + borderLeft; |
2252 |
topRightRect.x = size.x - preferredSize.x - bodyRight; |
| 2250 |
} |
2253 |
} |
| 2251 |
} |
2254 |
} |
| 2252 |
} |
2255 |
} |
|
Lines 3458-3464
Link Here
|
| 3458 |
gc.dispose(); |
3461 |
gc.dispose(); |
| 3459 |
if (fixedTabHeight == SWT.DEFAULT && topRight != null) { |
3462 |
if (fixedTabHeight == SWT.DEFAULT && topRight != null) { |
| 3460 |
int topHeight = topRight.computeSize(SWT.DEFAULT, SWT.DEFAULT).y; |
3463 |
int topHeight = topRight.computeSize(SWT.DEFAULT, SWT.DEFAULT).y; |
| 3461 |
topHeight += renderer.computeTrim(CTabFolderRenderer.PART_HEADER, SWT.NONE, 0,0,0,0).height; |
3464 |
topHeight += renderer.computeTrim(CTabFolderRenderer.PART_HEADER, SWT.NONE, 0,0,0,0).height + 1; |
| 3462 |
tabHeight = Math.max(topHeight, tabHeight); |
3465 |
tabHeight = Math.max(topHeight, tabHeight); |
| 3463 |
} |
3466 |
} |
| 3464 |
if (!force && tabHeight == oldHeight) return false; |
3467 |
if (!force && tabHeight == oldHeight) return false; |