changeset 1771:47ae467a64e0

don't try to draw 0-width borders
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Thu, 25 Nov 2010 16:49:14 +0100
parents 4779a3d891a1
children d3eb50e48d9d
files dw/style.cc
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dw/style.cc	Wed Nov 24 19:26:45 2010 +0000
+++ b/dw/style.cc	Thu Nov 25 16:49:14 2010 +0100
@@ -427,7 +427,7 @@
    bool ridge = false, inset = false, dotted = false;
    Color::Shading shading = Color::SHADING_NORMAL;
 
-   if (!style->borderColor.top)
+   if (!style->borderColor.top || style->borderWidth.top == 0)
       return;
 
    switch (style->borderStyle.top) {
@@ -517,7 +517,7 @@
    bool ridge = false, inset = false, dotted = false;
    Color::Shading shading = Color::SHADING_NORMAL;
 
-   if (!style->borderColor.bottom)
+   if (!style->borderColor.bottom || style->borderWidth.bottom == 0)
       return;
 
    switch (style->borderStyle.bottom) {
@@ -609,7 +609,7 @@
    bool ridge = false, inset = false, dotted = false;
    Color::Shading shading = Color::SHADING_NORMAL;
 
-   if (!style->borderColor.left)
+   if (!style->borderColor.left || style->borderWidth.left == 0)
       return;
 
    switch (style->borderStyle.left) {
@@ -699,7 +699,7 @@
    bool ridge = false, inset = false, dotted = false;
    Color::Shading shading = Color::SHADING_NORMAL;
 
-   if (!style->borderColor.right)
+   if (!style->borderColor.right || style->borderWidth.right == 0)
       return;
 
    switch (style->borderStyle.right) {