changeset 1299:ad0d453e4f60

draw triangles if border sides differ in shade
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Wed, 02 Sep 2009 17:49:12 +0200
parents 9e939c62b7fe
children 2ea7cd263703
files dw/style.cc
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dw/style.cc	Wed Sep 02 04:52:37 2009 +0000
+++ b/dw/style.cc	Wed Sep 02 17:49:12 2009 +0200
@@ -486,11 +486,13 @@
 
    if (style->borderWidth.left > 1) {
       if (style->borderWidth.top > 1 &&
-          style->borderColor.left != style->borderColor.top)
+          (style->borderColor.left != style->borderColor.top ||
+           left != top))
          drawTriangle (view, style->borderColor.left, left,
                        xb1, yp1, xp1, yp1, xb1, yb1);
       if (style->borderWidth.bottom > 1 &&
-          style->borderColor.left != style->borderColor.bottom)
+          (style->borderColor.left != style->borderColor.bottom ||
+           left != bottom))
          drawTriangle (view, style->borderColor.left, left,
                        xb1, yp2, xp1, yp2, xb1, yb2);
    }
@@ -501,11 +503,13 @@
 
    if (style->borderWidth.right > 1) {
       if (style->borderWidth.top > 1 &&
-          style->borderColor.right != style->borderColor.top)
+          (style->borderColor.right != style->borderColor.top ||
+           right != top))
          drawTriangle (view, style->borderColor.right, right,
                        xb2, yp1, xp2, yp1, xb2, yb1);
       if (style->borderWidth.bottom > 1 &&
-          style->borderColor.right != style->borderColor.bottom)
+          (style->borderColor.right != style->borderColor.bottom ||
+           right != bottom))
          drawTriangle (view, style->borderColor.right, right,
                        xb2, yp2, xp2, yp2, xb2, yb2);
    }