Lines 1082-1088
Link Here
|
1082 |
if (selectedIndex != -1) { |
1082 |
if (selectedIndex != -1) { |
1083 |
CTabItem item = items[selectedIndex]; |
1083 |
CTabItem item = items[selectedIndex]; |
1084 |
item.onPaint(gc, true); |
1084 |
item.onPaint(gc, true); |
1085 |
} else { |
1085 |
} else if (items.length > 0) { |
1086 |
// if no selected tab - draw line across bottom of all tabs |
1086 |
// if no selected tab - draw line across bottom of all tabs |
1087 |
int x1 = borderLeft; |
1087 |
int x1 = borderLeft; |
1088 |
int y1 = (onBottom) ? size.y - borderBottom - tabHeight - 1 : borderTop + tabHeight; |
1088 |
int y1 = (onBottom) ? size.y - borderBottom - tabHeight - 1 : borderTop + tabHeight; |
Lines 1092-1100
Link Here
|
1092 |
} |
1092 |
} |
1093 |
|
1093 |
|
1094 |
// Draw Buttons |
1094 |
// Draw Buttons |
|
|
1095 |
if (items.length > 0) { |
1095 |
drawChevron(gc); |
1096 |
drawChevron(gc); |
1096 |
drawMinimize(gc); |
1097 |
drawMinimize(gc); |
1097 |
drawMaximize(gc); |
1098 |
drawMaximize(gc); |
|
|
1099 |
} |
1098 |
|
1100 |
|
1099 |
// Draw border line |
1101 |
// Draw border line |
1100 |
if (borderLeft > 0) { |
1102 |
if (borderLeft > 0) { |
Lines 2007-2013
Link Here
|
2007 |
} |
2009 |
} |
2008 |
return; |
2010 |
return; |
2009 |
} |
2011 |
} |
2010 |
if (minRect.contains(x, y)) { |
2012 |
if (minRect.contains(x, y) && items.length > 0) { |
2011 |
boolean selected = minImageState == SELECTED; |
2013 |
boolean selected = minImageState == SELECTED; |
2012 |
minImageState = HOT; |
2014 |
minImageState = HOT; |
2013 |
redraw(minRect.x, minRect.y, minRect.width, minRect.height, false); |
2015 |
redraw(minRect.x, minRect.y, minRect.width, minRect.height, false); |
Lines 2024-2030
Link Here
|
2024 |
} |
2026 |
} |
2025 |
return; |
2027 |
return; |
2026 |
} |
2028 |
} |
2027 |
if (maxRect.contains(x, y)) { |
2029 |
if (maxRect.contains(x, y) && items.length > 0) { |
2028 |
boolean selected = maxImageState == SELECTED; |
2030 |
boolean selected = maxImageState == SELECTED; |
2029 |
maxImageState = HOT; |
2031 |
maxImageState = HOT; |
2030 |
redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false); |
2032 |
redraw(maxRect.x, maxRect.y, maxRect.width, maxRect.height, false); |
Lines 3648-3654
Link Here
|
3648 |
addListener(toolTipEvents[i], toolTipListener); |
3650 |
addListener(toolTipEvents[i], toolTipListener); |
3649 |
} |
3651 |
} |
3650 |
} |
3652 |
} |
3651 |
if (updateToolTip(x, y)) { |
3653 |
if (updateToolTip(x, y) && items.length > 0) { |
3652 |
toolTipShell.setVisible(true); |
3654 |
toolTipShell.setVisible(true); |
3653 |
} else { |
3655 |
} else { |
3654 |
hideToolTip(); |
3656 |
hideToolTip(); |