Skip to content

Commit 7c26b59

Browse files
author
soheil_h_y
committed
1. Some CTabFolder Enhancements.
1 parent d1320ec commit 7c26b59

File tree

1 file changed

+4
-3
lines changed
  • sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/custom

1 file changed

+4
-3
lines changed

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/custom/CTabFolder.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3137,9 +3137,10 @@ public void setBounds(int x, int y, int width, int height) {
31373137
// }
31383138
// outerArea.style.height = height + "px";
31393139
// }
3140-
contentArea.style.height = (height - OS.getContainerHeight(buttonArea) - 6)+"px";
3141-
contentArea.style.width = (width - 6) + "px";
3142-
buttonArea.style.width = (width - 4) + "px";
3140+
int h = (height - OS.getContainerHeight(buttonArea) - 6);
3141+
contentArea.style.height = Math.max(h, 0) +"px";
3142+
contentArea.style.width = Math.max(0, width - 6) + "px";
3143+
buttonArea.style.width = Math.max(0, width - 4) + "px";
31433144
super.setBounds(x, y, width, height);
31443145
if(selectedIndex != -1 ){
31453146
Control control = items[selectedIndex].control;

0 commit comments

Comments
 (0)