diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/frame.c | 10 | ||||
-rw-r--r-- | src/mainwindow.c | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c index d237895..5e10dbf 100644 --- a/src/frame.c +++ b/src/frame.c @@ -232,6 +232,16 @@ static int recursive_unpack(struct frame *fr, const char *sc, StyleSheet *ss) sfr = add_subframe(fr); parse_options(sfr, b->options, ss); + if ( sfr->lop.w < 0.0 ) { + sfr->lop.x += sfr->lop.w; + sfr->lop.w = -sfr->lop.w; + } + + if ( sfr->lop.h < 0.0 ) { + sfr->lop.y += sfr->lop.h; + sfr->lop.h = -sfr->lop.h; + } + sfr->sc = remove_blocks(b->contents, "f"); sfr->sc_len = strlen(sfr->sc)+1; if ( recursive_unpack(sfr, b->contents, ss) ) { diff --git a/src/mainwindow.c b/src/mainwindow.c index 714b3ac..0830b02 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1440,6 +1440,16 @@ static struct frame *create_frame(struct presentation *p, double x, double y, parent = p->selection[0]; } + if ( w < 0.0 ) { + x += w; + w = -w; + } + + if ( h < 0.0 ) { + y += h; + h = -h; + } + fr = add_subframe(parent); fr->sc = NULL; fr->style = default_style(p->ss); |