changeset 1955:3066d77f278e

Fixed border colors mismatches in drawBorder* functions
author Jorge Arellano Cid <jcid@dillo.org>
date Thu, 24 Mar 2011 21:18:56 -0300
parents b0fd6feb8c51
children 76ed17497099
files dw/style.cc
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/dw/style.cc	Thu Mar 24 18:23:15 2011 -0300
+++ b/dw/style.cc	Thu Mar 24 21:18:56 2011 -0300
@@ -535,7 +535,7 @@
       dotted = true;
    case BORDER_DASHED:
       w = style->borderWidth.bottom;
-      view->drawTypedLine(style->borderColor.top, shading,
+      view->drawTypedLine(style->borderColor.bottom, shading,
                           dotted ? LINE_DOTTED : LINE_DASHED,
                           w, x1+w/2, y1-w/2, x2-w/2, y2-w/2);
       break;
@@ -555,7 +555,7 @@
          points[2][0] = points[1][0] - style->borderWidth.right;
          points[3][0] = points[0][0] + style->borderWidth.left;
          points[2][1] = points[3][1] = points[0][1]-style->borderWidth.bottom;
-         view->drawPolygon (style->borderColor.top, shading, filled, convex,
+         view->drawPolygon (style->borderColor.bottom, shading, filled, convex,
                             points, 4);
       }
       break;
@@ -581,7 +581,7 @@
       points[3][0] = points[0][0] - style->borderWidth.left / 2;
       points[2][1] = points[3][1] = points[0][1] + w/2;
       shading = (ridge) ? Color::SHADING_LIGHT : Color::SHADING_DARK;
-      view->drawPolygon (style->borderColor.top, shading, filled, convex,
+      view->drawPolygon (style->borderColor.bottom, shading, filled, convex,
                          points, 4);
       break;
    case BORDER_DOUBLE:
@@ -599,7 +599,7 @@
       points[2][0] = points[1][0] + w_l;
       points[3][0] = points[0][0] - w_r;
       points[2][1] = points[3][1] = points[0][1] - w;
-      view->drawPolygon (style->borderColor.top, shading, filled, convex,
+      view->drawPolygon (style->borderColor.bottom, shading, filled, convex,
                          points, 4);
       points[0][0] = x2 + 2 - style->borderWidth.right + w_r;
       points[1][0] = x1 - 1 + style->borderWidth.left - w_l;
@@ -607,7 +607,7 @@
       points[2][0] = x1 - 1 + style->borderWidth.left;
       points[3][0] = x2 + 2 - style->borderWidth.right;
       points[2][1] = points[3][1] = y1 + 1 - style->borderWidth.bottom;
-      view->drawPolygon (style->borderColor.top, shading, filled, convex,
+      view->drawPolygon (style->borderColor.bottom, shading, filled, convex,
                          points, 4);
       break;
    }
@@ -668,7 +668,7 @@
       points[2][1] = y2 - style->borderWidth.bottom / 2;
       points[3][1] = y1 + style->borderWidth.top / 2;
       shading = (ridge) ? Color::SHADING_LIGHT : Color::SHADING_DARK;
-      view->drawPolygon (style->borderColor.top, shading, filled, convex,
+      view->drawPolygon (style->borderColor.left, shading, filled, convex,
                          points, 4);
       points[0][0] = points[1][0] = x1 + w / 2 + d;
       points[0][1] = y1 + style->borderWidth.top / 2;
@@ -677,7 +677,7 @@
       points[2][1] = y2 - style->borderWidth.bottom;
       points[3][1] = y1 + style->borderWidth.top;
       shading = (ridge) ? Color::SHADING_DARK : Color::SHADING_LIGHT;
-      view->drawPolygon (style->borderColor.top, shading, filled, convex,
+      view->drawPolygon (style->borderColor.left, shading, filled, convex,
                          points, 4);
       break;
    case BORDER_DOUBLE: