RrTheme* RrThemeNew(const RrInstance *inst, gchar *name)
{
XrmDatabase db = NULL;
- RrJustify winjust, mtitlejust, mjust;
+ RrJustify winjust, mtitlejust;
gchar *str;
gchar *font_str;
RrTheme *theme;
theme->inst = inst;
+ theme->show_handle = TRUE;
+
theme->a_disabled_focused_max = RrAppearanceNew(inst, 1);
theme->a_disabled_unfocused_max = RrAppearanceNew(inst, 1);
theme->a_hover_focused_max = RrAppearanceNew(inst, 1);
}
theme->mfont_height = RrFontHeight(theme->mfont);
- mjust = RR_JUSTIFY_LEFT;
- if (read_string(db, "menu.frame.justify", &str)) {
- if (!g_ascii_strcasecmp(str, "right"))
- mjust = RR_JUSTIFY_RIGHT;
- else if (!g_ascii_strcasecmp(str, "center"))
- mjust = RR_JUSTIFY_CENTER;
- }
-
/* load direct dimensions */
if (!read_int(db, "menuOverlap", &theme->menu_overlap) ||
theme->menu_overlap < 0 || theme->menu_overlap > 20)
- theme->handle_height = 0;
- if (!read_int(db, "handleWidth", &theme->handle_height) ||
- theme->handle_height < 0 || theme->handle_height > 100)
+ theme->menu_overlap = 0;
+ if (!read_int(db, "handleWidth", &theme->handle_height))
+ theme->handle_height = 6;
+ if (!theme->handle_height)
+ theme->show_handle = FALSE;
+ if (theme->handle_height <= 0 || theme->handle_height > 100)
theme->handle_height = 6;
if (!read_int(db, "bevelWidth", &theme->bevel) ||
- theme->bevel <= 0 || theme->bevel > 100) theme->bevel = 3;
+ theme->bevel <= 0 || theme->bevel > 100)
+ theme->bevel = 3;
if (!read_int(db, "borderWidth", &theme->bwidth) ||
- theme->bwidth < 0 || theme->bwidth > 100) theme->bwidth = 1;
+ theme->bwidth < 0 || theme->bwidth > 100)
+ theme->bwidth = 1;
if (!read_int(db, "frameWidth", &theme->cbwidth) ||
theme->cbwidth < 0 || theme->cbwidth > 100)
theme->cbwidth = theme->bevel;
}
if (!read_mask(inst, "bullet.xbm", theme, &theme->menu_bullet_mask)) {
- guchar data[] = { 0x18, 0x30, 0x60, 0xfe, 0xfe, 0x60, 0x30, 0x18 };
- theme->menu_bullet_mask = RrPixmapMaskNew(inst, 8, 8, (char*)data);
+ guchar data[] = { 0x01, 0x03, 0x07, 0x0f, 0x07, 0x03, 0x01 };
+ theme->menu_bullet_mask = RrPixmapMaskNew(inst, 4, 7, (char*)data);
}
/* read the decoration textures */
theme->a_menu_text_hilite->texture[0].type = RR_TEXTURE_TEXT;
theme->a_menu_text_item->texture[0].data.text.justify =
theme->a_menu_text_disabled->texture[0].data.text.justify =
- theme->a_menu_text_hilite->texture[0].data.text.justify = mjust;
+ theme->a_menu_text_hilite->texture[0].data.text.justify =
+ RR_JUSTIFY_LEFT;
theme->a_menu_text_item->texture[0].data.text.font =
theme->a_menu_text_disabled->texture[0].data.text.font =
theme->a_menu_text_hilite->texture[0].data.text.font = theme->mfont;