CW: SystemParametersInfo fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

This is a part of the big CodeWeavers' patch.

Changelog:
    Dmitry Timoshkov <dmitry@codeweavers.com>
    Guy Albertelli <guy@codeweavers.com>
    Use GetSystemMetrics() to for caption metrics in NONCLIENTMETRICS struct.
    Initialize iScrollWidth and iScrollHeight entries for SPI_GETNONCLIENTMETRICS.

diff -u cvs/hq/wine/windows/sysparams.c wine/windows/sysparams.c
--- cvs/hq/wine/windows/sysparams.c	Thu Jan 24 20:34:47 2002
+++ wine/windows/sysparams.c	Sun Feb  3 18:28:27 2002
@@ -1118,18 +1118,18 @@
 		lpnm->cbSize - sizeof(lpnm->cbSize)
 		);
 
-	    /* FIXME: initialize geometry entries */
-	    /* FIXME: As these values are presumably in device units,
-	     *  we should calculate the defaults based on the screen dpi
-	     */
+	    /* initialize geometry entries */
+	    lpnm->iBorderWidth = -1;      /* FIXME */
+	    lpnm->iScrollWidth = GetSystemMetrics(SM_CXVSCROLL);
+	    lpnm->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
 	    /* caption */
-	    lpnm->iCaptionWidth = ((TWEAK_WineLook > WIN31_LOOK)  ? 32 : 20);
+	    lpnm->iCaptionWidth = GetSystemMetrics(SM_CXSIZE);
 	    lpnm->iCaptionHeight = lpnm->iCaptionWidth;
 	    SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont), 0 );
 	    lpnm->lfCaptionFont.lfWeight = FW_BOLD;
 
 	    /* small caption */
-	    lpnm->iSmCaptionWidth = ((TWEAK_WineLook > WIN31_LOOK)  ? 32 : 17);
+	    lpnm->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
 	    lpnm->iSmCaptionHeight = lpnm->iSmCaptionWidth;
 	    SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont), 0 );
 







[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux