From b6ad10764e75923ecb55d3dce96415eb991c64ec Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 17 Mar 2003 01:26:15 +0000 Subject: [PATCH] load and set the titles justification --- engines/openbox/theme.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/engines/openbox/theme.c b/engines/openbox/theme.c index 76207826..50e54844 100644 --- a/engines/openbox/theme.c +++ b/engines/openbox/theme.c @@ -249,6 +249,8 @@ void set_default_appearance(Appearance *a) gboolean load() { XrmDatabase db = NULL; + Justify winjust; + char *winjuststr; if (themerc_theme != NULL) { db = loaddb(themerc_theme); @@ -272,6 +274,15 @@ gboolean load() s_winfont_height = font_height(s_winfont, s_winfont_shadow, s_winfont_shadow_offset); + winjust = Justify_Left; + if (read_string(db, "window.justify", &winjuststr)) { + if (!g_ascii_strcasecmp(winjuststr, "right")) + winjust = Justify_Right; + else if (!g_ascii_strcasecmp(winjuststr, "center")) + winjust = Justify_Center; + g_free(winjuststr); + } + if (!read_int(db, "handleWidth", &s_handle_height) || s_handle_height < 0 || s_handle_height > 100) s_handle_height = 6; if (!read_int(db, "bevelWidth", &s_bevel) || @@ -368,12 +379,14 @@ gboolean load() /* set up the textures */ a_focused_label->texture[0].type = Text; + a_focused_label->texture[0].data.text.justify = winjust; a_focused_label->texture[0].data.text.font = s_winfont; a_focused_label->texture[0].data.text.shadow = s_winfont_shadow; a_focused_label->texture[0].data.text.offset = s_winfont_shadow_offset; a_focused_label->texture[0].data.text.color = s_title_focused_color; a_unfocused_label->texture[0].type = Text; + a_unfocused_label->texture[0].data.text.justify = winjust; a_unfocused_label->texture[0].data.text.font = s_winfont; a_unfocused_label->texture[0].data.text.shadow = s_winfont_shadow; a_unfocused_label->texture[0].data.text.offset = s_winfont_shadow_offset; -- 2.45.2