ecere: Added SystemColor::formColor to represent the value previously known as 'activ...
authorJerome St-Louis <jerome@ecere.com>
Mon, 27 Feb 2012 22:29:51 +0000 (17:29 -0500)
committerJerome St-Louis <jerome@ecere.com>
Thu, 1 Mar 2012 04:53:39 +0000 (23:53 -0500)
22 files changed:
ecere/src/gfx/Color.ec
ecere/src/gfx/Surface.ec
ecere/src/gui/FormDesigner.ec
ecere/src/gui/controls/Button.ec
ecere/src/gui/controls/EditBox.ec
ecere/src/gui/controls/ListBox.ec
ecere/src/gui/controls/Menu.ec
ecere/src/gui/controls/PaneSplitter.ec
ecere/src/gui/controls/PathBox.ec
ecere/src/gui/controls/ProgressBar.ec
ecere/src/gui/controls/ScrollBar.ec
ecere/src/gui/controls/SelectorBar.ec
ecere/src/gui/controls/StatusBar.ec
ecere/src/gui/controls/TabControl.ec
ecere/src/gui/dialogs/ColorPicker.ec
ecere/src/gui/dialogs/FileDialog.ec
ecere/src/gui/dialogs/FindDialog.ec
ecere/src/gui/dialogs/GoToDialog.ec
ecere/src/gui/dialogs/MessageBox.ec
ecere/src/gui/dialogs/ReplaceDialog.ec
ecere/src/gui/dialogs/WindowList.ec
ecere/src/gui/skins/WindowsSkin.ec

index b72686e..cebf813 100644 (file)
@@ -575,11 +575,12 @@ public enum DefinedColor : Color
    lightPink           = Color { 255, 182, 193 }
 };
 
