Index: wine/controls/uitools.c
===================================================================
RCS file: /home/wine/wine/controls/uitools.c,v
retrieving revision 1.14
diff -u -u -r1.14 uitools.c
--- wine/controls/uitools.c	2000/03/28 20:22:59	1.14
+++ wine/controls/uitools.c	2000/04/18 10:46:04
@@ -14,6 +14,18 @@
 
 DEFAULT_DEBUG_CHANNEL(graphics)
 
+/* FIXME: Do not belong here */
+COLORREF WINAPI GetNearestSysColor(HDC hdc, INT nIndex)
+{
+    COLORREF color;
+
+    TRACE("(0x%04x, %d)\n", hdc, nIndex);
+
+    color = GetSysColor(nIndex);
+
+    return GetNearestColor(hdc, color);
+}
+
 static const WORD wPattern_AA55[8] = { 0xaaaa, 0x5555, 0xaaaa, 0x5555,
                                        0xaaaa, 0x5555, 0xaaaa, 0x5555 };
 
@@ -487,51 +499,71 @@
     MoveToEx(hdc, 0, 0, &SavePoint);
 
     /* Draw the outer edge */
-    SelectObject(hdc, LTOuterPen);
-    if(uFlags & BF_TOP)
-    {
-        MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL);
-        LineTo(hdc, InnerRect.right, InnerRect.top);
-    }
-    if(uFlags & BF_LEFT)
-    {
-        MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL);
-        LineTo(hdc, InnerRect.left, InnerRect.bottom);
-    }
-    SelectObject(hdc, RBOuterPen);
-    if(uFlags & BF_BOTTOM)
-    {
-        MoveToEx(hdc, InnerRect.right-1, InnerRect.bottom-1, NULL);
-        LineTo(hdc, InnerRect.left-1, InnerRect.bottom-1);
-    }
-    if(uFlags & BF_RIGHT)
-    {
-        MoveToEx(hdc, InnerRect.right-1, InnerRect.bottom-1, NULL);
-        LineTo(hdc, InnerRect.right-1, InnerRect.top-1);
+    if(((uFlags & (BF_LEFT|BF_TOP|BF_RIGHT|BF_BOTTOM)) == 
+	(BF_LEFT|BF_TOP|BF_RIGHT|BF_BOTTOM))
+       && (GetNearestSysColor(hdc, LTOuterI) == 
+	   GetNearestSysColor(hdc, RBOuterI)))
+    {
+        SelectObject(hdc, LTOuterPen);
+        Rectangle(hdc, InnerRect.left, InnerRect.top,
+		  InnerRect.right-1, InnerRect.bottom-1);
+    } else {
+        SelectObject(hdc, LTOuterPen);
+	if(uFlags & BF_TOP)
+	{
+	    MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL);
+	    LineTo(hdc, InnerRect.right, InnerRect.top);
+        }
+        if(uFlags & BF_LEFT)
+        {
+            MoveToEx(hdc, InnerRect.left, InnerRect.top, NULL);
+            LineTo(hdc, InnerRect.left, InnerRect.bottom);
+        }
+        SelectObject(hdc, RBOuterPen);
+        if(uFlags & BF_BOTTOM)
+        {
+            MoveToEx(hdc, InnerRect.right-1, InnerRect.bottom-1, NULL);
+            LineTo(hdc, InnerRect.left-1, InnerRect.bottom-1);
+        }
+        if(uFlags & BF_RIGHT)
+        {
+            MoveToEx(hdc, InnerRect.right-1, InnerRect.bottom-1, NULL);
+            LineTo(hdc, InnerRect.right-1, InnerRect.top-1);
+        }
     }
 
     /* Draw the inner edge */
