]> Dogcows Code - chaz/openbox/blobdiff - render/theme.c
make the modifier key code a lot better...
[chaz/openbox] / render / theme.c
index 8d61d23de99c2cb6c0468a7366ff74dfd17eade2..cb50887bab6448e76e9e33315e53bf612120cacb 100644 (file)
@@ -66,7 +66,8 @@ static gboolean find_appearance(ParseState *ps, xmlNodePtr n, const gchar *names
 
 RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
                     RrFont *active_window_font, RrFont *inactive_window_font,
-                    RrFont *menu_title_font, RrFont *menu_item_font)
+                    RrFont *menu_title_font, RrFont *menu_item_font,
+                    RrFont *osd_font)
 {
     ParseState ps;
     xmlNodePtr root;
@@ -85,8 +86,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
     }
     if (!name) {
         if (!parse_load_theme(DEFAULT_THEME, &ps.doc, &root, &ps.path)) {
-            g_message("Unable to load the theme '%s'",
-                      name, DEFAULT_THEME);
+            g_message("Unable to load the theme '%s'", DEFAULT_THEME);
             return NULL;
         }
     }
@@ -174,6 +174,12 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
     } else
         theme->menu_font = RrFontOpenDefault(inst);
 
+    if (osd_font) {
+        theme->osd_font = osd_font;
+        RrFontRef(osd_font);
+    } else
+        theme->osd_font = RrFontOpenDefault(inst);
+
     /* load direct dimensions */
     if (!FIND(int, L("menu","overlap"),
               &theme->menu_overlap, -100, 100))
@@ -772,8 +778,8 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name,
     theme->a_focused_label->texture[0].data.text.justify = winjust;
     theme->osd_hilite_label->texture[0].data.text.justify = RR_JUSTIFY_LEFT;
     theme->a_focused_label->texture[0].data.text.font =
-        theme->osd_hilite_label->texture[0].data.text.font =
         theme->win_font_focused;
+    theme->osd_hilite_label->texture[0].data.text.font = theme->osd_font;
     theme->a_focused_label->texture[0].data.text.color =
         theme->title_focused_color;
     theme->osd_hilite_label->texture[0].data.text.color =
This page took 0.020615 seconds and 4 git commands to generate.