-// TODO: We really should improve on this, only activeBorder has been used so far
+// TODO: We really should improve on this, only formColor has been used so far
 public enum SystemColor : Color
 {
    // activeBorder         = Color { 212, 208, 200 },
    activeBorder         = Color { 229, 234, 245 },
+   formColor            = Color { 229, 234, 245 },
    control              = Color { 212, 208, 200 },
    controlLight         = Color { 212, 208, 200 },
    inactiveBorder       = Color { 212, 208, 200 },
@@ -625,7 +626,7 @@ private class ColorValue : Color
    Window pullDown
    {
       master = this, interim = true, autoCreate = false, minSize = { 204, 222 }, 
-      background = activeBorder, borderStyle = contour|bevel;
+      background = formColor, borderStyle = contour|bevel;
 
       bool OnKeyDown(Key key, unichar ch)
       {
index d172e61..5a6bb1c 100644 (file)
@@ -377,7 +377,7 @@ public:
    {
       ColorAlpha foreground = this.foreground;
 
-      SetForeground(inner ? Color { 128,128,128 } : activeBorder);
+      SetForeground(inner ? Color { 128,128,128 } : formColor);
       HLine(x,   x+w - 2, y);
       VLine(y+1, y+h - 2, x);
 
@@ -385,7 +385,7 @@ public:
       HLine(x+1, x+w-3, y+1);
       VLine(y+2, y+h-3, x+1);
 
-      SetForeground(inner ? activeBorder : Color { 128,128,128 } );
+      SetForeground(inner ? formColor : Color { 128,128,128 } );
       HLine(x+1, x+w-2, y + h -2);
       VLine(y+1, y+h-3, x + w - 2);
 
index 1789f7d..6a41d21 100644 (file)
@@ -195,7 +195,7 @@ class FormDesigner : ClassDesignerBase
       editBox.Printf("   caption = \"%s\";\n", name);
       //editBox.Printf("   background = Color { 212, 208, 200 };\n");
       
-      editBox.Printf("   background = activeBorder;\n");
+      editBox.Printf("   background = formColor;\n");
       editBox.Printf("   borderStyle = sizable;\n");
       editBox.Printf("   hasMaximize = true;\n");
       editBox.Printf("   hasMinimize = true;\n");
index 85f375d..ddf4a61 100644 (file)
@@ -76,7 +76,7 @@ public class Button : CommonControl
 
    Button()
    {
-      background = activeBorder;
+      background = formColor;
       foreground = black;
       //opacity = 0;
       //drawBehind = true;
@@ -93,14 +93,14 @@ public class Button : CommonControl
       textColor[over] = black;
       textColor[disabled] = Color { 85, 85, 85 };
 
-      colors[up] = activeBorder;
-      colors[down] = activeBorder;
-      colors[over] = activeBorder;
+      colors[up] = formColor;
+      colors[down] = formColor;
+      colors[over] = formColor;
       colors[disabled] = white;
       colors[upChecked] = Color { 233,229,221 };
-      colors[overChecked] = activeBorder;
+      colors[overChecked] = formColor;
       colors[downChecked] = Color { 233,229,221 };
-      colors[disabledChecked] = activeBorder;
+      colors[disabledChecked] = formColor;
    }
 
    Bitmap GetButtonBitmap()
@@ -161,12 +161,12 @@ public class Button : CommonControl
          int start = (clientSize.h - height) / 2;
 
          if(!isEnabled)
-            // surface.SetBackground(activeBorder);
+            // surface.SetBackground(formColor);
             surface.SetBackground(gainsboro);
          else if(active && !text)
-            surface.SetBackground((offset ? activeBorder : Color { 0,0,170 }));
+            surface.SetBackground((offset ? formColor : Color { 0,0,170 }));
          else
-            surface.SetBackground((offset ? activeBorder : background /*white*/));
+            surface.SetBackground((offset ? formColor : background /*white*/));
          surface.Area(2, start+2,height-3,start+height-3);
 
          surface.SetForeground(Color { 85, 85, 85 });
index 613339e..30e152b 100644 (file)
@@ -1440,7 +1440,7 @@ private:
          Abs(selectionBackground.g - property::background.g) + 
          Abs(selectionBackground.b - property::background.b) < 92)
       {
-         selectionBackground = activeBorder;
+         selectionBackground = formColor;
          selectionForeground = selectionColor ? selectionColor : SELECTION_COLOR;
       }
 
@@ -1452,7 +1452,7 @@ private:
 
       if(!isEnabled)
       {
-         surface.SetBackground(activeBorder);
+         surface.SetBackground(formColor);
          surface.Area(0,0,clientSize.w, clientSize.h);
       }
 
index 7da6fc9..e1db4a3 100644 (file)
@@ -2058,11 +2058,11 @@ private:
          if(style.collapse && !(style.treeBranch) && rows.first)
          {
             x += 15;
-            surface.SetBackground(activeBorder);
+            surface.SetBackground(formColor);
             surface.Area(-scroll.x, 0, x, clientSize.h);
          }
 
-         surface.SetForeground(activeBorder);
+         surface.SetForeground(formColor);
          for(row = firstRowShown; row; row = row.GetNextRow())
          {
             y += rowHeight;
@@ -2247,8 +2247,8 @@ private:
          // Draw the current row background
          if(row.header)
          {
-            background = activeBorder;
-            surface.SetBackground(activeBorder);
+            background = formColor;
+            surface.SetBackground(formColor);
             surface.Area(rowStart, y, clientSize.w, (y + rowHeight) - 1);
             foreground = branchesColor;
          }
@@ -2257,7 +2257,7 @@ private:
             if(dataDisplayFlags.selected && (isActive || style.alwaysHL || (style.alwaysEdit && style.fullRowSelect)))
             {
                if(!isActive && style.alwaysEdit)
-                  background = activeBorder;
+                  background = formColor;
                else
                   background = selectionColor ? selectionColor : SELECTION_COLOR;
                if(style.fullRowSelect)
@@ -2354,11 +2354,11 @@ private:
                }
 
                if(!isActive && dataDisplayFlags.selected && style.alwaysEdit && field.editable)
-                  background = activeBorder;
+                  background = formColor;
 
                if(!dataDisplayFlags.firstField && !dataDisplayFlags.fullRow)
                {
-                  background = activeBorder;
+                  background = formColor;
                   foreground = this.background;
                }
 
@@ -2377,7 +2377,7 @@ private:
                surface.SetForeground(row.header ? headerCollapseForeground : this.foreground);
                surface.Rectangle(collapseRowStart + 3 + plusIndent, y + PLUSY, collapseRowStart + 11 + plusIndent, y + PLUSY + 8);
 
-               surface.SetBackground(row.header ? (activeBorder) : (this.background)); //white
+               surface.SetBackground(row.header ? (formColor) : (this.background)); //white
                surface.Area(collapseRowStart + 4 + plusIndent, y + PLUSY + 1, collapseRowStart + 10 + plusIndent, y + PLUSY + 7);
 
                surface.HLine(collapseRowStart + 5 + plusIndent, collapseRowStart + 9 + plusIndent, y+PLUSY+4);
index c69392e..bcd9b7b 100644 (file)
@@ -1156,7 +1156,7 @@ public class PopupMenu : Window
 
                   if(ITEM_DISABLED(item) && selected == ptr)
                   {
-                     surface.SetForeground(activeBorder);
+                     surface.SetForeground(formColor);
                      Interface::WriteKeyedText(surface, x + bitmapOffset + 5,
                         textY, ITEM_TEXT(item), ITEM_HOTKEY(item));
                   }
@@ -1206,7 +1206,7 @@ public class PopupMenu : Window
                      surface.VLine(y+(rh - 8)/2, y+(rh - 8)/2+7, clientSize.w-10);
                      surface.SetForeground(Color { 85, 85, 85 });
                      surface.DrawLine(clientSize.w-10, y+(rh - 8)/2, clientSize.w-4, y+rh / 2);
-                     surface.SetForeground(activeBorder);
+                     surface.SetForeground(formColor);
                      surface.DrawLine(clientSize.w-10, y+(rh - 8)/2+7, clientSize.w-4, y+rh / 2);
                      */
                   }
index 87e38ad..afeb5d1 100644 (file)
@@ -6,7 +6,7 @@ public class PaneSplitter : Window
 {
    bool sliding;
    int startPos, startX;
-   background = activeBorder, borderStyle = bevel;
+   background = formColor, borderStyle = bevel;
    anchor = { top = -2, bottom = -2 }, stayOnTop = true, inactive = true;
    size = { w = defaultToolSize };
    cursor = ((GuiApplication)__thisModule.application).GetCursor(sizeWE);
index 0d3cd8c..75c1553 100644 (file)
@@ -227,7 +227,7 @@ public class PathBox : CommonControl
    {
       if(!isEnabled)
       {
-         surface.SetBackground(activeBorder);
+         surface.SetBackground(formColor);
          surface.Area(0, 0, clientSize.w, clientSize.h);
       }
       else
index b7c9665..a6cb29d 100644 (file)
@@ -6,7 +6,7 @@ public class ProgressBar : CommonControl
 {
    class_property(icon) = "<:ecere>controls/progressBar.png";
 
-   background = activeBorder;
+   background = formColor;
    borderStyle = deep;
  
 public:
index 06215b1..0fef8cb 100644 (file)
@@ -418,9 +418,9 @@ private:
       else
       {
          // What to do here?
-         upBtn.background = activeBorder;
-         downBtn.background = activeBorder;
-         thumb.background = activeBorder;
+         upBtn.background = formColor;
+         downBtn.background = formColor;
+         thumb.background = formColor;
          background = Color { 224, 224, 224 };
       }
       if(sbStyle.vertical)
index 625b2a4..d544a47 100644 (file)
@@ -28,7 +28,7 @@ static void DrawStipple(Surface surface, Size clientSize)
 public class SelectorBar : Stacker
 {
    direction = horizontal;
-   background = activeBorder;
+   background = formColor;
    //tabCycle = true;
    //isActiveClient = true;
 
index ac09ec5..83d60db 100644 (file)
@@ -10,7 +10,7 @@ public class StatusBar : Window
 {
    class_property(icon) = "<:ecere>controls/statusBar.png";
 
-   background = activeBorder;
+   background = formColor;
    nonClient = true;
    inactive = true;
    anchor = Anchor { left = 0, right = 0, bottom = 0 };
index a3764f9..2761a81 100644 (file)
@@ -248,7 +248,7 @@ public class TabControl : Window
    tabCycle = true;
    int numTabs;
 
-   background = white;//activeBorder;
+   background = white;//formColor;
 
    Window tabButtons { this, opacity = 0, drawBehind = true };
 
@@ -349,7 +349,7 @@ public class TabControl : Window
          {
             if(sbh && sbh.visible && sbv && sbv.visible)
             {
-               surface.SetBackground(activeBorder);
+               surface.SetBackground(formColor);
                surface.Area(
                   clientStart.x + clientSize.w,
                   clientStart.y + clientSize.h,
index 27e3d29..ef231b1 100644 (file)
@@ -234,7 +234,7 @@ class ColorZRamp : ColorPlane
 
 public class ColorPicker : Window
 {
-   hasClose = true, tabCycle = true, background = activeBorder;
+   hasClose = true, tabCycle = true, background = formColor;
    autoCreate = false;
    clientSize.h = 275, size.w = 500;
    text = $"Select a color...";
@@ -861,7 +861,7 @@ private:
          if(((ColorPicker)parent).hasAlpha && opacity < 1)
          {
             int x, y;
-            surface.background = activeBorder;
+            surface.background = formColor;
             surface.Clear(colorBuffer);
             surface.background = white;
             for(y = 0; y < 50; y+=10)
index 04a93d9..7757b21 100644 (file)
@@ -243,7 +243,7 @@ public struct FileName
 public class FileDialog : Window
 {
    text = $"Select a file...";
-   background = activeBorder;
+   background = formColor;
    hasClose = true;
    borderStyle = sizable;
    tabCycle = true;
@@ -1489,7 +1489,7 @@ private:
 
 public class CreateDirectoryDialog : Window
 {
-   background = activeBorder;
+   background = formColor;
    minClientSize = Size { 240, 100 };
    tabCycle = true;
    hasClose = true;
index dc3a550..356d70b 100644 (file)
@@ -8,7 +8,7 @@ public class FindDialog : Window
    hasClose = true;
    tabCycle = true;
    borderStyle = fixed;
-   background = activeBorder;
+   background = formColor;
    minClientSize = { 400, 112 };
 
 public:
index 1c4363f..74a28a1 100644 (file)
@@ -8,7 +8,7 @@ public class GoToDialog : Window
    minClientSize = { 300, 80 };
    hasClose = true;
    tabCycle = true;
-   background = activeBorder;
+   background = formColor;
 
 public:
    property int line { set { if(value) lineBox.Printf("%d", value); else lineBox.Clear(); } get { return line; } };
index 0db1e32..dcfea1b 100644 (file)
@@ -12,7 +12,7 @@ static class MsgLine : struct
 public enum MessageBoxType { ok, yesNo, okCancel, yesNoCancel };
 public class MessageBox : Window
 {
-   background = activeBorder;
+   background = formColor;
    hasClose = true;
    tabCycle = true;
    nativeDecorations = true;
index de6b274..db9e209 100644 (file)
@@ -9,7 +9,7 @@ public class ReplaceDialog : Window
    hasClose = true;
    tabCycle = true;
    borderStyle = fixed;
-   background = activeBorder;
+   background = formColor;
    minClientSize = { 432, 144 };
    text = $"Replace";
   
index 4404956..4265f2e 100644 (file)
@@ -10,7 +10,7 @@ public:
    tabCycle = true;
    borderStyle = sizable;
    hasClose = true;
-   background = activeBorder;
+   background = formColor;
 
 private:
    bool OnCreate()
index 0a6043c..68406ce 100644 (file)
@@ -354,7 +354,7 @@ public class WindowsSkin_Window : Window
          {
             // Frame for ES_CAPTION windows
             surface.Bevel(false, 0, 0, size.w, size.h);
-            surface.SetForeground(activeBorder);
+            surface.SetForeground(formColor);
             surface.Rectangle(2, 2, size.w-3, size.h-3);
 
             // Resizeable frame is 1 pixel thicker 
@@ -371,7 +371,7 @@ public class WindowsSkin_Window : Window
             GRADIENT_SMOOTHNESS, GRADIENT_DIRECTION,
                border, top, size.w - border - 1, top + CAPTION - 2);
 
-         surface.SetForeground(activeBorder);
+         surface.SetForeground(formColor);
          if(state != minimized)
             surface.HLine(border, size.w-border-1, top + CAPTION-1);
 
@@ -396,7 +396,7 @@ public class WindowsSkin_Window : Window
       {
          if(sbh && sbh.visible && sbv && sbv.visible)
          {
-            surface.SetBackground(activeBorder);
+            surface.SetBackground(formColor);
             surface.Area(
                clientStart.x + clientSize.w,
                clientStart.y + clientSize.h,
@@ -638,12 +638,12 @@ public class WindowsSkin_Button : Button
             int start = (clientSize.h - height) / 2;
 
             if(!isEnabled)
-               // surface.SetBackground(activeBorder);
+               // surface.SetBackground(formColor);
                surface.SetBackground(gainsboro);
             else if(active && !text)
-               surface.SetBackground((offset ? activeBorder : Color { 0,0,170 }));
+               surface.SetBackground((offset ? formColor : Color { 0,0,170 }));
             else
-               surface.SetBackground((offset ? activeBorder : white));
+               surface.SetBackground((offset ? formColor : white));
             surface.Area(2, start+2,height-3,start+height-3);
 
             surface.SetForeground(Color { 85, 85, 85 });