aboutsummaryrefslogtreecommitdiff
path: root/dw/style.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dw/style.cc')
-rw-r--r--dw/style.cc37
1 files changed, 19 insertions, 18 deletions
diff --git a/dw/style.cc b/dw/style.cc
index bdb04f25..f33a3a9f 100644
--- a/dw/style.cc
+++ b/dw/style.cc
@@ -64,11 +64,9 @@ void StyleAttrs::initValues ()
*/
void StyleAttrs::resetValues ()
{
- x_link = -1;
x_img = -1;
x_tooltip = NULL;
- textAlign = TEXT_ALIGN_LEFT; /* ??? */
valign = VALIGN_MIDDLE;
textAlignChar = '.';
backgroundColor = NULL;
@@ -85,7 +83,6 @@ void StyleAttrs::resetValues ()
display = DISPLAY_INLINE;
whiteSpace = WHITE_SPACE_NORMAL;
- cursor = CURSOR_DEFAULT; /** \todo Check CSS specification again. */
}
/**
@@ -488,9 +485,6 @@ void drawBorder (View *view, Rectangle *area,
Color::Shading top, right, bottom, left;
int xb1, yb1, xb2, yb2, xp1, yp1, xp2, yp2;
- if (style->borderStyle.top == BORDER_NONE)
- return;
-
xb1 = x + style->margin.left;
yb1 = y + style->margin.top;
xb2 = xb1 + width - style->margin.left - style->margin.right;
@@ -521,18 +515,25 @@ void drawBorder (View *view, Rectangle *area,
break;
}
- drawPolygon (view, style->borderColor.top, top, xb1, yb1, xb2, yb1,
- style->borderWidth.top, style->borderWidth.left,
- - style->borderWidth.right);
- drawPolygon (view, style->borderColor.right, right, xb2, yb1, xb2, yb2,
- - style->borderWidth.right, style->borderWidth.top,
- - style->borderWidth.bottom);
- drawPolygon (view, style->borderColor.bottom, bottom, xb1, yb2, xb2, yb2,
- - style->borderWidth.bottom, style->borderWidth.left,
- - style->borderWidth.right);
- drawPolygon (view, style->borderColor.left, left, xb1, yb1, xb1, yb2,
- style->borderWidth.left, style->borderWidth.top,
- - style->borderWidth.bottom);
+ if (style->borderStyle.top != BORDER_NONE && style->borderColor.top)
+ drawPolygon (view, style->borderColor.top, top, xb1, yb1, xb2, yb1,
+ style->borderWidth.top, style->borderWidth.left,
+ - style->borderWidth.right);
+
+ if (style->borderStyle.right != BORDER_NONE && style->borderColor.right)
+ drawPolygon (view, style->borderColor.right, right, xb2, yb1, xb2, yb2,
+ - style->borderWidth.right, style->borderWidth.top,
+ - style->borderWidth.bottom);
+
+ if (style->borderStyle.bottom != BORDER_NONE && style->borderColor.bottom)
+ drawPolygon (view, style->borderColor.bottom, bottom, xb1, yb2, xb2, yb2,
+ - style->borderWidth.bottom, style->borderWidth.left,
+ - style->borderWidth.right);
+
+ if (style->borderStyle.left != BORDER_NONE && style->borderColor.left)
+ drawPolygon (view, style->borderColor.left, left, xb1, yb1, xb1, yb2,
+ style->borderWidth.left, style->borderWidth.top,
+ - style->borderWidth.bottom);
}