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;
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;
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;
NEXT(y3);
}
- current = COLOR(y3);
- for (x = w - 1; x >= 0; --x) /* 0 -> w */
- *(data++) = current;
-
RrColorFree(primary_light);
RrColorFree(secondary_light);
}
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);
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 =
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 =
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);
if (!read_color(db, inst,
"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 */
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))
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))
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,
TRUE))
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 =
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
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
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
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
!! 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