-    SelectObject(hdc, LTInnerPen);
-    if(uFlags & BF_TOP)
-    {
-        MoveToEx(hdc, InnerRect.left+LTpenplus, InnerRect.top+1, NULL);
-        LineTo(hdc, InnerRect.right-RTpenplus, InnerRect.top+1);
-    }
-    if(uFlags & BF_LEFT)
-    {
-        MoveToEx(hdc, InnerRect.left+1, InnerRect.top+LTpenplus, NULL);
-        LineTo(hdc, InnerRect.left+1, InnerRect.bottom-LBpenplus);
-    }
-    SelectObject(hdc, RBInnerPen);
-    if(uFlags & BF_BOTTOM)
-    {
-        MoveToEx(hdc, InnerRect.right-1-RBpenplus, InnerRect.bottom-2, NULL);
-        LineTo(hdc, InnerRect.left-1+LBpenplus, InnerRect.bottom-2);
-    }
-    if(uFlags & BF_RIGHT)
-    {
-        MoveToEx(hdc, InnerRect.right-2, InnerRect.bottom-1-RBpenplus, NULL);
-        LineTo(hdc, InnerRect.right-2, InnerRect.top-1+RTpenplus);
+    if(((uFlags & (BF_LEFT|BF_TOP|BF_RIGHT|BF_BOTTOM)) == 
+	(BF_LEFT|BF_TOP|BF_RIGHT|BF_BOTTOM))
+       && (GetNearestSysColor(hdc, LTInnerI) == 
+	   GetNearestSysColor(hdc, RBInnerI)))
+    {
+        SelectObject(hdc, LTInnerPen);
+	Rectangle(hdc, InnerRect.left+LTpenplus, InnerRect.top+LTpenplus,
+		  InnerRect.right-1-RTpenplus, InnerRect.bottom-1-RBpenplus);
+    } else {
+        SelectObject(hdc, LTInnerPen);
+        if(uFlags & BF_TOP)
+        {
+            MoveToEx(hdc, InnerRect.left+LTpenplus, InnerRect.top+1, NULL);
+            LineTo(hdc, InnerRect.right-RTpenplus, InnerRect.top+1);
+        }
+        if(uFlags & BF_LEFT)
+        {
+            MoveToEx(hdc, InnerRect.left+1, InnerRect.top+LTpenplus, NULL);
+            LineTo(hdc, InnerRect.left+1, InnerRect.bottom-LBpenplus);
+        }
+        SelectObject(hdc, RBInnerPen);
+        if(uFlags & BF_BOTTOM)
+        {
+            MoveToEx(hdc, InnerRect.right-1-RBpenplus, InnerRect.bottom-2, NULL);
+            LineTo(hdc, InnerRect.left-1+LBpenplus, InnerRect.bottom-2);
+        }
+        if(uFlags & BF_RIGHT)
+        {
+            MoveToEx(hdc, InnerRect.right-2, InnerRect.bottom-1-RBpenplus, NULL);
+            LineTo(hdc, InnerRect.right-2, InnerRect.top-1+RTpenplus);
+        }
     }
 
     if( ((uFlags & BF_MIDDLE) && retval) || (uFlags & BF_ADJUST) )
Index: wine/windows/syscolor.c
===================================================================
RCS file: /home/wine/wine/windows/syscolor.c,v
retrieving revision 1.16
diff -u -u -r1.16 syscolor.c
--- wine/windows/syscolor.c	2000/03/28 20:23:09	1.16
+++ wine/windows/syscolor.c	2000/04/18 10:46:06
@@ -6,6 +6,8 @@
  *
  */
 
+#include "config.h"
+
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -14,6 +16,7 @@
 #include "wingdi.h"
 #include "wine/winbase16.h"
 #include "wine/winuser16.h"
+#include "options.h"
 #include "sysmetrics.h"
 #include "winbase.h"
 #include "winuser.h"
@@ -56,6 +59,38 @@
     "GradientInactiveTitle", "184 180 184" /* COLOR_GRADIENTINACTIVECAPTION */
 };
 
