1111 *******************************************************************************/
1212package org .eclipse .swt .widgets ;
1313
14- import java .util .Date ;
1514import org .eclipse .swt .SWT ;
1615import org .eclipse .swt .SWTException ;
1716import org .eclipse .swt .graphics .Point ;
1817import org .eclipse .swt .graphics .Rectangle ;
18+ import org .eclipse .swt .internal .browser .OS ;
1919import org .eclipse .swt .internal .struct .MESSAGE ;
2020import org .eclipse .swt .internal .struct .WINDOWPOS ;
2121import org .eclipse .swt .internal .xhtml .Element ;
@@ -995,6 +995,7 @@ protected boolean SetWindowPos(Object hWnd, Object hWndInsertAfter, int X, int Y
995995 cx -= 4 ;
996996 cy -= 4 ;
997997 }
998+
998999// if (!isLayoutDeferred()) {
9991000// setLayoutDeferred(true);
10001001// }
@@ -1011,9 +1012,29 @@ protected boolean SetWindowPos(Object hWnd, Object hWndInsertAfter, int X, int Y
10111012 el .style .top = Y + "px" ;
10121013 el .style .width = (cx > 0 ? cx : 0 ) + "px" ;
10131014 el .style .height = (cy > 0 ? cy : 0 ) + "px" ;
1015+
1016+ updateScrollBar (cx , cy );
10141017 return true ;
10151018// return super.SetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags);
10161019}
1020+
1021+ protected void updateScrollBar (int cx , int cy ) {
1022+ int sbw = cx , sbh = cy ;
1023+ if (verticalBar != null ) { //if ((style & SWT.V_SCROLL) != 0) {
1024+ sbw -= OS .getScrollBarWidth ();
1025+ }
1026+ if (horizontalBar != null ) { //if ((style & SWT.H_SCROLL) != 0) {
1027+ sbh -= OS .getScrollBarHeight ();
1028+ }
1029+ if (verticalBar != null ) { //if ((style & SWT.V_SCROLL) != 0) {
1030+ verticalBar .outerHandle .style .left = ((sbw > 0 ? sbw : 0 )) + "px" ;
1031+ verticalBar .updateSizeBinding (sbh );
1032+ }
1033+ if (horizontalBar != null ) { //if ((style & SWT.H_SCROLL) != 0) {
1034+ horizontalBar .outerHandle .style .top = ((sbh > 0 ? sbh : 0 )) + "px" ;
1035+ horizontalBar .updateSizeBinding (sbw );
1036+ }
1037+ }
10171038
10181039void updateLayout (boolean resize , boolean all ) {
10191040 if (isLayoutDeferred ()) return ;
0 commit comments