aboutsummaryrefslogtreecommitdiff
path: root/src/render.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2013-09-12 22:33:36 +0200
committerThomas White <taw@bitwiz.org.uk>2013-09-12 22:33:36 +0200
commitde00bf46d8a6a0d1fc6a61af19f108f1a7aac0b5 (patch)
tree6bee18cdc36187f1830e529f92ad4e68c57172f7 /src/render.c
parent2d4f61ab5bc6f87b2c4068d096c9c54a63caf342 (diff)
Fix top/default styles
Diffstat (limited to 'src/render.c')
-rw-r--r--src/render.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/render.c b/src/render.c
index 4199863..03125a1 100644
--- a/src/render.c
+++ b/src/render.c
@@ -332,20 +332,22 @@ static int render_frame(cairo_t *cr, struct frame *fr, ImageStore *is,
struct frame *ch = fr->children[i];
double mtot;
- if ( (ch->style != NULL) && ch->lop_from_style ) {
- memcpy(&ch->lop, &ch->style->lop,
- sizeof(struct layout_parameters));
- } else {
- double x, y, w, h;
- LengthUnits wu, hu;
- x = ch->lop.x; y = ch->lop.y;
- w = ch->lop.w; h = ch->lop.h;
- wu = ch->lop.w_units; hu = ch->lop.h_units;
- memcpy(&ch->lop, &ch->style->lop,
- sizeof(struct layout_parameters));
- ch->lop.x = x; ch->lop.y = y;
- ch->lop.w = w; ch->lop.h = h;
- ch->lop.w_units = wu; ch->lop.h_units = hu;
+ if ( ch->style != NULL ) {
+ if ( ch->lop_from_style ) {
+ memcpy(&ch->lop, &ch->style->lop,
+ sizeof(struct layout_parameters));
+ } else {
+ double x, y, w, h;
+ LengthUnits wu, hu;
+ x = ch->lop.x; y = ch->lop.y;
+ w = ch->lop.w; h = ch->lop.h;
+ wu = ch->lop.w_units; hu = ch->lop.h_units;
+ memcpy(&ch->lop, &ch->style->lop,
+ sizeof(struct layout_parameters));
+ ch->lop.x = x; ch->lop.y = y;
+ ch->lop.w = w; ch->lop.h = h;
+ ch->lop.w_units = wu; ch->lop.h_units = hu;
+ }
}
mtot = ch->lop.margin_l + ch->lop.margin_r;