From c5068cb535c9088c0051917fe001564aa936deaf Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 19 Sep 2014 23:27:16 +0200 Subject: Set overall slide background in style sheet --- src/sc_interp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sc_interp.c b/src/sc_interp.c index 2a07ced..3ee41ff 100644 --- a/src/sc_interp.c +++ b/src/sc_interp.c @@ -165,6 +165,8 @@ static void set_frame_bgcolour(struct frame *fr, const char *colour) { GdkRGBA col; + if ( fr == NULL ) return; + if ( colour == NULL ) { printf("Invalid colour\n"); fr->bgcol[0] = 0.0; @@ -785,6 +787,9 @@ void sc_interp_run_stylesheet(SCInterpreter *scin, SCBlock *bl) } else if ( strcmp(name, "fgcol") == 0 ) { set_colour(scin, options); + + } else if ( strcmp(name, "bgcol") == 0 ) { + set_frame_bgcolour(sc_interp_get_frame(scin), options); } bl = sc_block_next(bl); -- cgit v1.2.3