+static const char * const DefSysColorsMono[] = {
+    "Scrollbar",             "255 255 255", /* COLOR_SCROLLBAR               ( 0) */
+    "Background",            "255 255 255", /* COLOR_BACKGROUND              ( 1) */
+    "ActiveTitle",           "255 255 255", /* COLOR_ACTIVECAPTION           ( 2) */
+    "InactiveTitle",         "255 255 255", /* COLOR_INACTIVECAPTION         ( 3) */
+    "Menu",                  "255 255 255", /* COLOR_MENU                    ( 4) */
+    "Window",                "255 255 255", /* COLOR_WINDOW                  ( 5) */
+    "WindowFrame",           "0 0 0",       /* COLOR_WINDOWFRAME             ( 6) */
+    "MenuText",              "0 0 0",       /* COLOR_MENUTEXT                ( 7) */
+    "WindowText",            "0 0 0",       /* COLOR_WINDOWTEXT              ( 8) */
+    "TitleText",             "255 255 255", /* COLOR_CAPTIONTEXT             ( 9) */
+    "ActiveBorder",          "0 0 0",       /* COLOR_ACTIVEBORDER            (10) */
+    "InactiveBorder",        "0 0 0",       /* COLOR_INACTIVEBORDER          (11) */
+    "AppWorkspace",          "255 255 255", /* COLOR_APPWORKSPACE            (12) */
+    "Hilight",               "0 0 0",       /* COLOR_HIGHLIGHT               (13) */
+    "HilightText",           "0 0 0",       /* COLOR_HIGHLIGHTTEXT           (14) */
+    "ButtonFace",            "255 255 255", /* COLOR_BTNFACE                 (15) */
+    "ButtonShadow",          "255 255 255", /* COLOR_BTNSHADOW               (16) */
+    "GrayText",              "0 0 0",       /* COLOR_GRAYTEXT                (17) */
+    "ButtonText",            "0 0 0",       /* COLOR_BTNTEXT                 (18) */
+    "InactiveTitleText",     "0 0 0",       /* COLOR_INACTIVECAPTIONTEXT     (19) */
+    "ButtonHilight",         "255 255 255", /* COLOR_BTNHIGHLIGHT            (20) */
+    "3DDarkShadow",          "255 255 255", /* COLOR_3DDKSHADOW              (21) */
+    "3DLight",               "255 255 255", /* COLOR_3DLIGHT                 (22) */
+    "InfoText",              "0 0 0",       /* COLOR_INFOTEXT                (23) */
+    "InfoBackground",        "255 255 255", /* COLOR_INFOBK                  (24) */
+    "AlternateButtonFace",   "255 255 255", /* COLOR_ALTERNATEBTNFACE        (25) */
+    "HotTrackingColor",      "255 255 255", /* COLOR_HOTLIGHT                (26) */
+    "GradientActiveTitle",   "255 255 255", /* COLOR_GRADIENTACTIVECAPTION   (27) */
+    "GradientInactiveTitle", "255 255 255"  /* COLOR_GRADIENTINACTIVECAPTION (28) */
+};
+
 static const char * const DefSysColors95[] =
 {
     "Scrollbar", "223 223 223",      /* COLOR_SCROLLBAR           */
@@ -89,7 +124,6 @@
     "GradientInactiveTitle", "184 180 184" /* COLOR_GRADIENTINACTIVECAPTION */
 };
 
-
 #define NUM_SYS_COLORS     (COLOR_GRADIENTINACTIVECAPTION+1)
 
 static COLORREF SysColors[NUM_SYS_COLORS];
@@ -124,7 +158,10 @@
     BOOL bOk = FALSE, bNoReg = FALSE;
     HKEY  hKey;
 
-    p = (TWEAK_WineLook == WIN31_LOOK) ? DefSysColors : DefSysColors95;
+    if(0) /* FIXME: TTYDRV is used */
+        p = DefSysColorsMono;
+    else
+        p = (TWEAK_WineLook == WIN31_LOOK) ? DefSysColors : DefSysColors95;
 
     /* first, try to read the values from the registry */
     if (RegCreateKeyExA(HKEY_CURRENT_USER, "Control Panel\\Colors", 0, 0, 0, KEY_ALL_ACCESS, 0, &hKey, 0))
@@ -175,6 +212,8 @@
  */
 COLORREF WINAPI GetSysColor( INT nIndex )
 {
+    TRACE("(%d)\n", nIndex);
+   
     if (nIndex >= 0 && nIndex < NUM_SYS_COLORS)
 	return SysColors[nIndex];
     else
