aboutsummaryrefslogtreecommitdiff
path: root/src/presentation.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2018-10-18 08:54:14 +0200
committerThomas White <taw@bitwiz.me.uk>2018-10-18 08:54:14 +0200
commitafad5f6ac5ba0e4b92158c35f23f41688f92b048 (patch)
tree390f055ea41b3f982476881871349617f6fed178 /src/presentation.c
parentfc8081e6b052e2901aa56676c5cab61eaa5996e2 (diff)
Set slide size from stylesheet
Diffstat (limited to 'src/presentation.c')
-rw-r--r--src/presentation.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/presentation.c b/src/presentation.c
index c3f0d07..1aa126a 100644
--- a/src/presentation.c
+++ b/src/presentation.c
@@ -228,7 +228,16 @@ SCBlock *prev_slide(struct presentation *p, SCBlock *sl)
static void set_slide_size_from_stylesheet(struct presentation *p)
{
- /* FIXME: From JSON */
+ char *result;
+
+ result = stylesheet_lookup(p->stylesheet, "$.slide.size");
+ if ( result != NULL ) {
+ float v[2];
+ if ( parse_double(result, v) == 0 ) {
+ p->slide_width = v[0];
+ p->slide_height = v[1];
+ }
+ }
}