Changeset 215 for trunk/src


Ignore:
Timestamp:
Oct 23, 2009, 8:54:47 PM (16 years ago)
Author:
lpino
Message:
  • Fix the computeSize method. Now the ControlExample initiates the Slider with the correct size
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Slider.java

    r14 r215  
    159159        int width = border * 2, height = border * 2;
    160160        if ((style & SWT.HORIZONTAL) != 0) {
    161                 width += OS.WinQuerySysValue (handle, OS.SV_CXHSCROLLARROW ) * 10;
    162                 height += OS.WinQuerySysValue (handle, OS.SV_CYHSCROLL);
     161                width += OS.WinQuerySysValue (OS.HWND_DESKTOP, OS.SV_CXHSCROLLARROW ) * 10;
     162                height += OS.WinQuerySysValue (OS.HWND_DESKTOP, OS.SV_CYHSCROLL);
    163163        } else {
    164                 width += OS.WinQuerySysValue (handle, OS.SV_CXVSCROLL);
    165                 height += OS.WinQuerySysValue (handle, OS.SV_CYVSCROLLARROW ) * 10;
     164                width += OS.WinQuerySysValue (OS.HWND_DESKTOP, OS.SV_CXVSCROLL);
     165                height += OS.WinQuerySysValue (OS.HWND_DESKTOP, OS.SV_CYVSCROLLARROW ) * 10;
    166166        }
    167167        if (wHint != SWT.DEFAULT) width = wHint + (border * 2);
Note: See TracChangeset for help on using the changeset viewer.