From a72371b41f48a2d6a1e55099456d30d3b678b66c Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 8 Sep 2003 18:38:52 +0000 Subject: [PATCH] bigtime theme changes. bigtime. --- openbox/frame.c | 44 ++++----- openbox/framerender.c | 14 +-- openbox/popup.c | 32 +++---- render/theme.c | 150 ++++++++++++++---------------- render/theme.h | 4 +- themes/Allegro/openbox-3/themerc | 126 ++++++++++++------------- themes/Artwiz/openbox-3/themerc | 192 +++++++++++++++++++-------------------- themes/Blah41/openbox-3/themerc | 164 ++++++++++++++++----------------- themes/Om4Ob/openbox-3/themerc | 146 ++++++++++++++--------------- themes/TheBear/openbox-3/themerc | 152 +++++++++++++++---------------- tools/themeupdate/themeupdate.py | 166 +++++++++++++++++++++++++++++++-- 11 files changed, 659 insertions(+), 531 deletions(-) diff --git a/openbox/frame.c b/openbox/frame.c index fe5ddc4..cbb6dfd 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -511,32 +511,32 @@ static void layout_title(ObFrame *self) n = d = i = l = m = c = s = FALSE; /* figure out whats being shown, and the width of the label */ - self->label_width = self->width - (ob_rr_theme->bevel + 1) * 2; + self->label_width = self->width - (ob_rr_theme->padding + 1) * 2; for (lc = config_title_layout; *lc != '\0'; ++lc) { switch (*lc) { case 'N': if (n) { *lc = ' '; break; } /* rm duplicates */ n = TRUE; self->label_width -= (ob_rr_theme->button_size + 2 + - ob_rr_theme->bevel + 1); + ob_rr_theme->padding + 1); break; case 'D': if (d) { *lc = ' '; break; } /* rm duplicates */ d = TRUE; self->label_width -= (ob_rr_theme->button_size + - ob_rr_theme->bevel + 1); + ob_rr_theme->padding + 1); break; case 'S': if (s) { *lc = ' '; break; } /* rm duplicates */ s = TRUE; self->label_width -= (ob_rr_theme->button_size + - ob_rr_theme->bevel + 1); + ob_rr_theme->padding + 1); break; case 'I': if (i) { *lc = ' '; break; } /* rm duplicates */ i = TRUE; self->label_width -= (ob_rr_theme->button_size + - ob_rr_theme->bevel + 1); + ob_rr_theme->padding + 1); break; case 'L': if (l) { *lc = ' '; break; } /* rm duplicates */ @@ -546,13 +546,13 @@ static void layout_title(ObFrame *self) if (m) { *lc = ' '; break; } /* rm duplicates */ m = TRUE; self->label_width -= (ob_rr_theme->button_size + - ob_rr_theme->bevel + 1); + ob_rr_theme->padding + 1); break; case 'C': if (c) { *lc = ' '; break; } /* rm duplicates */ c = TRUE; self->label_width -= (ob_rr_theme->button_size + - ob_rr_theme->bevel + 1); + ob_rr_theme->padding + 1); break; } } @@ -569,57 +569,57 @@ static void layout_title(ObFrame *self) if (!m) XUnmapWindow(ob_display, self->max); if (!c) XUnmapWindow(ob_display, self->close); - x = ob_rr_theme->bevel + 1; + x = ob_rr_theme->padding + 1; for (lc = config_title_layout; *lc != '\0'; ++lc) { switch (*lc) { case 'N': if (!n) break; self->icon_x = x; XMapWindow(ob_display, self->icon); - XMoveWindow(ob_display, self->icon, x, ob_rr_theme->bevel); - x += ob_rr_theme->button_size + 2 + ob_rr_theme->bevel + 1; + XMoveWindow(ob_display, self->icon, x, ob_rr_theme->padding); + x += ob_rr_theme->button_size + 2 + ob_rr_theme->padding + 1; break; case 'D': if (!d) break; self->desk_x = x; XMapWindow(ob_display, self->desk); - XMoveWindow(ob_display, self->desk, x, ob_rr_theme->bevel + 1); - x += ob_rr_theme->button_size + ob_rr_theme->bevel + 1; + XMoveWindow(ob_display, self->desk, x, ob_rr_theme->padding + 1); + x += ob_rr_theme->button_size + ob_rr_theme->padding + 1; break; case 'S': if (!s) break; self->shade_x = x; XMapWindow(ob_display, self->shade); - XMoveWindow(ob_display, self->shade, x, ob_rr_theme->bevel + 1); - x += ob_rr_theme->button_size + ob_rr_theme->bevel + 1; + XMoveWindow(ob_display, self->shade, x, ob_rr_theme->padding + 1); + x += ob_rr_theme->button_size + ob_rr_theme->padding + 1; break; case 'I': if (!i) break; self->iconify_x = x; XMapWindow(ob_display, self->iconify); - XMoveWindow(ob_display, self->iconify, x, ob_rr_theme->bevel + 1); - x += ob_rr_theme->button_size + ob_rr_theme->bevel + 1; + XMoveWindow(ob_display,self->iconify, x, ob_rr_theme->padding + 1); + x += ob_rr_theme->button_size + ob_rr_theme->padding + 1; break; case 'L': if (!l) break; self->label_x = x; XMapWindow(ob_display, self->label); - XMoveWindow(ob_display, self->label, x, ob_rr_theme->bevel); - x += self->label_width + ob_rr_theme->bevel + 1; + XMoveWindow(ob_display, self->label, x, ob_rr_theme->padding); + x += self->label_width + ob_rr_theme->padding + 1; break; case 'M': if (!m) break; self->max_x = x; XMapWindow(ob_display, self->max); - XMoveWindow(ob_display, self->max, x, ob_rr_theme->bevel + 1); - x += ob_rr_theme->button_size + ob_rr_theme->bevel + 1; + XMoveWindow(ob_display, self->max, x, ob_rr_theme->padding + 1); + x += ob_rr_theme->button_size + ob_rr_theme->padding + 1; break; case 'C': if (!c) break; self->close_x = x; XMapWindow(ob_display, self->close); - XMoveWindow(ob_display, self->close, x, ob_rr_theme->bevel + 1); - x += ob_rr_theme->button_size + ob_rr_theme->bevel + 1; + XMoveWindow(ob_display, self->close, x, ob_rr_theme->padding + 1); + x += ob_rr_theme->button_size + ob_rr_theme->padding + 1; break; } } diff --git a/openbox/framerender.c b/openbox/framerender.c index a9025b3..1f783a5 100644 --- a/openbox/framerender.c +++ b/openbox/framerender.c @@ -140,31 +140,31 @@ void framerender_frame(ObFrame *self) /* set parents for any parent relative guys */ l->surface.parent = t; l->surface.parentx = self->label_x; - l->surface.parenty = ob_rr_theme->bevel; + l->surface.parenty = ob_rr_theme->padding; m->surface.parent = t; m->surface.parentx = self->max_x; - m->surface.parenty = ob_rr_theme->bevel + 1; + m->surface.parenty = ob_rr_theme->padding + 1; n->surface.parent = t; n->surface.parentx = self->icon_x; - n->surface.parenty = ob_rr_theme->bevel; + n->surface.parenty = ob_rr_theme->padding; i->surface.parent = t; i->surface.parentx = self->iconify_x; - i->surface.parenty = ob_rr_theme->bevel + 1; + i->surface.parenty = ob_rr_theme->padding + 1; d->surface.parent = t; d->surface.parentx = self->desk_x; - d->surface.parenty = ob_rr_theme->bevel + 1; + d->surface.parenty = ob_rr_theme->padding + 1; s->surface.parent = t; s->surface.parentx = self->shade_x; - s->surface.parenty = ob_rr_theme->bevel + 1; + s->surface.parenty = ob_rr_theme->padding + 1; c->surface.parent = t; c->surface.parentx = self->close_x; - c->surface.parenty = ob_rr_theme->bevel + 1; + c->surface.parenty = ob_rr_theme->padding + 1; framerender_label(self, l); framerender_max(self, m); diff --git a/openbox/popup.c b/openbox/popup.c index 8a3ec85..40757b5 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -102,11 +102,11 @@ void popup_size_to_string(Popup *self, gchar *text) self->a_text->texture[0].data.text.string = text; RrMinsize(self->a_text, &textw, &texth); /*XXX textw += ob_rr_theme->bevel * 2;*/ - texth += ob_rr_theme->bevel * 2; + texth += ob_rr_theme->padding * 2; - self->h = texth + ob_rr_theme->bevel * 2; + self->h = texth + ob_rr_theme->padding * 2; iconw = (self->hasicon ? texth : 0); - self->w = textw + iconw + ob_rr_theme->bevel * (self->hasicon ? 3 : 2); + self->w = textw + iconw + ob_rr_theme->padding * (self->hasicon ? 3 : 2); } void popup_set_text_align(Popup *self, RrJustify align) @@ -151,23 +151,23 @@ void popup_show(Popup *self, gchar *text, ObClientIcon *icon) /* measure the shit out */ RrMinsize(self->a_text, &textw, &texth); - /*XXX textw += ob_rr_theme->bevel * 2;*/ - texth += ob_rr_theme->bevel * 2; + /*XXX textw += ob_rr_theme->padding * 2;*/ + texth += ob_rr_theme->padding * 2; /* set the sizes up and reget the text sizes from the calculated outer sizes */ if (self->h) { h = self->h; - texth = h - (t+b + ob_rr_theme->bevel * 2); + texth = h - (t+b + ob_rr_theme->padding * 2); } else - h = t+b + texth + ob_rr_theme->bevel * 2; + h = t+b + texth + ob_rr_theme->padding * 2; iconw = (self->hasicon ? texth : 0); if (self->w) { w = self->w; - textw = w - (l+r + iconw + ob_rr_theme->bevel * + textw = w - (l+r + iconw + ob_rr_theme->padding * (self->hasicon ? 3 : 2)); } else - w = l+r + textw + iconw + ob_rr_theme->bevel * (self->hasicon ? 3 : 2); + w = l+r + textw + iconw + ob_rr_theme->padding * (self->hasicon ? 3 : 2); /* sanity checks to avoid crashes! */ if (w < 1) w = 1; if (h < 1) h = 1; @@ -209,19 +209,19 @@ void popup_show(Popup *self, gchar *text, ObClientIcon *icon) self->a_text->surface.parent = self->a_bg; self->a_text->surface.parentx = l + iconw + - ob_rr_theme->bevel * (self->hasicon ? 2 : 1); - self->a_text->surface.parenty = t + ob_rr_theme->bevel; + ob_rr_theme->padding * (self->hasicon ? 2 : 1); + self->a_text->surface.parenty = t + ob_rr_theme->padding; XMoveResizeWindow(ob_display, self->text, - l + iconw + ob_rr_theme->bevel * (self->hasicon ? 2 : 1), - t + ob_rr_theme->bevel, textw, texth); + l + iconw + ob_rr_theme->padding * (self->hasicon ? 2 : 1), + t + ob_rr_theme->padding, textw, texth); if (self->hasicon) { if (iconw < 1) iconw = 1; /* sanity check for crashes */ self->a_icon->surface.parent = self->a_bg; - self->a_icon->surface.parentx = l + ob_rr_theme->bevel; - self->a_icon->surface.parenty = t + ob_rr_theme->bevel; + self->a_icon->surface.parentx = l + ob_rr_theme->padding; + self->a_icon->surface.parenty = t + ob_rr_theme->padding; XMoveResizeWindow(ob_display, self->icon, - l + ob_rr_theme->bevel, t + ob_rr_theme->bevel, + l + ob_rr_theme->padding, t + ob_rr_theme->padding, iconw, texth); } diff --git a/render/theme.c b/render/theme.c index 46636e2..25a6108 100644 --- a/render/theme.c +++ b/render/theme.c @@ -93,7 +93,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) } /* load the font stuff */ - if (!read_string(db, "window.label.focus.font", &font_str)) + if (!read_string(db, "window.active.label.text.font", &font_str)) font_str = "arial,sans:bold:pixelsize=10:shadow=y:shadowtint=50"; if (!(theme->winfont_focused = RrFontOpen(inst, font_str))) { @@ -102,7 +102,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) } theme->winfont_height = RrFontHeight(theme->winfont_focused); - if (!read_string(db, "window.label.unfocus.font", &font_str)) + if (!read_string(db, "window.inactive.label.text.font", &font_str)) /* font_str will already be set to the last one */; if (!(theme->winfont_unfocused = RrFontOpen(inst, font_str))) { @@ -113,14 +113,14 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) RrFontHeight(theme->winfont_unfocused)); winjust = RR_JUSTIFY_LEFT; - if (read_string(db, "window.label.justify", &str)) { + if (read_string(db, "window.label.text.justify", &str)) { if (!g_ascii_strcasecmp(str, "right")) winjust = RR_JUSTIFY_RIGHT; else if (!g_ascii_strcasecmp(str, "center")) winjust = RR_JUSTIFY_CENTER; } - if (!read_string(db, "menu.title.font", &font_str)) + if (!read_string(db, "menu.title.text.font", &font_str)) font_str = "arial,sans:bold:pixelsize=12:shadow=y"; if (!(theme->mtitlefont = RrFontOpen(inst, font_str))) { @@ -130,7 +130,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->mtitlefont_height = RrFontHeight(theme->mtitlefont); mtitlejust = RR_JUSTIFY_LEFT; - if (read_string(db, "menu.title.justify", &str)) { + if (read_string(db, "menu.title.text.justify", &str)) { if (!g_ascii_strcasecmp(str, "right")) mtitlejust = RR_JUSTIFY_RIGHT; else if (!g_ascii_strcasecmp(str, "center")) @@ -147,54 +147,56 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->mfont_height = RrFontHeight(theme->mfont); /* load direct dimensions */ - if (!read_int(db, "menuOverlap", &theme->menu_overlap) || + if (!read_int(db, "menu.overlap", &theme->menu_overlap) || theme->menu_overlap < 0 || theme->menu_overlap > 20) theme->menu_overlap = 0; - if (!read_int(db, "handleWidth", &theme->handle_height)) + if (!read_int(db, "window.handle.width", &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; - if (!read_int(db, "borderWidth", &theme->bwidth) || + if (!read_int(db, "padding.width", &theme->padding) || + theme->padding <= 0 || theme->padding > 100) + theme->padding = 3; + if (!read_int(db, "border.width", &theme->bwidth) || theme->bwidth < 0 || theme->bwidth > 100) theme->bwidth = 1; - if (!read_int(db, "frameWidth", &theme->cbwidth) || + if (!read_int(db, "window.client.padding.width", &theme->cbwidth) || theme->cbwidth < 0 || theme->cbwidth > 100) - theme->cbwidth = theme->bevel; + theme->cbwidth = theme->padding; /* load colors */ if (!read_color(db, inst, - "borderColor", &theme->b_color)) + "border.color", &theme->b_color)) theme->b_color = RrColorNew(inst, 0, 0, 0); if (!read_color(db, inst, - "window.frame.focusColor", &theme->cb_focused_color)) + "window.active.client.color", + &theme->cb_focused_color)) theme->cb_focused_color = RrColorNew(inst, 0xff, 0xff, 0xff); if (!read_color(db, inst, - "window.frame.unfocusColor",&theme->cb_unfocused_color)) + "window.inactive.client.color", + &theme->cb_unfocused_color)) theme->cb_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff); if (!read_color(db, inst, - "window.label.focus.textColor", + "window.active.label.text.color", &theme->title_focused_color)) theme->title_focused_color = RrColorNew(inst, 0x0, 0x0, 0x0); if (!read_color(db, inst, - "window.label.unfocus.textColor", + "window.inactive.label.text.color", &theme->title_unfocused_color)) theme->title_unfocused_color = RrColorNew(inst, 0xff, 0xff, 0xff); if (!read_color(db, inst, - "window.button.focus.imageColor", + "window.active.button.unpressed.image.color", &theme->titlebut_focused_unpressed_color)) theme->titlebut_focused_unpressed_color = RrColorNew(inst, 0, 0, 0); if (!read_color(db, inst, - "window.button.unfocus.imageColor", + "window.inactive.button.unpressed.image.color", &theme->titlebut_unfocused_unpressed_color)) theme->titlebut_unfocused_unpressed_color = RrColorNew(inst, 0xff, 0xff, 0xff); if (!read_color(db, inst, - "window.button.pressed.focus.imageColor", + "window.active.button.pressed.image.color", &theme->titlebut_focused_pressed_color)) theme->titlebut_focused_pressed_color = RrColorNew(inst, @@ -202,7 +204,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->titlebut_focused_unpressed_color->g, theme->titlebut_focused_unpressed_color->b); if (!read_color(db, inst, - "window.button.pressed.unfocus.imageColor", + "window.inactive.button.pressed.image.color", &theme->titlebut_unfocused_pressed_color)) theme->titlebut_unfocused_pressed_color = RrColorNew(inst, @@ -210,16 +212,16 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->titlebut_unfocused_unpressed_color->g, theme->titlebut_unfocused_unpressed_color->b); if (!read_color(db, inst, - "window.button.disabled.focus.imageColor", + "window.active.button.disabled.image.color", &theme->titlebut_disabled_focused_color)) theme->titlebut_disabled_focused_color = RrColorNew(inst, 0xff, 0xff, 0xff); if (!read_color(db, inst, - "window.button.disabled.unfocus.imageColor", + "window.inactive.button.disabled.image.color", &theme->titlebut_disabled_unfocused_color)) theme->titlebut_disabled_unfocused_color = RrColorNew(inst, 0, 0, 0); if (!read_color(db, inst, - "window.button.hover.focus.imageColor", + "window.active.button.hover.image.color", &theme->titlebut_hover_focused_color)) theme->titlebut_hover_focused_color = RrColorNew(inst, @@ -227,7 +229,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->titlebut_focused_unpressed_color->g, theme->titlebut_focused_unpressed_color->b); if (!read_color(db, inst, - "window.button.hover.unfocus.imageColor", + "window.inactive.button.hover.image.color", &theme->titlebut_hover_unfocused_color)) theme->titlebut_hover_unfocused_color = RrColorNew(inst, @@ -235,7 +237,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->titlebut_unfocused_unpressed_color->g, theme->titlebut_unfocused_unpressed_color->b); if (!read_color(db, inst, - "window.button.toggled.focus.imageColor", + "window.active.button.toggled.image.color", &theme->titlebut_toggled_focused_color)) theme->titlebut_toggled_focused_color = RrColorNew(inst, @@ -243,7 +245,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->titlebut_focused_pressed_color->g, theme->titlebut_focused_pressed_color->b); if (!read_color(db, inst, - "window.button.toggled.unfocus.imageColor", + "window.inactive.button.toggled.image.color", &theme->titlebut_toggled_unfocused_color)) theme->titlebut_toggled_unfocused_color = RrColorNew(inst, @@ -251,33 +253,19 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->titlebut_unfocused_pressed_color->g, theme->titlebut_unfocused_pressed_color->b); if (!read_color(db, inst, - "menu.title.textColor", &theme->menu_title_color)) + "menu.title.text.color", &theme->menu_title_color)) theme->menu_title_color = RrColorNew(inst, 0, 0, 0); if (!read_color(db, inst, - "menu.items.textColor", &theme->menu_color)) + "menu.items.text.color", &theme->menu_color)) theme->menu_color = RrColorNew(inst, 0xff, 0xff, 0xff); if (!read_color(db, inst, - "menu.disabled.textColor", &theme->menu_disabled_color)) + "menu.items.disabled.text.color", + &theme->menu_disabled_color)) theme->menu_disabled_color = RrColorNew(inst, 0, 0, 0); if (!read_color(db, inst, - "menu.selected.textColor", &theme->menu_selected_color)) + "menu.items.active.text.color", + &theme->menu_selected_color)) theme->menu_selected_color = RrColorNew(inst, 0, 0, 0); - if (!read_color(db, inst, - "menu.bullet.imageColor", - &theme->menu_bullet_normal_color)) - theme->menu_bullet_normal_color = RrColorNew(inst, - theme->menu_color->r, - theme->menu_color->g, - theme->menu_color->b); - if (!read_color(db, inst, - "menu.bullet.selected.imageColor", - &theme->menu_bullet_selected_color)) - theme->menu_bullet_selected_color = - RrColorNew(inst, - theme->menu_selected_color->r, - theme->menu_selected_color->g, - theme->menu_selected_color->b); - if (read_mask(inst, "max.xbm", theme, &theme->max_mask)) { if (!read_mask(inst, "max_pressed.xbm", theme, @@ -431,91 +419,91 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) /* read the decoration textures */ if (!read_appearance(db, inst, - "window.title.focus", theme->a_focused_title, + "window.active.title.bg", theme->a_focused_title, FALSE)) set_default_appearance(theme->a_focused_title); if (!read_appearance(db, inst, - "window.title.unfocus", theme->a_unfocused_title, + "window.inactive.title.bg", theme->a_unfocused_title, FALSE)) set_default_appearance(theme->a_unfocused_title); if (!read_appearance(db, inst, - "window.label.focus", theme->a_focused_label, + "window.active.label.bg", theme->a_focused_label, TRUE)) set_default_appearance(theme->a_focused_label); if (!read_appearance(db, inst, - "window.label.unfocus", theme->a_unfocused_label, + "window.inactive.label.bg", theme->a_unfocused_label, TRUE)) set_default_appearance(theme->a_unfocused_label); if (!read_appearance(db, inst, - "window.handle.focus", theme->a_focused_handle, + "window.active.handle.bg", theme->a_focused_handle, FALSE)) set_default_appearance(theme->a_focused_handle); if (!read_appearance(db, inst, - "window.handle.unfocus",theme->a_unfocused_handle, + "window.inactive.handle.bg",theme->a_unfocused_handle, FALSE)) set_default_appearance(theme->a_unfocused_handle); if (!read_appearance(db, inst, - "window.grip.focus", theme->a_focused_grip, + "window.active.grip.bg", theme->a_focused_grip, TRUE)) set_default_appearance(theme->a_focused_grip); if (!read_appearance(db, inst, - "window.grip.unfocus", theme->a_unfocused_grip, + "window.inactive.grip.bg", theme->a_unfocused_grip, TRUE)) set_default_appearance(theme->a_unfocused_grip); if (!read_appearance(db, inst, - "menu.items", theme->a_menu, + "menu.items.bg", theme->a_menu, FALSE)) set_default_appearance(theme->a_menu); if (!read_appearance(db, inst, - "menu.title", theme->a_menu_title, + "menu.title.bg", theme->a_menu_title, FALSE)) set_default_appearance(theme->a_menu_title); if (!read_appearance(db, inst, - "menu.selected", theme->a_menu_selected, + "menu.items.active.bg", theme->a_menu_selected, TRUE)) set_default_appearance(theme->a_menu_selected); /* read the appearances for rendering non-decorations */ if (!read_appearance(db, inst, - "window.title.focus", theme->app_hilite_bg, + "window.active.title.bg", theme->app_hilite_bg, FALSE)) set_default_appearance(theme->app_hilite_bg); if (!read_appearance(db, inst, - "window.label.focus", theme->app_hilite_label, + "window.active.label.bg", theme->app_hilite_label, TRUE)) set_default_appearance(theme->app_hilite_label); if (!read_appearance(db, inst, - "window.title.unfocus", theme->app_unhilite_bg, + "window.inactive.title.bg", theme->app_unhilite_bg, FALSE)) set_default_appearance(theme->app_unhilite_bg); if (!read_appearance(db, inst, - "window.label.unfocus", theme->app_unhilite_label, + "window.inactive.label.bg", theme->app_unhilite_label, TRUE)) set_default_appearance(theme->app_unhilite_label); /* read buttons textures */ if (!read_appearance(db, inst, - "window.button.disabled.focus", + "window.active.button.disabled.bg", theme->a_disabled_focused_max, TRUE)) set_default_appearance(theme->a_disabled_focused_max); if (!read_appearance(db, inst, - "window.button.disabled.unfocus", + "window.inactive.button.disabled.bg", theme->a_disabled_unfocused_max, TRUE)) set_default_appearance(theme->a_disabled_unfocused_max); if (!read_appearance(db, inst, - "window.button.pressed.focus", + "window.active.button.pressed.bg", theme->a_focused_pressed_max, TRUE)) set_default_appearance(theme->a_focused_pressed_max); if (!read_appearance(db, inst, - "window.button.pressed.unfocus", + "window.inactive.button.pressed.bg", theme->a_unfocused_pressed_max, TRUE)) set_default_appearance(theme->a_unfocused_pressed_max); if (!read_appearance(db, inst, - "window.button.toggled.focus", + "window.active.button.toggled.bg", theme->a_toggled_focused_max, TRUE)) { @@ -524,7 +512,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) RrAppearanceCopy(theme->a_focused_pressed_max); } if (!read_appearance(db, inst, - "window.button.toggled.unfocus", + "window.inactive.button.toggled.bg", theme->a_toggled_unfocused_max, TRUE)) { @@ -533,17 +521,17 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) RrAppearanceCopy(theme->a_unfocused_pressed_max); } if (!read_appearance(db, inst, - "window.button.focus", + "window.active.button.unpressed.bg", theme->a_focused_unpressed_max, TRUE)) set_default_appearance(theme->a_focused_unpressed_max); if (!read_appearance(db, inst, - "window.button.unfocus", + "window.inactive.button.unpressed.bg", theme->a_unfocused_unpressed_max, TRUE)) set_default_appearance(theme->a_unfocused_unpressed_max); if (!read_appearance(db, inst, - "window.button.hover.focus", + "window.active.button.hover.bg", theme->a_hover_focused_max, TRUE)) { @@ -552,7 +540,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) RrAppearanceCopy(theme->a_focused_unpressed_max); } if (!read_appearance(db, inst, - "window.button.hover.unfocus", + "window.inactive.button.hover.bg", theme->a_hover_unfocused_max, TRUE)) { @@ -689,10 +677,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->menu_disabled_color; theme->a_menu_text_selected->texture[0].data.text.color = theme->menu_selected_color; - theme->a_menu_bullet_normal->texture[0].data.mask.color = - theme->menu_bullet_normal_color; - theme->a_menu_bullet_selected->texture[0].data.mask.color = - theme->menu_bullet_selected_color; theme->a_disabled_focused_max->texture[0].type = theme->a_disabled_unfocused_max->texture[0].type = @@ -872,9 +856,9 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->a_unfocused_pressed_iconify->texture[0].data.mask.color = theme->titlebut_unfocused_pressed_color; theme->a_menu_bullet_normal->texture[0].data.mask.color = - theme->menu_bullet_normal_color; + theme->menu_color; theme->a_menu_bullet_selected->texture[0].data.mask.color = - theme->menu_bullet_selected_color; + theme->menu_selected_color; XrmDestroyDatabase(db); @@ -887,7 +871,7 @@ RrTheme* RrThemeNew(const RrInstance *inst, gchar *name) theme->label_height = theme->winfont_height + MAX(ft + fb, ut + ub); } - theme->title_height = theme->label_height + theme->bevel * 2; + theme->title_height = theme->label_height + theme->padding * 2; theme->button_size = theme->label_height - 2; theme->grip_width = theme->title_height * 1.5; @@ -918,8 +902,6 @@ void RrThemeFree(RrTheme *theme) RrColorFree(theme->menu_title_color); RrColorFree(theme->menu_disabled_color); RrColorFree(theme->menu_selected_color); - RrColorFree(theme->menu_bullet_normal_color); - RrColorFree(theme->menu_bullet_selected_color); RrPixmapMaskFree(theme->max_mask); RrPixmapMaskFree(theme->max_toggled_mask); @@ -1209,8 +1191,8 @@ static gboolean read_appearance(XrmDatabase db, const RrInstance *inst, cname = g_strconcat(rname, ".color", NULL); ctoname = g_strconcat(rname, ".colorTo", NULL); - bcname = g_strconcat(rname, ".borderColor", NULL); - icname = g_strconcat(rname, ".interlaceColor", NULL); + bcname = g_strconcat(rname, ".border.color", NULL); + icname = g_strconcat(rname, ".interlace.color", NULL); if (XrmGetResource(db, rname, rclass, &rettype, &retvalue) && retvalue.addr != NULL) { diff --git a/render/theme.h b/render/theme.h index a643fb1..e52b16c 100644 --- a/render/theme.h +++ b/render/theme.h @@ -15,7 +15,7 @@ struct _RrTheme { gboolean show_handle; /* style settings - geometry */ - gint bevel; + gint padding; gint handle_height; gint bwidth; gint cbwidth; @@ -43,8 +43,6 @@ struct _RrTheme { RrColor *titlebut_unfocused_unpressed_color; RrColor *menu_title_color; RrColor *menu_color; - RrColor *menu_bullet_normal_color; - RrColor *menu_bullet_selected_color; RrColor *menu_disabled_color; RrColor *menu_selected_color; diff --git a/themes/Allegro/openbox-3/themerc b/themes/Allegro/openbox-3/themerc index ab783bf..25d4757 100644 --- a/themes/Allegro/openbox-3/themerc +++ b/themes/Allegro/openbox-3/themerc @@ -11,92 +11,92 @@ !----------------------------------------------------------menu--------! -menu.title: raised gradient vertical -menu.title.color: #304060 -menu.title.colorTo: #202540 -menu.title.textColor: #f0f0f7 +menu.title.bg: raised gradient vertical +menu.title.bg.color: #304060 +menu.title.bg.colorTo: #202540 +menu.title.text.color: #f0f0f7 !menu.title.font: !menu.title.justify: -menu.items: flat gradient horizontal -menu.items.color: #d0d0d0 -menu.items.colorTo: #a0a0a0 -menu.items.textColor: #000010 -menu.disabled.textColor: #777777 +menu.items.bg: flat gradient horizontal +menu.items.bg.color: #d0d0d0 +menu.items.bg.colorTo: #a0a0a0 +menu.items.text.color: #000010 +menu.items.disabled.text.color: #777777 !menu.frame.font: !menu.frame.justify: -menu.selected: raised gradient horizontal -menu.selected.color: #d0d0d0 -menu.selected.colorTo: #a0a0a0 -menu.selected.textColor: #171777 +menu.items.active.bg: raised gradient horizontal +menu.items.active.bg.color: #d0d0d0 +menu.items.active.bg.colorTo: #a0a0a0 +menu.items.active.text.color: #171777 !----------------------------------------------------------window------! -window.title.focus: raised gradient vertical -window.title.focus.color: #a0a0a0 -window.title.focus.colorTo: #d0d0d0 +window.active.title.bg: raised gradient vertical +window.active.title.bg.color: #a0a0a0 +window.active.title.bg.colorTo: #d0d0d0 -window.title.unfocus: raised gradient vertical -window.title.unfocus.color: #808080 -window.title.unfocus.colorTo: #a0a0a0 +window.inactive.title.bg: raised gradient vertical +window.inactive.title.bg.color: #808080 +window.inactive.title.bg.colorTo: #a0a0a0 -window.label.focus: sunken gradient vertical interlaced -window.label.focus.color: #202540 -window.label.focus.colorTo: #304060 -window.label.focus.textColor: #f0f0f7 +window.active.label.bg: sunken gradient vertical interlaced +window.active.label.bg.color: #202540 +window.active.label.bg.colorTo: #304060 +window.active.label.text.color: #f0f0f7 -window.label.unfocus: sunken gradient vertical -window.label.unfocus.color: #505050 -window.label.unfocus.colorTo: #808080 -window.label.unfocus.textColor: #000000 +window.inactive.label.bg: sunken gradient vertical +window.inactive.label.bg.color: #505050 +window.inactive.label.bg.colorTo: #808080 +window.inactive.label.text.color: #000000 -window.handle.focus: raised gradient diagonal -window.handle.focus.color: #d0d0d0 -window.handle.focus.colorTo: #a0a0a0 +window.active.handle.bg: raised gradient diagonal +window.active.handle.bg.color: #d0d0d0 +window.active.handle.bg.colorTo: #a0a0a0 -window.handle.unfocus: raised gradient diagonal -window.handle.unfocus.color: #a0a0a0 -window.handle.unfocus.colorTo: #808080 +window.inactive.handle.bg: raised gradient diagonal +window.inactive.handle.bg.color: #a0a0a0 +window.inactive.handle.bg.colorTo: #808080 -window.grip.focus: raised gradient vertical -window.grip.focus.color: #202540 -window.grip.focus.colorTo: #304060 +window.active.grip.bg: raised gradient vertical +window.active.grip.bg.color: #202540 +window.active.grip.bg.colorTo: #304060 -window.grip.unfocus: raised gradient vertical -window.grip.unfocus.color: #202530 -window.grip.unfocus.colorTo: #304050 +window.inactive.grip.bg: raised gradient vertical +window.inactive.grip.bg.color: #202530 +window.inactive.grip.bg.colorTo: #304050 -window.button.focus: raised gradient vertical -window.button.focus.color: #a0a0a0 -window.button.focus.colorTo: #d0d0d0 -window.button.focus.imageColor: #000000 +window.active.button.unpressed.bg: raised gradient vertical +window.active.button.unpressed.bg.color: #a0a0a0 +window.active.button.unpressed.bg.colorTo: #d0d0d0 +window.active.button.unpressed.image.color: #000000 -window.button.unfocus: parentrelative +window.inactive.button.unpressed.bg: parentrelative !window.button.unfocus.color: !window.button.unfocus.colorTo: -window.button.unfocus.imageColor: #000000 +window.inactive.button.unpressed.image.color: #000000 -window.button.pressed.focus: parentrelative +window.active.button.pressed.bg: parentrelative !window.button.pressed.focus.color: !window.button.pressed.focus.colorTo: -window.button.pressed.unfocus: sunken gradient vertical -window.button.pressed.unfocus.color: #808080 -window.button.pressed.unfocus.colorTo: #a0a0a0 +window.inactive.button.pressed.bg: sunken gradient vertical +window.inactive.button.pressed.bg.color: #808080 +window.inactive.button.pressed.bg.colorTo: #a0a0a0 -window.button.disabled.focus: raised gradient vertical -window.button.disabled.focus.color: #a0a0a0 -window.button.disabled.focus.colorTo: #d0d0d0 -window.button.disabled.focus.imageColor: #a0a0a0 +window.active.button.disabled.bg: raised gradient vertical +window.active.button.disabled.bg.color: #a0a0a0 +window.active.button.disabled.bg.colorTo: #d0d0d0 +window.active.button.disabled.image.color: #a0a0a0 -window.button.disabled.unfocus: parentrelative -window.button.disabled.unfocus.imageColor: #a0a0a0 +window.inactive.button.disabled.bg: parentrelative +window.inactive.button.disabled.image.color: #a0a0a0 -window.frame.focusColor: #d0d0d0 -window.frame.unfocusColor: #a0a0a0 +window.active.client.color: #d0d0d0 +window.inactive.client.color: #a0a0a0 !window.font: !window.justify: @@ -105,14 +105,14 @@ window.frame.unfocusColor: #a0a0a0 !----------------------------------------------------------misc--------! -borderWidth: 1 -borderColor: #070707 +border.width: 1 +border.color: #070707 -bevelWidth: 1 -handleWidth: 5 +padding.width: 1 +window.handle.width: 5 -menuOverlap: 0 -frameWidth: 1 +menu.overlap: 0 +window.client.padding.width: 1 diff --git a/themes/Artwiz/openbox-3/themerc b/themes/Artwiz/openbox-3/themerc index 8e82762..acbbe62 100644 --- a/themes/Artwiz/openbox-3/themerc +++ b/themes/Artwiz/openbox-3/themerc @@ -1,101 +1,101 @@ -menu.title: raised gradient diagonal -menu.title.color: rgb:90/94/98 -menu.title.colorTo: rgb:20/24/28 -menu.title.textColor: white -menu.title.justify: center - -menu.items: sunken gradient diagonal -menu.items.color: rgb:10/20/30 -menu.items.colorTo: rgb:70/80/90 -menu.items.textColor: rgb:90/a0/b0 +menu.title.bg: raised gradient diagonal +menu.title.bg.color: rgb:90/94/98 +menu.title.bg.colorTo: rgb:20/24/28 +menu.title.text.color: white +menu.title.text.justify: center + +menu.items.bg: sunken gradient diagonal +menu.items.bg.color: rgb:10/20/30 +menu.items.bg.colorTo: rgb:70/80/90 +menu.items.text.color: rgb:90/a0/b0 menu.items.justify: center -menu.selected: raised gradient diagonal -menu.selected.color: rgb:90/94/98 -menu.selected.colorTo: rgb:20/24/28 -menu.selected.textColor: white -menu.bullet.imageColor: rgb:90/a0/b0 - -window.title.focus: raised gradient vertical -window.title.focus.color: rgb:80/84/88 -window.title.focus.colorTo: rgb:30/34/38 -window.title.unfocus: raised vertical gradient -window.title.unfocus.color: rgb:50/54/58 -window.title.unfocus.colorTo: black - -window.label.focus: sunken diagonal gradient -window.label.focus.color: rgb:10/20/30 -window.label.focus.colorTo: rgb:70/80/90 -window.label.focus.textColor: white -window.label.unfocus: sunken gradient diagonal -window.label.unfocus.color: black -window.label.unfocus.colorTo: rgb:40/50/60 -window.label.unfocus.textColor: rgb:60/64/68 -window.label.justify: center - -window.button.focus: raised gradient diagonal -window.button.focus.color: rgb:90/94/98 -window.button.focus.colorTo: rgb:20/24/28 -window.button.focus.imageColor: white - -window.button.unfocus: raised gradient diagonal -window.button.unfocus.color: rgb:50/54/58 -window.button.unfocus.colorTo: black -window.button.unfocus.imageColor: rgb:70/74/78 - -window.button.pressed.focus: sunken gradient diagonal -window.button.pressed.focus.color: rgb:20/40/50 -window.button.pressed.focus.colorTo: rgb:60/70/80 - -window.button.pressed.unfocus: sunken gradient diagonal -window.button.pressed.unfocus.color: rgb:50/54/58 -window.button.pressed.unfocus.colorTo: black -window.button.pressed.unfocus.imageColor: rgb:70/74/78 - -window.frame.focusColor: rgb:40/44/48 -window.frame.unfocusColor: rgb:20/24/28 - -window.handle.focus: raised gradient diagonal -window.handle.focus.color: rgb:70/74/78 -window.handle.focus.colorTo: rgb:40/44/48 - -window.handle.unfocus: raised gradient diagonal -window.handle.unfocus.color: rgb:50/54/58 -window.handle.unfocus.colorTo: black - -window.grip.focus: sunken diagonal gradient -window.grip.focus.color: rgb:20/30/40 -window.grip.focus.colorTo: rgb:60/70/80 - -window.grip.unfocus: sunken diagonal gradient -window.grip.unfocus.color: black -window.grip.unfocus.colorTo: rgb:30/40/50 - -window.button.toggled.focus: raised gradient diagonal -window.button.toggled.focus.color: rgb:90/94/98 -window.button.toggled.focus.colorTo: rgb:20/24/28 -window.button.toggled.focus.imageColor: white - -window.button.toggled.unfocus: raised gradient diagonal -window.button.toggled.unfocus.color: rgb:50/54/58 -window.button.toggled.unfocus.colorTo: black -window.button.toggled.unfocus.imageColor: rgb:70/74/78 - -window.button.disabled.focus: raised gradient diagonal -window.button.disabled.focus.color: rgb:90/94/98 -window.button.disabled.focus.colorTo: rgb:20/24/28 -window.button.disabled.focus.imageColor: grey - -window.button.disabled.unfocus: raised gradient diagonal -window.button.disabled.unfocus.color: rgb:50/54/58 -window.button.disabled.unfocus.colorTo: black -window.button.disabled.unfocus.imageColor: rgb:70/74/78 - -borderColor: black -bevelWidth: 1 +menu.items.active.bg: raised gradient diagonal +menu.items.active.bg.color: rgb:90/94/98 +menu.items.active.bg.colorTo: rgb:20/24/28 +menu.items.active.text.color: white +menu.bullet.image.color: rgb:90/a0/b0 + +window.active.title.bg: raised gradient vertical +window.active.title.bg.color: rgb:80/84/88 +window.active.title.bg.colorTo: rgb:30/34/38 +window.inactive.title.bg: raised vertical gradient +window.inactive.title.bg.color: rgb:50/54/58 +window.inactive.title.bg.colorTo: black + +window.active.label.bg: sunken diagonal gradient +window.active.label.bg.color: rgb:10/20/30 +window.active.label.bg.colorTo: rgb:70/80/90 +window.active.label.text.color: white +window.inactive.label.bg: sunken gradient diagonal +window.inactive.label.bg.color: black +window.inactive.label.bg.colorTo: rgb:40/50/60 +window.inactive.label.text.color: rgb:60/64/68 +window.label.text.justify: center + +window.active.button.unpressed.bg: raised gradient diagonal +window.active.button.unpressed.bg.color: rgb:90/94/98 +window.active.button.unpressed.bg.colorTo: rgb:20/24/28 +window.active.button.unpressed.image.color: white + +window.inactive.button.unpressed.bg: raised gradient diagonal +window.inactive.button.unpressed.bg.color: rgb:50/54/58 +window.inactive.button.unpressed.bg.colorTo: black +window.inactive.button.unpressed.image.color: rgb:70/74/78 + +window.active.button.pressed.bg: sunken gradient diagonal +window.active.button.pressed.bg.color: rgb:20/40/50 +window.active.button.pressed.bg.colorTo: rgb:60/70/80 + +window.inactive.button.pressed.bg: sunken gradient diagonal +window.inactive.button.pressed.bg.color: rgb:50/54/58 +window.inactive.button.pressed.bg.colorTo: black +window.inactive.button.pressed.image.color: rgb:70/74/78 + +window.active.client.color: rgb:40/44/48 +window.inactive.client.color: rgb:20/24/28 + +window.active.handle.bg: raised gradient diagonal +window.active.handle.bg.color: rgb:70/74/78 +window.active.handle.bg.colorTo: rgb:40/44/48 + +window.inactive.handle.bg: raised gradient diagonal +window.inactive.handle.bg.color: rgb:50/54/58 +window.inactive.handle.bg.colorTo: black + +window.active.grip.bg: sunken diagonal gradient +window.active.grip.bg.color: rgb:20/30/40 +window.active.grip.bg.colorTo: rgb:60/70/80 + +window.inactive.grip.bg: sunken diagonal gradient +window.inactive.grip.bg.color: black +window.inactive.grip.bg.colorTo: rgb:30/40/50 + +window.active.button.toggled.bg: raised gradient diagonal +window.active.button.toggled.bg.color: rgb:90/94/98 +window.active.button.toggled.bg.colorTo: rgb:20/24/28 +window.active.button.toggled.image.color: white + +window.inactive.button.toggled.bg: raised gradient diagonal +window.inactive.button.toggled.bg.color: rgb:50/54/58 +window.inactive.button.toggled.bg.colorTo: black +window.inactive.button.toggled.image.color: rgb:70/74/78 + +window.active.button.disabled.bg: raised gradient diagonal +window.active.button.disabled.bg.color: rgb:90/94/98 +window.active.button.disabled.bg.colorTo: rgb:20/24/28 +window.active.button.disabled.image.color: grey + +window.inactive.button.disabled.bg: raised gradient diagonal +window.inactive.button.disabled.bg.color: rgb:50/54/58 +window.inactive.button.disabled.bg.colorTo: black +window.inactive.button.disabled.image.color: rgb:70/74/78 + +border.color: black +padding.width: 1 borderWidth: 1 -handleWidth: 4 +window.handle.width: 4 -window.label.focus.font: Bitstream Vera Sans:pixelsize=10 -menu.title.font: Bitstream Vera Sans:pixelsize=10 +window.active.label.text.font: Bitstream Vera Sans:pixelsize=10 +menu.title.text.font: Bitstream Vera Sans:pixelsize=10 menu.items.font: Bitstream Vera Sans:pixelsize=10 diff --git a/themes/Blah41/openbox-3/themerc b/themes/Blah41/openbox-3/themerc index a054b3d..9d2a5a4 100644 --- a/themes/Blah41/openbox-3/themerc +++ b/themes/Blah41/openbox-3/themerc @@ -1,117 +1,117 @@ ! blah41 ! ***** menu ***** -menu.title: flat gradient vertical border -menu.title.color: #718497 -menu.title.colorTo: #465a6e -menu.title.textColor: #e9e9e9 -menu.title.borderColor: #a7aaad - -menu.items: flat gradient horizontal border -menu.items.color: #bcbfc3 -menu.items.colorTo: #a0a3a6 -menu.items.textColor: #000000 -menu.items.borderColor: #a7aaad -menu.disabled.textColor: #6c757d - -menu.selected: flat gradient vertical border -menu.selected.color: #a7aaad -menu.selected.colorTo: #a7aaad -menu.selected.textColor: #000000 -menu.selected.borderColor: #808285 +menu.title.bg: flat gradient vertical border +menu.title.bg.color: #718497 +menu.title.bg.colorTo: #465a6e +menu.title.text.color: #e9e9e9 +menu.title.bg.border.color: #a7aaad + +menu.items.bg: flat gradient horizontal border +menu.items.bg.color: #bcbfc3 +menu.items.bg.colorTo: #a0a3a6 +menu.items.text.color: #000000 +menu.items.bg.border.color: #a7aaad +menu.items.disabled.text.color: #6c757d + +menu.items.active.bg: flat gradient vertical border +menu.items.active.bg.color: #a7aaad +menu.items.active.bg.colorTo: #a7aaad +menu.items.active.text.color: #000000 +menu.items.active.bg.border.color: #808285 menu.bullet.position: right ! ***** window focused ***** -window.title.focus: flat gradient vertical -window.title.focus.color: #a7aaad -window.title.focus.colorTo: #808285 -window.title.focus.borderColor: #a7aaad +window.active.title.bg: flat gradient vertical +window.active.title.bg.color: #a7aaad +window.active.title.bg.colorTo: #808285 +window.active.title.bg.border.color: #a7aaad -window.label.focus: flat gradient vertical border -window.label.focus.color: #718497 -window.label.focus.colorTo: #465a6e -window.label.focus.textColor: #e9e9e9 -window.label.focus.borderColor: #2e3a45 +window.active.label.bg: flat gradient vertical border +window.active.label.bg.color: #718497 +window.active.label.bg.colorTo: #465a6e +window.active.label.text.color: #e9e9e9 +window.active.label.bg.border.color: #2e3a45 -window.button.focus: parentrelative -window.button.focus.color: #a7aaad -window.button.focus.colorTo: #808285 -window.button.focus.imageColor: #555c62 -window.button.focus.borderColor: #555c62 +window.active.button.unpressed.bg: parentrelative +window.active.button.unpressed.bg.color: #a7aaad +window.active.button.unpressed.bg.colorTo: #808285 +window.active.button.unpressed.image.color: #555c62 +window.active.button.unpressed.bg.border.color: #555c62 -window.button.pressed.focus: flat gradient vertical border -window.button.pressed.focus.color: #bcbfc3 -window.button.pressed.focus.colorTo:#a0a3a6 -window.button.pressed.focus.borderColor: #45525f -window.button.pressed.focus.imageColor: #000000 +window.active.button.pressed.bg: flat gradient vertical border +window.active.button.pressed.bg.color: #bcbfc3 +window.active.button.pressed.bg.colorTo:#a0a3a6 +window.active.button.pressed.bg.border.color: #45525f +window.active.button.pressed.image.color: #000000 -window.button.disabled.focus: parentrelative -window.button.disabled.focus.imageColor: #7a7f86 +window.active.button.disabled.bg: parentrelative +window.active.button.disabled.image.color: #7a7f86 -window.handle.focus: flat gradient vertical -window.handle.focus.color: #718497 -window.handle.focus.colorTo: #45525f +window.active.handle.bg: flat gradient vertical +window.active.handle.bg.color: #718497 +window.active.handle.bg.colorTo: #45525f -window.grip.focus: flat gradient vertical -window.grip.focus.color: #a7aaad -window.grip.focus.colorTo: #808285 -window.grip.focus.borderColor: #a7aaad +window.active.grip.bg: flat gradient vertical +window.active.grip.bg.color: #a7aaad +window.active.grip.bg.colorTo: #808285 +window.active.grip.bg.border.color: #a7aaad -window.frame.focusColor: #a7aaad +window.active.client.color: #a7aaad ! ***** window unfocused ***** -window.title.unfocus: flat gradient vertical -window.title.unfocus.color: #a7aaad -window.title.unfocus.colorTo: #808285 +window.inactive.title.bg: flat gradient vertical +window.inactive.title.bg.color: #a7aaad +window.inactive.title.bg.colorTo: #808285 -window.label.unfocus: flat gradient vertical border -window.label.unfocus.color: #bcbfc3 -window.label.unfocus.colorTo: #a0a3a6 -window.label.unfocus.textColor: #555c62 -window.label.unfocus.borderColor: #555c62 +window.inactive.label.bg: flat gradient vertical border +window.inactive.label.bg.color: #bcbfc3 +window.inactive.label.bg.colorTo: #a0a3a6 +window.inactive.label.text.color: #555c62 +window.inactive.label.bg.border.color: #555c62 -window.button.unfocus: parentrelative -window.button.unfocus.color: #a7aaad -window.button.unfocus.colorTo: #a7aaad -window.button.unfocus.imageColor: #555c62 -! window.button.unfocus.borderColor: #555c62 +window.inactive.button.unpressed.bg: parentrelative +window.inactive.button.unpressed.bg.color: #a7aaad +window.inactive.button.unpressed.bg.colorTo: #a7aaad +window.inactive.button.unpressed.image.color: #555c62 +! window.inactive.button.unpressed.bg.border.color: #555c62 -window.button.pressed.unfocus: flat gradient vertical border -window.button.pressed.unfocus.color: #a7aaad -window.button.pressed.unfocus.colorTo: #808285 -window.button.pressed.unfocus.borderColor:#555c62 +window.inactive.button.pressed.bg: flat gradient vertical border +window.inactive.button.pressed.bg.color: #a7aaad +window.inactive.button.pressed.bg.colorTo: #808285 +window.inactive.button.pressed.bg.border.color:#555c62 -window.button.disabled.unfocus: parentrelative -window.button.disabled.unfocus.imageColor: #7a7f86 +window.inactive.button.disabled.bg: parentrelative +window.inactive.button.disabled.image.color: #7a7f86 -window.handle.unfocus: flat solid -window.handle.unfocus.color: #a7aaad -window.handle.unfocus.colorTo: #b4b4ae +window.inactive.handle.bg: flat solid +window.inactive.handle.bg.color: #a7aaad +window.inactive.handle.bg.colorTo: #b4b4ae -window.grip.unfocus: flat gradient vertical -window.grip.unfocus.color: #a7aaad -window.grip.unfocus.colorTo: #808285 -window.grip.unfocus.borderColor: #555c62 +window.inactive.grip.bg: flat gradient vertical +window.inactive.grip.bg.color: #a7aaad +window.inactive.grip.bg.colorTo: #808285 +window.inactive.grip.bg.border.color: #555c62 -window.frame.unfocusColor: #a7aaad +window.inactive.client.color: #a7aaad ! ***** fonts ***** -window.label.focus.font: trebuchet ms:bold:pixelsize=10:shadow=y:shadowtint=12:shadowoffset=2 -menu.title.font: trebuchet ms:bold:pixelsize=11:shadow=y:shadowtint=12:shadowoffset=2 +window.active.label.text.font: trebuchet ms:bold:pixelsize=10:shadow=y:shadowtint=12:shadowoffset=2 +menu.title.text.font: trebuchet ms:bold:pixelsize=11:shadow=y:shadowtint=12:shadowoffset=2 menu.items.font: trebuchet ms:pixelsize=12 -window.label.justify: center -menu.title.justify: center +window.label.text.justify: center +menu.title.text.justify: center ! ***** the rest ***** -borderColor: #2e3a45 +border.color: #2e3a45 borderWidth: 1 -bevelWidth: 1 -handleWidth: 3 -frameWidth: 1 +padding.width: 1 +window.handle.width: 3 +window.client.padding.width: 1 diff --git a/themes/Om4Ob/openbox-3/themerc b/themes/Om4Ob/openbox-3/themerc index 9d2c5cd..5899e49 100644 --- a/themes/Om4Ob/openbox-3/themerc +++ b/themes/Om4Ob/openbox-3/themerc @@ -1,105 +1,105 @@ style.author: miklos style.date: Aug 1, 2003 -window.label.focus.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 -menu.title.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 +window.active.label.text.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 +menu.title.text.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 menu.items.font: arial:pixelsize=10:shadow=y:shadowtint=6:shadowoffset=1 ! Menu settings... -menu.items: flat gradient crossdiagonal -menu.items.colorTo: #93a1a8 -menu.items.color: #7c8c93 -menu.items.borderColor: #ffffff -menu.items.textColor: #4c595c +menu.items.bg: flat gradient crossdiagonal +menu.items.bg.colorTo: #93a1a8 +menu.items.bg.color: #7c8c93 +menu.items.bg.border.color: #ffffff +menu.items.text.color: #4c595c menu.items.justify: center -menu.title.justify: right +menu.title.text.justify: right -menu.title: flatborder gradient diagonal -menu.title.colorTo: #757575 -menu.title.color: #f0f0ff -menu.title.borderColor: #a9a9a9 -menu.title.textColor: #565a5c +menu.title.bg: flatborder gradient diagonal +menu.title.bg.colorTo: #757575 +menu.title.bg.color: #f0f0ff +menu.title.bg.border.color: #a9a9a9 +menu.title.text.color: #565a5c -menu.selected: flatborder gradient diagonal -menu.selected.color: #93a1a8 -menu.selected.colorTo: #7c8c93 -menu.selected.borderColor: #a9a9a9 -menu.selected.textColor: #f0f0ff +menu.items.active.bg: flatborder gradient diagonal +menu.items.active.bg.color: #93a1a8 +menu.items.active.bg.colorTo: #7c8c93 +menu.items.active.bg.border.color: #a9a9a9 +menu.items.active.text.color: #f0f0ff -menu.disabled.textColor: #757575 +menu.items.disabled.text.color: #757575 ! Window settings... -window.button.focus: parentrelative -window.button.focus.imageColor: #565a5c +window.active.button.unpressed.bg: parentrelative +window.active.button.unpressed.image.color: #565a5c -window.label.justify: center +window.label.text.justify: center -window.button.hover.focus: flatborder gradient diagonal -window.button.hover.focus.color: #93a1a8 -window.button.hover.focus.colorTo: #7c8c93 -window.button.hover.focus.borderColor: #a9a9a9 -window.button.hover.focus.imageColor: #ffffff +window.active.button.hover.bg: flatborder gradient diagonal +window.active.button.hover.bg.color: #93a1a8 +window.active.button.hover.bg.colorTo: #7c8c93 +window.active.button.hover.bg.border.color: #a9a9a9 +window.active.button.hover.image.color: #ffffff -window.button.hover.unfocus: parentrelative +window.inactive.button.hover.bg: parentrelative -window.button.toggled.focus: flatborder gradient diagonal -window.button.toggled.focus.color: #93a1a8 -window.button.toggled.focus.colorTo: #7c8c93 -window.button.toggled.focus.borderColor: #a9a9a9 -window.button.toggled.focus.imageColor: #ffffff +window.active.button.toggled.bg: flatborder gradient diagonal +window.active.button.toggled.bg.color: #93a1a8 +window.active.button.toggled.bg.colorTo: #7c8c93 +window.active.button.toggled.bg.border.color: #a9a9a9 +window.active.button.toggled.image.color: #ffffff -window.button.toggled.unfocus: parentrelative +window.inactive.button.toggled.bg: parentrelative -window.button.pressed.focus: sunken gradient diagonal -window.button.pressed.focus.color: #93a1a8 -window.button.pressed.focus.colorTo: #7c8c93 -window.button.pressed.focus.imageColor: #ffffff +window.active.button.pressed.bg: sunken gradient diagonal +window.active.button.pressed.bg.color: #93a1a8 +window.active.button.pressed.bg.colorTo: #7c8c93 +window.active.button.pressed.image.color: #ffffff -window.button.disabled.focus: parentrelative -window.button.disabled.focus.imageColor: #7c8c93 -window.button.disabled.unfocus: parentrelative -window.button.disabled.unfocus.imageColor: #7c8c93 +window.active.button.disabled.bg: parentrelative +window.active.button.disabled.image.color: #7c8c93 +window.inactive.button.disabled.bg: parentrelative +window.inactive.button.disabled.image.color: #7c8c93 -window.button.unfocus: parentrelative -window.button.unfocus.imageColor: #677b91 +window.inactive.button.unpressed.bg: parentrelative +window.inactive.button.unpressed.image.color: #677b91 -window.grip.focus: flat gradient diagonal -window.grip.focus.color: #93a1a8 -window.grip.focus.colorTo: #7c8c93 +window.active.grip.bg: flat gradient diagonal +window.active.grip.bg.color: #93a1a8 +window.active.grip.bg.colorTo: #7c8c93 -window.grip.unfocus: flat solid -window.grip.unfocus.color: #7c8c93 +window.inactive.grip.bg: flat solid +window.inactive.grip.bg.color: #7c8c93 -window.handle.focus: raised gradient diagonal -window.handle.focus.colorTo: #757575 -window.handle.focus.color: #f0f0ff +window.active.handle.bg: raised gradient diagonal +window.active.handle.bg.colorTo: #757575 +window.active.handle.bg.color: #f0f0ff -window.handle.unfocus: flat solid -window.handle.unfocus.color: #7c8c93 +window.inactive.handle.bg: flat solid +window.inactive.handle.bg.color: #7c8c93 -window.label.focus: flatborder gradient diagonal -window.label.focus.color: #f0f0ff -window.label.focus.colorTo: #757575 -window.label.focus.borderColor: #565a5c -window.label.focus.textColor: #262a2c +window.active.label.bg: flatborder gradient diagonal +window.active.label.bg.color: #f0f0ff +window.active.label.bg.colorTo: #757575 +window.active.label.bg.border.color: #565a5c +window.active.label.text.color: #262a2c -window.label.unfocus: parentrelative -window.label.unfocus.textColor: #565a5c +window.inactive.label.bg: parentrelative +window.inactive.label.text.color: #565a5c -window.title.focus: flat gradient vertical -window.title.focus.color: #93a1a8 -window.title.focus.colorTo: #7c8c93 +window.active.title.bg: flat gradient vertical +window.active.title.bg.color: #93a1a8 +window.active.title.bg.colorTo: #7c8c93 -window.title.unfocus: flat gradient crossdiagonal -window.title.unfocus.color: #93a1a8 -window.title.unfocus.colorTo: #7c8c93 +window.inactive.title.bg: flat gradient crossdiagonal +window.inactive.title.bg.color: #93a1a8 +window.inactive.title.bg.colorTo: #7c8c93 -window.frame.focusColor: #7c8c93 -window.frame.unfocusColor: #677b91 -handleWidth: 3 -frameWidth: 1 -bevelWidth: 1 +window.active.client.color: #7c8c93 +window.inactive.client.color: #677b91 +window.handle.width: 3 +window.client.padding.width: 1 +padding.width: 1 borderWidth: 1 -borderColor: #484848 +border.color: #484848 diff --git a/themes/TheBear/openbox-3/themerc b/themes/TheBear/openbox-3/themerc index ca8cd5b..200f22a 100644 --- a/themes/TheBear/openbox-3/themerc +++ b/themes/TheBear/openbox-3/themerc @@ -1,111 +1,109 @@ !! Menu settings -menu.title: flat gradient vertical bevel1 -menu.title.color: #5a6dc5 -menu.title.colorTo: #4a59a5 -menu.title.textColor: #fcfcfe -menu.title.justify: center - -menu.items: raised solid bevel1 -menu.items.color: #e6e6e6 -menu.items.colorTo: #000000 -menu.items.textColor: #000000 +menu.title.bg: flat gradient vertical bevel1 +menu.title.bg.color: #5a6dc5 +menu.title.bg.colorTo: #4a59a5 +menu.title.text.color: #fcfcfe +menu.title.text.justify: center + +menu.items.bg: raised solid bevel1 +menu.items.bg.color: #e6e6e6 +menu.items.bg.colorTo: #000000 +menu.items.text.color: #000000 menu.items.justify: left -menu.disabled.textColor: #737573 +menu.items.disabled.text.color: #737573 -menu.selected: flat gradient vertical bevel1 -menu.selected.color: #4a5194 -menu.selected.colorTo: #5a71c5 -menu.selected.textColor: #ffffff -menu.bullet.imageColor: #000000 -menu.bullet.selected.imageColor: #ffffff +menu.items.active.bg: flat gradient vertical bevel1 +menu.items.active.bg.color: #4a5194 +menu.items.active.bg.colorTo: #5a71c5 +menu.items.active.text.color: #ffffff -menuOverlap: 5 +menu.overlap: 5 -window.label.justify: center +window.label.text.justify: center -window.title.focus: flat gradient vertical bevel1 -window.title.focus.color: #6375ce -window.title.focus.colorTo: #4a5194 +window.active.title.bg: flat gradient vertical bevel1 +window.active.title.bg.color: #6375ce +window.active.title.bg.colorTo: #4a5194 -window.handle.focus: flat gradient vertical bevel1 -window.handle.focus.color: #6375ce -window.handle.focus.colorTo: #4a5194 +window.active.handle.bg: flat gradient vertical bevel1 +window.active.handle.bg.color: #6375ce +window.active.handle.bg.colorTo: #4a5194 -window.grip.focus: flat gradient vertical bevel1 -window.grip.focus.color: #6375ce -window.grip.focus.colorTo: #4a5194 +window.active.grip.bg: flat gradient vertical bevel1 +window.active.grip.bg.color: #6375ce +window.active.grip.bg.colorTo: #4a5194 -window.label.focus: parentrelative -window.label.focus.color: #000000 -window.label.focus.colorTo: #000000 -window.label.focus.textColor: #ffffff +window.active.label.bg: parentrelative +window.active.label.bg.color: #000000 +window.active.label.bg.colorTo: #000000 +window.active.label.text.color: #ffffff -window.button.focus: parentrelative -window.button.focus.color: #000000 -window.button.focus.colorTo: #000000 -window.button.focus.imageColor: #d6d7ef +window.active.button.unpressed.bg: parentrelative +window.active.button.unpressed.bg.color: #000000 +window.active.button.unpressed.bg.colorTo: #000000 +window.active.button.unpressed.image.color: #d6d7ef -window.button.pressed.focus: sunken solid bevel1 -window.button.pressed.focus.color: #4c59a6 -window.button.pressed.focus.colorTo: #000000 +window.active.button.pressed.bg: sunken solid bevel1 +window.active.button.pressed.bg.color: #4c59a6 +window.active.button.pressed.bg.colorTo: #000000 -window.title.unfocus: flat gradient vertical bevel1 -window.title.unfocus.color: #e1e1e1 -window.title.unfocus.colorTo: #a5a2a5 +window.inactive.title.bg: flat gradient vertical bevel1 +window.inactive.title.bg.color: #e1e1e1 +window.inactive.title.bg.colorTo: #a5a2a5 -window.handle.unfocus: flat gradient vertical bevel1 -window.handle.unfocus.color: #e6e6e6 -window.handle.unfocus.colorTo: #cdcac7 +window.inactive.handle.bg: flat gradient vertical bevel1 +window.inactive.handle.bg.color: #e6e6e6 +window.inactive.handle.bg.colorTo: #cdcac7 -window.grip.unfocus: flat gradient vertical bevel1 -window.grip.unfocus.color: #e6e6e6 -window.grip.unfocus.colorTo: #cdcac7 +window.inactive.grip.bg: flat gradient vertical bevel1 +window.inactive.grip.bg.color: #e6e6e6 +window.inactive.grip.bg.colorTo: #cdcac7 -window.label.unfocus: parentrelative -window.label.unfocus.textColor: #ffffff +window.inactive.label.bg: parentrelative +window.inactive.label.text.color: #ffffff -window.button.unfocus: parentrelative -window.button.unfocus.imageColor: #ffffff +window.inactive.button.unpressed.bg: parentrelative +window.inactive.button.unpressed.image.color: #ffffff -window.button.pressed.unfocus: sunken solidbevel1 -window.button.pressed.unfocus.color: #cdcac7 -window.button.pressed.unfocus.colorTo: #000000 +window.inactive.button.pressed.bg: sunken solidbevel1 +window.inactive.button.pressed.bg.color: #cdcac7 +window.inactive.button.pressed.bg.colorTo: #000000 -window.button.pressed.unfocus: flat gradient vertical bevel1 -window.button.pressed.unfocus.color: #919191 -window.button.pressed.unfocus.colorTo: #5a5a5a -window.button.pressed.unfocus.borderColor: #000000 +window.inactive.button.pressed.bg: flat gradient vertical bevel1 +window.inactive.button.pressed.bg.color: #919191 +window.inactive.button.pressed.bg.colorTo: #5a5a5a +window.inactive.button.pressed.bg.border.color: #000000 !# -window.button.disabled.focus: parentrelative -window.button.disabled.focus.imageColor: #dddddd +window.active.button.disabled.bg: parentrelative +window.active.button.disabled.image.color: #dddddd !# -window.button.disabled.unfocus: parentrelative -window.button.disabled.unfocus.imageColor: #6a716a +window.inactive.button.disabled.bg: parentrelative +window.inactive.button.disabled.image.color: #6a716a !# toggled -window.button.toggled.focus: parentrelative -window.button.toggled.focus.imageColor: #f1f1f1 +window.active.button.toggled.bg: parentrelative +window.active.button.toggled.image.color: #f1f1f1 -window.button.toggled.unfocus: parentrelative -window.button.toggled.focus.imageColor: #f1f1f1 +window.inactive.button.toggled.bg: parentrelative +window.active.button.toggled.image.color: #f1f1f1 -window.frame.unfocusColor: #e6e6e6 -window.frame.focusColor: #e6e6e6 +window.inactive.client.color: #e6e6e6 +window.active.client.color: #e6e6e6 !! Global width settings -borderWidth: 1 -bevelWidth: 1 -handleWidth: 3 -frameWidth: 0 +border.width: 1 +padding.width: 1 +window.handle.width: 3 +window.client.padding.width: 0 !! Miscellaneous settings -borderColor: #222222 +border.color: #222222 !! font me! -window.label.focus.font:Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowoffset=1:shadowtint=75 -window.label.unfocus.font:Bitstream Vera Sans:bold:pixelsize=9 +window.active.label.text.font:Bitstream Vera Sans:bold:pixelsize=9:shadow=y:shadowoffset=1:shadowtint=75 +window.inactive.label.text.font:Bitstream Vera Sans:bold:pixelsize=9 menu.items.font: Bitstream Vera Sans:pixelsize=10 -menu.title.font: Bitstream Vera Sans:bold:pixelsize=10 +menu.title.text.font: Bitstream Vera Sans:bold:pixelsize=10 diff --git a/tools/themeupdate/themeupdate.py b/tools/themeupdate/themeupdate.py index 171be0b..8454c1a 100755 --- a/tools/themeupdate/themeupdate.py +++ b/tools/themeupdate/themeupdate.py @@ -37,13 +37,13 @@ def find_key(data, keysubstr, exact = False): def simple_replace(data): pairs = {} - pairs['window.focus.font'] = 'window.label.focus.font' - pairs['window.unfocus.font'] = 'window.label.unfocus.font' - pairs['window.justify'] = 'window.label.justify' - pairs['menu.frame.disableColor'] = 'menu.disabled.textColor' + pairs['.picColor'] = '.imageColor' pairs['menu.frame'] = 'menu.items' pairs['menu.hilite'] = 'menu.selected' - pairs['.picColor'] = '.imageColor' + pairs['borderColor'] = 'border.color' + pairs['imageColor'] = 'image.color' + pairs['textColor'] = 'text.color' + pairs['interlaceColor'] = 'interlace.color' for k in pairs.keys(): while 1: @@ -56,6 +56,151 @@ def simple_replace(data): else: break + pairs = {} + pairs['window.focus.font'] = 'window.active.label.text.font' + pairs['window.unfocus.font'] = 'window.inactive.label.text.font' + pairs['window.justify'] = 'window.label.justify' + pairs['menu.frame.disableColor'] = 'menu.disabled.textColor' + pairs['window.label.focus.font'] = 'window.active.label.text.font' + pairs['window.label.unfocus.font'] = 'window.inactive.label.text.font' + pairs['window.label.justify'] = 'window.label.text.justify' + pairs['menu.title.font'] = 'menu.title.text.font' + pairs['menu.title.justify'] = 'menu.title.text.justify' + pairs['menuOverlap'] = 'menu.overlap' + pairs['handleWidth'] = 'window.handle.width' + pairs['borderWidth'] = 'border.width' + pairs['bevelWidth'] = 'padding.width' + pairs['frameWidth'] = 'window.client.padding.width' + pairs['window.frame.focusColor'] = 'window.active.client.color' + pairs['window.frame.unfocusColor'] = 'window.inactive.client.color' + pairs['window.title.focus'] = 'window.active.title.bg' + pairs['window.title.unfocus'] = 'window.inactive.title.bg' + pairs['window.label.focus'] = 'window.active.label.bg' + pairs['window.label.unfocus'] = 'window.inactive.label.bg' + pairs['window.handle.focus'] = 'window.active.handle.bg' + pairs['window.handle.unfocus'] = 'window.inactive.handle.bg' + pairs['window.grip.focus'] = 'window.active.grip.bg' + pairs['window.grip.unfocus'] = 'window.inactive.grip.bg' + pairs['menu.items'] = 'menu.items.bg' + pairs['menu.title'] = 'menu.title.bg' + pairs['menu.selected'] = 'menu.items.active.bg' + pairs['window.title.focus'] = 'window.active.title.bg' + pairs['window.label.focus'] = 'window.active.label.bg' + pairs['window.title.unfocus'] = 'window.inactive.title.bg' + pairs['window.label.unfocus'] = 'window.inactive.label.bg' + pairs['window.button.disabled.focus'] = 'window.active.button.disabled.bg' + pairs['window.button.disabled.unfocus'] = \ + 'window.inactive.button.disabled.bg' + pairs['window.button.pressed.focus'] = 'window.active.button.pressed.bg' + pairs['window.button.pressed.unfocus'] = \ + 'window.inactive.button.pressed.bg' + pairs['window.button.toggled.focus'] = 'window.active.button.toggled.bg' + pairs['window.button.toggled.unfocus'] = \ + 'window.inactive.button.toggled.bg' + pairs['window.button.focus'] = 'window.active.button.unpressed.bg' + pairs['window.button.unfocus'] = 'window.inactive.button.unpressed.bg' + pairs['window.button.hover.focus'] = 'window.active.button.hover.bg' + pairs['window.button.hover.unfocus'] = 'window.inactive.button.hover.bg' + + for k in pairs.keys(): + while 1: + i, key, nul = find_key(data, k, True); + if i >= 0: + newl = data[i].replace(k, pairs[k]) + out('Updating "' + key + + '" to "' + key.replace(k, pairs[k]) + '"\n') + data[i] = newl + else: + break + + pairs = {} + pairs['window.title.focus'] = 'window.active.title' + pairs['window.title.unfocus'] = 'window.inactive.title' + pairs['window.label.focus'] = 'window.active.label' + pairs['window.label.unfocus'] = 'window.inactive.label' + pairs['window.handle.focus'] = 'window.active.handle' + pairs['window.handle.unfocus'] = 'window.inactive.handle' + pairs['window.grip.focus'] = 'window.active.grip' + pairs['window.grip.unfocus'] = 'window.inactive.grip' + pairs['menu.selected'] = 'menu.items.active' + pairs['window.title.focus'] = 'window.active.title' + pairs['window.label.focus'] = 'window.active.label' + pairs['window.title.unfocus'] = 'window.inactive.title' + pairs['window.label.unfocus'] = 'window.inactive.label' + pairs['window.button.disabled.focus'] = 'window.active.button.disabled' + pairs['window.button.disabled.unfocus'] = \ + 'window.inactive.button.disabled' + pairs['window.button.pressed.focus'] = 'window.active.button.pressed' + pairs['window.button.pressed.unfocus'] = \ + 'window.inactive.button.pressed' + pairs['window.button.toggled.focus'] = 'window.active.button.toggled' + pairs['window.button.toggled.unfocus'] = \ + 'window.inactive.button.toggled' + pairs['window.button.focus'] = 'window.active.button' + pairs['window.button.unfocus'] = 'window.inactive.button' + pairs['window.button.hover.focus'] = 'window.active.button.hover' + pairs['window.button.hover.unfocus'] = 'window.inactive.button.hover' + pairs['window.label.unfocus'] = 'window.inactive.label' + pairs['window.label.focus'] = 'window.active.label' + pairs['window.button.focus'] = 'window.active.button.unpressed' + pairs['menu.disabled'] = 'menu.items.disabled' + pairs['menu.selected'] = 'menu.items.active' + pairs['window.button.unfocus'] = 'window.inactive.button.unpressed' + pairs['window.button.pressed.focus'] = 'window.active.button.pressed' + pairs['window.button.pressed.unfocus'] = 'window.inactive.button.pressed' + pairs['window.button.disabled.focus'] = 'window.active.button.disabled' + pairs['window.button.disabled.unfocus'] = 'window.inactive.button.disabled' + pairs['window.button.hover.focus'] = 'window.active.button.hover' + pairs['window.button.hover.unfocus'] = 'window.inactive.button.hover' + pairs['window.button.toggled.focus'] = 'window.active.button.toggled' + pairs['window.button.toggled.unfocus'] = 'window.inactive.button.toggled' + + for k in pairs.keys(): + while 1: + i, key, nul = find_key(data, k); + if i >= 0: + newl = data[i].replace(k, pairs[k]) + out('Updating "' + key + + '" to "' + key.replace(k, pairs[k]) + '"\n') + data[i] = newl + else: + break + +def replace_colors(data): + i = 0 + n = len(data) + while i < n: + l = data[i] + key, value = getkeyval(l) + if key and value: + if key.find('.color') != -1: + if key.find('client.color') == -1 \ + and key.find('image.color') == -1 \ + and key.find('bg.color') == -1 \ + and key.find('border.color') == -1 \ + and key.find('interlace.color') == -1 \ + and key.find('text.color') == -1: + newl = data[i].replace('.color', '.bg.color') + out('Updating "' + key + + '" to "' + key.replace('.color', '.bg.color') + '"\n') + data[i] = newl + if key.find('.border.color') != -1 \ + and key.find('bg.border.color') == -1: + newl = data[i].replace('.border.color', '.bg.border.color') + out('Updating "' + key + + '" to "' + key.replace('.border.color', + '.bg.border.color') + '"\n') + data[i] = newl + if key.find('.interlace.color') != -1 \ + and key.find('bg.interlace.color') == -1: + newl = data[i].replace('.interlace.color', + '.bg.interlace.color') + out('Updating "' + key + + '" to "' + key.replace('.interlace.color', + '.bg.interlace.color') + '"\n') + data[i] = newl + i += 1 + def remove(data): invalid = [] invalid.append('toolbar') @@ -71,6 +216,8 @@ def remove(data): break invalid.append('rootCommand') invalid.append('menu.bullet') + invalid.append('menu.bullet.image.color') + invalid.append('menu.bullet.selected.image.color') invalid.append('menu.frame.justify') for inv in invalid: while 1: @@ -192,7 +339,7 @@ def pixelsize(data): def warn_missing(data): need = ('window.button.hover.focus', 'window.button.hover.unfocus', - 'menuOverlap') + 'menu.overlap') for n in need: i, nul, nul = find_key(data, n) if i < 0: @@ -200,8 +347,10 @@ def warn_missing(data): 'can optionally be set.\n') def err_missing(data): - need = ('window.button.disabled.focus', 'window.button.disabled.unfocus', - 'window.frame.focusColor', 'window.frame.unfocusColor') + need = ('window.active.button.disabled', + 'window.inactive.button.disabled', + 'window.active.client.color', + 'window.inactive.client.color') for n in need: i, nul, nul = find_key(data, n) if i < 0: @@ -228,6 +377,7 @@ for i in range(len(data)): data[i] = data[i].strip() simple_replace(data) +replace_colors(data) remove(data) pressed(data) x_fonts(data) -- 1.9.1