static gboolean find_int(ParseState *ps, xmlNodePtr n, const gchar *names[],
gint *integer, gint lower, gint upper);
static gboolean find_string(ParseState *ps, xmlNodePtr n, const gchar *names[],
- const gchar **string);
+ gchar **string);
static gboolean find_color(ParseState *ps, xmlNodePtr n, const gchar *names[],
RrColor **color, gchar *alpha);
static gboolean find_point(ParseState *ps, xmlNodePtr n, const gchar *names[],
ParseState ps;
xmlNodePtr root;
RrJustify winjust, mtitlejust;
- const gchar *str;
+ gchar *str;
RrTheme *theme;
if (name) {
winjust = RR_JUSTIFY_RIGHT;
else if (strcmp(str, "center") == 0)
winjust = RR_JUSTIFY_CENTER;
+ g_free(str);
}
if (menu_title_font) {
mtitlejust = RR_JUSTIFY_RIGHT;
else if (strcmp(str, "center") == 0)
mtitlejust = RR_JUSTIFY_CENTER;
+ g_free(str);
}
if (menu_item_font) {
{
RrAppearanceFree(theme->a_toggled_hover_focused_max);
theme->a_toggled_hover_focused_max =
- RrAppearanceCopy(theme->a_toggled_focused_pressed_max);
+ RrAppearanceCopy(theme->a_toggled_focused_unpressed_max);
}
if (!FIND(appearance, L("window","inactive","buttons","toggled-hover"),
theme->a_toggled_hover_unfocused_max, TRUE))
{
RrAppearanceFree(theme->a_toggled_hover_unfocused_max);
theme->a_toggled_hover_unfocused_max =
- RrAppearanceCopy(theme->a_toggled_unfocused_pressed_max);
+ RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max);
}
theme->a_disabled_focused_close =
theme->a_toggled_focused_unpressed_shade->texture[0].data.mask.color =
theme->titlebut_toggled_focused_unpressed_color;
theme->a_toggled_unfocused_unpressed_max->texture[0].data.mask.color =
- theme->a_toggled_unfocused_unpressed_desk->
- texture[0].data.mask.color =
- theme->a_toggled_unfocused_unpressed_shade->
- texture[0].data.mask.color =
+ theme->a_toggled_unfocused_unpressed_desk->texture[0].data.mask.color =
+ theme->a_toggled_unfocused_unpressed_shade->texture[0].data.mask.color=
theme->titlebut_toggled_unfocused_unpressed_color;
theme->a_focused_unpressed_max->texture[0].data.mask.color =
theme->a_focused_unpressed_close->texture[0].data.mask.color =
RrMargins(theme->a_focused_label, &fl, &ft, &fr, &fb);
RrMargins(theme->a_unfocused_label, &ul, &ut, &ur, &ub);
theme->label_height = theme->win_font_height + MAX(ft + fb, ut + ub);
+ theme->label_height += theme->label_height % 2;
/* this would be nice I think, since padding.width can now be 0,
but it breaks frame.c horribly and I don't feel like fixing that
MAX(theme->padding * 2, ut + ub));
*/
theme->title_height = theme->label_height + theme->paddingy * 2;
- /* this should match the above title_height given the same font size
- for both. */
- theme->menu_title_height = theme->menu_title_font_height +
+
+ RrMargins(theme->a_menu_title, &ul, &ut, &ur, &ub);
+ theme->menu_title_label_height = theme->menu_title_font_height+ut+ub;
+ theme->menu_title_height = theme->menu_title_label_height +
theme->paddingy * 2;
}
theme->button_size = theme->label_height - 2;
RrPixmapMaskFree(theme->max_mask);
RrPixmapMaskFree(theme->max_toggled_mask);
+ RrPixmapMaskFree(theme->max_toggled_hover_mask);
+ RrPixmapMaskFree(theme->max_toggled_pressed_mask);
RrPixmapMaskFree(theme->max_disabled_mask);
RrPixmapMaskFree(theme->max_hover_mask);
RrPixmapMaskFree(theme->max_pressed_mask);
RrPixmapMaskFree(theme->desk_mask);
RrPixmapMaskFree(theme->desk_toggled_mask);
+ RrPixmapMaskFree(theme->desk_toggled_hover_mask);
+ RrPixmapMaskFree(theme->desk_toggled_pressed_mask);
RrPixmapMaskFree(theme->desk_disabled_mask);
RrPixmapMaskFree(theme->desk_hover_mask);
RrPixmapMaskFree(theme->desk_pressed_mask);
RrPixmapMaskFree(theme->shade_mask);
RrPixmapMaskFree(theme->shade_toggled_mask);
+ RrPixmapMaskFree(theme->shade_toggled_hover_mask);
+ RrPixmapMaskFree(theme->shade_toggled_pressed_mask);
RrPixmapMaskFree(theme->shade_disabled_mask);
RrPixmapMaskFree(theme->shade_hover_mask);
RrPixmapMaskFree(theme->shade_pressed_mask);
}
static gboolean find_string(ParseState *ps, xmlNodePtr n, const gchar *names[],
- const gchar **string)
+ gchar **string)
{
if ((n = find_node(n, names))) {
*string = parse_string(ps->doc, n);