From 18117e849520d4e7e9d79d0f3b46748a75efc90e Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 28 Mar 2008 12:13:16 +0100 Subject: [PATCH] [styles] Use 0xffffffff as auto value for shadow (FS#117) Signed-off-by: Julien Danjou --- common/configopts.c | 2 +- common/draw.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/configopts.c b/common/configopts.c index b7611dee..4510a615 100644 --- a/common/configopts.c +++ b/common/configopts.c @@ -167,7 +167,7 @@ cfg_opt_t style_opts[] = /** Shadow color. */ CFG_STR((char *) "shadow", NULL, CFGF_NONE), /** Shadow offset in pixel. */ - CFG_INT((char *) "shadow_offset", 0, CFGF_NONE), + CFG_INT((char *) "shadow_offset", 0xffffffff, CFGF_NONE), /** Font being used */ CFG_STR((char *) "font", NULL, CFGF_NONE), CFG_AWESOME_END() diff --git a/common/draw.c b/common/draw.c index c338cdb0..162d0ae1 100644 --- a/common/draw.c +++ b/common/draw.c @@ -844,6 +844,7 @@ draw_style_init(Display *disp, int phys_screen, cfg_t *cfg, style_t *c, style_t *m) { char *buf; + int shadow; if(m) *c = *m; @@ -866,7 +867,8 @@ draw_style_init(Display *disp, int phys_screen, cfg_t *cfg, draw_color_new(disp, phys_screen, cfg_getstr(cfg, "shadow"), &c->shadow); - c->shadow_offset = cfg_getint(cfg, "shadow_offset"); + if((shadow = cfg_getint(cfg, "shadow_offset")) != (int) 0xffffffff) + c->shadow_offset = shadow; } /** Remove a area from a list of them,