diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-11 22:18:43 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-11 22:18:43 +0000 |
| commit | b63ad92cca9f14a1d86c00bd76b52c1626a29ee3 (patch) | |
| tree | 8634ba30a989b859f09113b7631b5053e3e18abe /render | |
| parent | b2006b8b451f52ce274980b6b3cb626d1347da88 (diff) | |
give different border colors to active and inactive windows. adjust the xml theme format a little to make it BETTER. rawr. add some metadata standards too.
Diffstat (limited to 'render')
| -rw-r--r-- | render/theme.c | 44 | ||||
| -rw-r--r-- | render/theme.h | 5 |
2 files changed, 30 insertions, 19 deletions
diff --git a/render/theme.c b/render/theme.c index dd9c7653..1dd49caf 100644 --- a/render/theme.c +++ b/render/theme.c @@ -196,31 +196,40 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name, &theme->paddingx, &theme->paddingy, 0, 100, 0, 100)) theme->paddingx = theme->paddingy = 3; - if (!FIND(int, L("window","border","width"), + if (!FIND(int, L("dimensions","window","border"), &theme->fbwidth, 0, 100)) theme->fbwidth = 1; /* menu border width inherits from frame border width */ - if (!FIND(int, L("menu","border","width"), + if (!FIND(int, L("dimensions","menu","border"), &theme->mbwidth, 0, 100)) theme->mbwidth = theme->fbwidth; - if (!FIND(point, L("window","clientpadding"), &theme->cbwidthx, - &theme->cbwidthy, 0, 100, 0, 100)) + if (!FIND(point, L("dimensions","window","clientpadding"), + &theme->cbwidthx, &theme->cbwidthy, 0, 100, 0, 100)) theme->cbwidthx = theme->cbwidthy = 1; /* load colors */ - if (!FIND(color, L("window","border","primary"), - &theme->frame_b_color, NULL)) - theme->frame_b_color = RrColorNew(inst, 0, 0, 0); - - /* menu border color inherits from frame border color */ - if (!FIND(color, L("menu","border","primary"), - &theme->menu_b_color, NULL)) - theme->menu_b_color = RrColorNew(inst, - theme->frame_b_color->r, - theme->frame_b_color->g, - theme->frame_b_color->b); + if (!FIND(color, L("window","active","border"), + &theme->frame_focused_border_color, NULL)) + theme->frame_focused_border_color = RrColorNew(inst, 0, 0, 0); + /* frame unfocused border color inherits from frame focused border color */ + if (!FIND(color, L("window","inactive","border"), + &theme->frame_unfocused_border_color, NULL)) + theme->frame_unfocused_border_color = + RrColorNew(inst, + theme->frame_focused_border_color->r, + theme->frame_focused_border_color->g, + theme->frame_focused_border_color->b); + + /* menu border color inherits from frame focused border color */ + if (!FIND(color, L("menu","border"), + &theme->menu_border_color, NULL)) + theme->menu_border_color = + RrColorNew(inst, + theme->frame_focused_border_color->r, + theme->frame_focused_border_color->g, + theme->frame_focused_border_color->b); if (!FIND(color, L("window","active","clientpadding"), &theme->cb_focused_color, NULL)) theme->cb_focused_color = RrColorNew(inst, 255, 255, 255); @@ -1220,8 +1229,9 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name, void RrThemeFree(RrTheme *theme) { if (theme) { - RrColorFree(theme->menu_b_color); - RrColorFree(theme->frame_b_color); + RrColorFree(theme->menu_border_color); + RrColorFree(theme->frame_focused_border_color); + RrColorFree(theme->frame_unfocused_border_color); RrColorFree(theme->cb_unfocused_color); RrColorFree(theme->cb_focused_color); RrColorFree(theme->title_focused_color); diff --git a/render/theme.h b/render/theme.h index 85e5aa73..4e87fb12 100644 --- a/render/theme.h +++ b/render/theme.h @@ -57,8 +57,9 @@ struct _RrTheme { gint menu_title_height; /* style settings - colors */ - RrColor *menu_b_color; - RrColor *frame_b_color; + RrColor *menu_border_color; + RrColor *frame_focused_border_color; + RrColor *frame_unfocused_border_color; RrColor *cb_focused_color; RrColor *cb_unfocused_color; RrColor *title_focused_color; |
