Divan Burger : comdlg32: Modernize the look of the colour graph' s cross in the colour dialog.

Alexandre Julliard julliard at winehq.org
Wed Jan 9 07:02:12 CST 2008


Module: wine
Branch: master
Commit: 285c9fc6406762bd2f83fbaa893b2479f7b017ad
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=285c9fc6406762bd2f83fbaa893b2479f7b017ad

Author: Divan Burger <divan.burger at gmail.com>
Date:   Mon Jan  7 19:10:44 2008 +0200

comdlg32: Modernize the look of the colour graph's cross in the colour dialog.

---

 dlls/comdlg32/colordlg.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c
index 4abcd75..b4f3951 100644
--- a/dlls/comdlg32/colordlg.c
+++ b/dlls/comdlg32/colordlg.c
@@ -513,7 +513,8 @@ void CC_PaintTriangle( HWND hDlg, int y)
 void CC_PaintCross( HWND hDlg, int x, int y)
 {
  HDC hDC;
- int w = GetDialogBaseUnits();
+ int w = GetDialogBaseUnits() - 1;
+ int wc = GetDialogBaseUnits() * 3 / 4;
  HWND hwnd = GetDlgItem(hDlg, 0x2c6);
  LPCCPRIV lpp = (LPCCPRIV) GetPropW( hDlg, szColourDialogProp );
  RECT rect;
@@ -525,8 +526,7 @@ void CC_PaintCross( HWND hDlg, int x, int y)
    GetClientRect(hwnd, &rect);
    hDC = GetDC(hwnd);
    SelectClipRgn( hDC, CreateRectRgnIndirect(&rect));
-   hPen = CreatePen(PS_SOLID, 2, 0xffffff); /* -white- color */
-   hPen = SelectObject(hDC, hPen);
+
    point.x = ((long)rect.right * (long)x) / (long)MAXHORI;
    point.y = rect.bottom - ((long)rect.bottom * (long)y) / (long)MAXVERT;
    if ( lpp->oldcross.left != lpp->oldcross.right )
@@ -539,11 +539,18 @@ void CC_PaintCross( HWND hDlg, int x, int y)
    lpp->oldcross.top    = point.y - w - 1;
    lpp->oldcross.bottom = point.y + w + 1;
 
+   hPen = CreatePen(PS_SOLID, 3, 0x000000); /* -black- color */
+   hPen = SelectObject(hDC, hPen);
    MoveToEx(hDC, point.x - w, point.y, &p);
+   LineTo(hDC, point.x - wc, point.y);
+   MoveToEx(hDC, point.x + wc, point.y, &p);
    LineTo(hDC, point.x + w, point.y);
    MoveToEx(hDC, point.x, point.y - w, &p);
+   LineTo(hDC, point.x, point.y - wc);
+   MoveToEx(hDC, point.x, point.y + wc, &p);
    LineTo(hDC, point.x, point.y + w);
-   DeleteObject( SelectObject(hDC, hPen)) ;
+   DeleteObject( SelectObject(hDC, hPen));
+
    ReleaseDC(hwnd, hDC);
  }
 }




More information about the wine-cvs mailing list