aboutsummaryrefslogtreecommitdiff
path: root/dw/style.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-11-25 16:49:14 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2010-11-25 16:49:14 +0100
commit30af6297da413a51272a20db8256aca28daacb82 (patch)
tree835f1c0a2a7e6750543b70ab6b618011ccdaee01 /dw/style.cc
parent58cb0cbc32a4e464d7f2601a872cc308bf5dd45b (diff)
don't try to draw 0-width borders
Diffstat (limited to 'dw/style.cc')
-rw-r--r--dw/style.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/dw/style.cc b/dw/style.cc
index e04c91d2..4b4ef33d 100644
--- a/dw/style.cc
+++ b/dw/style.cc
@@ -427,7 +427,7 @@ static void drawBorderTop(View *view, Style *style,
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 @@ static void drawBorderBottom(View *view, Style *style,
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 @@ static void drawBorderLeft(View *view, Style *style,
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 @@ static void drawBorderRight(View *view, Style *style,
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) {