aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/Rectangle.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/generic/Rectangle.c b/generic/Rectangle.c
index ab91e3e..19146a6 100644
--- a/generic/Rectangle.c
+++ b/generic/Rectangle.c
@@ -548,14 +548,20 @@ Draw(Item item)
/* Draw the outline */
if (rect->line_width) {
if (rect->relief != RELIEF_FLAT) {
- ZnPoint p[5];
- for (i = 0; i < 4; i++) {
- p[4-i].x = rect->dev[i].x;
- p[4-i].y = rect->dev[i].y;
+ if (aligned) {
+ DrawRectangleRelief(wi, rect->relief, rect->gradient,
+ &r, rect->line_width);
+ }
+ else {
+ ZnPoint p[5];
+ for (i = 0; i < 4; i++) {
+ p[4-i].x = rect->dev[i].x;
+ p[4-i].y = rect->dev[i].y;
+ }
+ p[0] = p[4];
+ DrawPolygonRelief(wi, rect->relief, rect->gradient,
+ p, 5, rect->line_width);
}
- p[0] = p[4];
- DrawPolygonRelief(wi, rect->relief, rect->gradient,
- p, 5, rect->line_width);
}
else {
SetLineStyle(wi->dpy, wi->gc, rect->line_style);