aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-09-19 23:27:16 +0200
committerThomas White <taw@bitwiz.org.uk>2014-09-19 23:27:16 +0200
commitc5068cb535c9088c0051917fe001564aa936deaf (patch)
tree05f8ee16f299e567b357ae194ec8962c73342d97
parentec4f394db8d6b74da01fa98a24a4e111f06b223d (diff)
Set overall slide background in style sheet
-rw-r--r--src/sc_interp.c5
1 files changed, 5 insertions, 0 deletions
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);