From: Dana Jansens Date: Sat, 9 Jun 2007 02:56:24 +0000 (+0000) Subject: merge r7438-7451 from trunk X-Git-Tag: release-3.4.3~89 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=064445d1298c88be98bbe452ae9a79caf1659353;p=dana%2Fopenbox.git merge r7438-7451 from trunk --- diff --git a/Makefile.am b/Makefile.am index baa62b33..6fa3a8e6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -313,6 +313,14 @@ orang_themedir = $(themedir)/Orang/openbox-3 dist_orang_theme_DATA= \ themes/Orang/openbox-3/themerc +onyx_themedir = $(themedir)/Onyx/openbox-3 +dist_onyx_theme_DATA= \ + themes/Onyx/openbox-3/themerc + +onyxcitrus_themedir = $(themedir)/Onyx-Citrus/openbox-3 +dist_onyxcitrus_theme_DATA= \ + themes/Onyx-Citrus/openbox-3/themerc + syscrash_themedir = $(themedir)/Syscrash/openbox-3 dist_syscrash_theme_DATA= \ themes/Syscrash/openbox-3/max_disabled.xbm \ diff --git a/openbox/frame.c b/openbox/frame.c index 16fe608e..8ce2a16d 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -1223,8 +1223,6 @@ ObFrameContext frame_context_from_string(const gchar *name) return OB_FRAME_CONTEXT_BRCORNER; else if (!g_ascii_strcasecmp("Top", name)) return OB_FRAME_CONTEXT_TOP; - else if (!g_ascii_strcasecmp("Handle", name)) - return OB_FRAME_CONTEXT_BOTTOM; else if (!g_ascii_strcasecmp("Bottom", name)) return OB_FRAME_CONTEXT_BOTTOM; else if (!g_ascii_strcasecmp("Left", name)) diff --git a/render/gradient.c b/render/gradient.c index d32d9c81..ad126513 100644 --- a/render/gradient.c +++ b/render/gradient.c @@ -420,13 +420,15 @@ static void gradient_solid(RrAppearance *l, gint w, gint h) static void gradient_splitvertical(RrAppearance *a, gint w, gint h) { - gint x, y1, y3, r, g, b; + gint x, y1, y2, y3, r, g, b; RrSurface *sf = &a->surface; RrPixel32 *data = sf->pixel_data; RrPixel32 current; RrColor *primary_light, *secondary_light; + gint y1sz, y2sz, y3sz; VARS(y1); + VARS(y2); VARS(y3); r = sf->primary->r; @@ -438,7 +440,7 @@ static void gradient_splitvertical(RrAppearance *a, gint w, gint h) if (r > 0xFF) r = 0xFF; if (g > 0xFF) g = 0xFF; if (b > 0xFF) b = 0xFF; - primary_light = RrColorNew(a->inst, r, g, b); + primary_light = RrColorNew(a->inst, r, g, b); r = sf->secondary->r; r += r >> 4; @@ -451,19 +453,35 @@ static void gradient_splitvertical(RrAppearance *a, gint w, gint h) if (b > 0xFF) b = 0xFF; secondary_light = RrColorNew(a->inst, r, g, b); - SETUP(y1, primary_light, sf->primary, (h / 2) -1); - SETUP(y3, sf->secondary, secondary_light, (h / 2) -1); + y1sz = MAX(h/2 - 1, 1); + /* setup to get the colors _in between_ these other 2 */ + y2sz = (h < 3 ? 0 : (h % 2 ? 3 : 2)); + y3sz = MAX(h/2 - 1, 0); - for (y1 = h - 1; y1 > (h / 2) -1; --y1) { /* 0 -> h-1 */ + SETUP(y1, primary_light, sf->primary, y1sz); + if (y2sz) { + SETUP(y2, sf->primary, sf->secondary, y2sz); + NEXT(y2); /* skip the first one, its the same as the last of y1 */ + } + SETUP(y3, sf->secondary, secondary_light, y3sz); + + for (y1 = y1sz; y1 > 0; --y1) { current = COLOR(y1); - for (x = w - 1; x >= 0; --x) /* 0 -> w */ + for (x = w - 1; x >= 0; --x) *(data++) = current; NEXT(y1); } + for (y2 = y2sz; y2 > 0; --y2) { + current = COLOR(y2); + for (x = w - 1; x >= 0; --x) + *(data++) = current; + + NEXT(y2); + } - for (y3 = (h / 2) - 1; y3 > 0; --y3) { + for (y3 = y3sz; y3 > 0; --y3) { current = COLOR(y3); for (x = w - 1; x >= 0; --x) *(data++) = current; @@ -471,10 +489,6 @@ static void gradient_splitvertical(RrAppearance *a, gint w, gint h) NEXT(y3); } - current = COLOR(y3); - for (x = w - 1; x >= 0; --x) /* 0 -> w */ - *(data++) = current; - RrColorFree(primary_light); RrColorFree(secondary_light); } diff --git a/render/theme.c b/render/theme.c index ba1ce78d..ae281948 100644 --- a/render/theme.c +++ b/render/theme.c @@ -92,6 +92,10 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->a_hover_unfocused_max = RrAppearanceNew(inst, 1); theme->a_toggled_focused_unpressed_max = RrAppearanceNew(inst, 1); theme->a_toggled_unfocused_unpressed_max = RrAppearanceNew(inst, 1); + theme->a_toggled_hover_focused_max = RrAppearanceNew(inst, 1); + theme->a_toggled_hover_unfocused_max = RrAppearanceNew(inst, 1); + theme->a_toggled_focused_pressed_max = RrAppearanceNew(inst, 1); + theme->a_toggled_unfocused_pressed_max = RrAppearanceNew(inst, 1); theme->a_focused_unpressed_max = RrAppearanceNew(inst, 1); theme->a_focused_pressed_max = RrAppearanceNew(inst, 1); theme->a_unfocused_unpressed_max = RrAppearanceNew(inst, 1); @@ -322,6 +326,9 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->titlebut_unfocused_unpressed_color->g, theme->titlebut_unfocused_unpressed_color->b); if (!read_color(db, inst, + "window.active.button.toggled.unpressed.image.color", + &theme->titlebut_toggled_focused_unpressed_color) && + !read_color(db, inst, "window.active.button.toggled.image.color", &theme->titlebut_toggled_focused_unpressed_color)) theme->titlebut_toggled_focused_unpressed_color = @@ -330,6 +337,9 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->titlebut_focused_pressed_color->g, theme->titlebut_focused_pressed_color->b); if (!read_color(db, inst, + "window.inactive.button.toggled.unpressed.image.color", + &theme->titlebut_toggled_unfocused_unpressed_color) && + !read_color(db, inst, "window.inactive.button.toggled.image.color", &theme->titlebut_toggled_unfocused_unpressed_color)) theme->titlebut_toggled_unfocused_unpressed_color = @@ -337,6 +347,38 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->titlebut_unfocused_pressed_color->r, theme->titlebut_unfocused_pressed_color->g, theme->titlebut_unfocused_pressed_color->b); + if (!read_color(db, inst, + "window.active.button.toggled.hover.image.color", + &theme->titlebut_toggled_hover_focused_color)) + theme->titlebut_toggled_hover_focused_color = + RrColorNew(inst, + theme->titlebut_toggled_focused_unpressed_color->r, + theme->titlebut_toggled_focused_unpressed_color->g, + theme->titlebut_toggled_focused_unpressed_color->b); + if (!read_color(db, inst, + "window.inactive.button.toggled.hover.image.color", + &theme->titlebut_toggled_hover_unfocused_color)) + theme->titlebut_toggled_hover_unfocused_color = + RrColorNew(inst, + theme->titlebut_toggled_unfocused_unpressed_color->r, + theme->titlebut_toggled_unfocused_unpressed_color->g, + theme->titlebut_toggled_unfocused_unpressed_color->b); + if (!read_color(db, inst, + "window.active.button.toggled.pressed.image.color", + &theme->titlebut_toggled_focused_pressed_color)) + theme->titlebut_toggled_focused_pressed_color = + RrColorNew(inst, + theme->titlebut_focused_pressed_color->r, + theme->titlebut_focused_pressed_color->g, + theme->titlebut_focused_pressed_color->b); + if (!read_color(db, inst, + "window.inactive.button.toggled.pressed.image.color", + &theme->titlebut_toggled_unfocused_pressed_color)) + theme->titlebut_toggled_unfocused_pressed_color = + RrColorNew(inst, + theme->titlebut_unfocused_pressed_color->r, + theme->titlebut_unfocused_pressed_color->g, + theme->titlebut_unfocused_pressed_color->b); if (!read_color(db, inst, "menu.title.text.color", &theme->menu_title_color)) theme->menu_title_color = RrColorNew(inst, 0, 0, 0); @@ -359,29 +401,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, "menu.items.active.text.color", &theme->menu_selected_color)) theme->menu_selected_color = RrColorNew(inst, 0, 0, 0); - - /* toggled hover = toggled unpressed (i.e. no change) */ - theme->titlebut_toggled_hover_focused_color = - RrColorNew(inst, - theme->titlebut_toggled_focused_unpressed_color->r, - theme->titlebut_toggled_focused_unpressed_color->g, - theme->titlebut_toggled_focused_unpressed_color->b); - theme->titlebut_toggled_hover_unfocused_color = - RrColorNew(inst, - theme->titlebut_toggled_unfocused_unpressed_color->r, - theme->titlebut_toggled_unfocused_unpressed_color->g, - theme->titlebut_toggled_unfocused_unpressed_color->b); - /* toggled pressed = pressed (which is the toggled unpressed fallback..) */ - theme->titlebut_toggled_focused_pressed_color = - RrColorNew(inst, - theme->titlebut_focused_pressed_color->r, - theme->titlebut_focused_pressed_color->g, - theme->titlebut_focused_pressed_color->b); - theme->titlebut_toggled_unfocused_pressed_color = - RrColorNew(inst, - theme->titlebut_unfocused_pressed_color->r, - theme->titlebut_unfocused_pressed_color->g, - theme->titlebut_unfocused_pressed_color->b); /* load the image masks */ @@ -636,6 +655,10 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, TRUE)) set_default_appearance(theme->a_unfocused_pressed_max); if (!read_appearance(db, inst, + "window.active.button.toggled.unpressed.bg", + theme->a_toggled_focused_unpressed_max, + TRUE) && + !read_appearance(db, inst, "window.active.button.toggled.bg", theme->a_toggled_focused_unpressed_max, TRUE)) @@ -645,6 +668,10 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, RrAppearanceCopy(theme->a_focused_pressed_max); } if (!read_appearance(db, inst, + "window.inactive.button.toggled.unpressed.bg", + theme->a_toggled_unfocused_unpressed_max, + TRUE) && + !read_appearance(db, inst, "window.inactive.button.toggled.bg", theme->a_toggled_unfocused_unpressed_max, TRUE)) @@ -653,6 +680,42 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->a_toggled_unfocused_unpressed_max = RrAppearanceCopy(theme->a_unfocused_pressed_max); } + if (!read_appearance(db, inst, + "window.active.button.toggled.hover.bg", + theme->a_toggled_hover_focused_max, + TRUE)) + { + RrAppearanceFree(theme->a_toggled_hover_focused_max); + theme->a_toggled_hover_focused_max = + RrAppearanceCopy(theme->a_toggled_focused_unpressed_max); + } + if (!read_appearance(db, inst, + "window.inactive.button.toggled.hover.bg", + 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_unpressed_max); + } + if (!read_appearance(db, inst, + "window.active.button.toggled.pressed.bg", + theme->a_toggled_focused_pressed_max, + TRUE)) + { + RrAppearanceFree(theme->a_toggled_focused_pressed_max); + theme->a_toggled_focused_pressed_max = + RrAppearanceCopy(theme->a_focused_pressed_max); + } + if (!read_appearance(db, inst, + "window.inactive.button.toggled.pressed.bg", + theme->a_toggled_unfocused_pressed_max, + TRUE)) + { + RrAppearanceFree(theme->a_toggled_unfocused_pressed_max); + theme->a_toggled_unfocused_pressed_max = + RrAppearanceCopy(theme->a_unfocused_pressed_max); + } if (!read_appearance(db, inst, "window.active.button.unpressed.bg", theme->a_focused_unpressed_max, @@ -682,17 +745,6 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, RrAppearanceCopy(theme->a_unfocused_unpressed_max); } - /* toggled + hover = toggled unpressed (i.e. no change) */ - theme->a_toggled_hover_focused_max = - RrAppearanceCopy(theme->a_toggled_focused_unpressed_max); - theme->a_toggled_hover_unfocused_max = - RrAppearanceCopy(theme->a_toggled_unfocused_unpressed_max); - /* toggled + pressed = pressed (which is the toggled fallback..) */ - theme->a_toggled_focused_pressed_max = - RrAppearanceCopy(theme->a_focused_pressed_max); - theme->a_toggled_unfocused_pressed_max = - RrAppearanceCopy(theme->a_unfocused_pressed_max); - theme->a_disabled_focused_close = RrAppearanceCopy(theme->a_disabled_focused_max); theme->a_disabled_unfocused_close = diff --git a/themes/Mikachu/openbox-3/themerc b/themes/Mikachu/openbox-3/themerc index eaeb1dd8..ae7e56bc 100644 --- a/themes/Mikachu/openbox-3/themerc +++ b/themes/Mikachu/openbox-3/themerc @@ -14,7 +14,7 @@ menu.items.bg.border.color: #000000 menu.items.text.color: #000022 menu.items.disabled.text.color: #711 -menu.items.active.bg: raised gradient mirrorhorizontal bevel1 +menu.items.active.bg: raised gradient mirrorhorizontal menu.items.active.bg.color: #555577 menu.items.active.bg.colorTo: #6699CC menu.items.active.bg.border.color: #000000 @@ -26,7 +26,7 @@ menu.frame.justify: left window.label.text.justify: left !! focused window settings -window.active.client.color: #80A080 +window.active.client.color: #8080A0 window.active.title.bg: raised gradient crossdiagonal bevel1 window.active.title.bg.color: #6699CC @@ -67,6 +67,12 @@ window.active.button.toggled.bg.colorTo: #334866 window.active.button.toggled.bg.border.color: #000000 window.active.button.toggled.image.color: grey85 +window.active.button.toggled.hover.bg: sunken parentrelative bevel2 +window.active.button.toggled.hover.bg.color: #6699CC +window.active.button.toggled.hover.bg.colorTo: #334866 +window.active.button.toggled.hover.bg.border.color: #000000 +window.active.button.toggled.hover.image.color: #00FF00 + window.active.button.disabled.bg: parentrelative window.active.button.disabled.bg.color: #000000 window.active.button.disabled.bg.colorTo: #000000 @@ -133,12 +139,20 @@ window.inactive.button.toggled.bg.colorTo: grey20 window.inactive.button.toggled.bg.border.color: #000000 window.inactive.button.toggled.image.color: grey60 +window.inactive.button.toggled.hover.bg: sunken parentrelative bevel2 +window.inactive.button.toggled.hover.bg.color: grey60 +window.inactive.button.toggled.hover.bg.colorTo: grey20 +window.inactive.button.toggled.hover.bg.border.color: #000000 +window.inactive.button.toggled.hover.image.color: #00CC00 + window.inactive.button.hover.bg: parentrelative window.inactive.button.hover.bg.color: #000000 window.inactive.button.hover.bg.colorTo: #000000 window.inactive.button.hover.image.color: #00CC00 window.inactive.button.hover.bg.border.color: #000000 +osd.label.bg: parentrelative sunken + !! Global width settings border.width: 1 padding.width: 1 @@ -151,10 +165,10 @@ focus.outer.color: #0000A0 !! Miscellaneous settings border.color: #223344 -!! Font stuff -window.active.label.text.font:shadow=n -window.inactive.label.text.font:shadowoffset=3:shadowtint=32:shadow=y -menu.title.text.font:shadowoffset=2:shadowtint=35:shadow=y -menu.items.font:shadowoffset=2:shadowtint=15:shadow=y +!! Font stuff (not used anymore) +window.active.label.text.font: Candara,sans:size=10:shadow=y:shadowoffset=2:shadowtint=32:weight=0 +window.inactive.label.text.font: Candara,sans:size=10:shadowoffset=3:shadowtint=32:shadow=y:weight=0 +menu.title.text.font: Technical,sans:size=20:shadowoffset=2:shadowtint=35:shadow=y +menu.items.font: Technical,sans:size=10:shadowoffset=2:shadowtint=15:shadow=y -!menu.overlap: 3 +menu.overlap: -3 diff --git a/tools/themetoxml/.svnignore b/tools/themetoxml/.svnignore deleted file mode 100644 index 97f89093..00000000 --- a/tools/themetoxml/.svnignore +++ /dev/null @@ -1,4 +0,0 @@ -.dirstamp -themetoxml -.libs -.deps