diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/frame.h | 3 | ||||
-rw-r--r-- | src/mainwindow.c | 4 | ||||
-rw-r--r-- | src/render.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/frame.h b/src/frame.h index 2e645a6..bce1009 100644 --- a/src/frame.h +++ b/src/frame.h @@ -92,7 +92,8 @@ struct frame size_t pos; struct layout_parameters lop; - struct style *style; /* Non-NULL if 'lop' came from SS */ + struct style *style; + int lop_from_style;/* Trye if lop came from SS */ /* The rectangle allocated to this frame, determined by the renderer */ double x; diff --git a/src/mainwindow.c b/src/mainwindow.c index 312c905..01e8062 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -555,6 +555,7 @@ static gint add_furniture(GtkWidget *widget, struct presentation *p) fr = add_subframe(p->cur_edit_slide->top); fr->style = sty; + fr->lop_from_style = 1; set_edit(p, p->cur_edit_slide); fr->sc = strdup("Hello"); fr->sc_len = 6; @@ -1035,7 +1036,8 @@ static void create_frame(struct presentation *p, double x, double y, fr = add_subframe(parent); fr->sc = strdup("New frame!"); - fr->style = NULL; + fr->style = find_style(p->ss, "Content"); + fr->lop_from_style = 0; fr->lop.x = x; fr->lop.y = y; fr->lop.w = w; diff --git a/src/render.c b/src/render.c index 2c79253..fe52a26 100644 --- a/src/render.c +++ b/src/render.c @@ -289,7 +289,7 @@ static int render_frame(struct frame *fr, double scale) struct frame *ch = fr->children[i]; double mtot; - if ( ch->style != NULL ) { + if ( (ch->style != NULL) && ch->lop_from_style ) { memcpy(&ch->lop, &ch->style->lop, sizeof(struct layout_parameters)); } |