[murrine] textstyle uses alpha, fixes to checkbox and radio
- From: Andrea Cimitan <acimitan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [murrine] textstyle uses alpha, fixes to checkbox and radio
- Date: Fri, 6 Aug 2010 14:56:57 +0000 (UTC)
commit ea5eefb1df37e033055d751b18974bb68646de49
Author: Andrea Cimitan <andrea cimitan gmail com>
Date: Fri Aug 6 15:56:22 2010 +0100
textstyle uses alpha, fixes to checkbox and radio
src/murrine_draw.c | 6 +++---
src/murrine_draw_rgba.c | 4 ++--
src/murrine_rc_style.c | 2 +-
src/murrine_style.c | 19 +++++++++----------
4 files changed, 15 insertions(+), 16 deletions(-)
---
diff --git a/src/murrine_draw.c b/src/murrine_draw.c
index b5d7c1c..478d063 100644
--- a/src/murrine_draw.c
+++ b/src/murrine_draw.c
@@ -2301,7 +2301,7 @@ murrine_draw_menu_frame (cairo_t *cr,
raico_blur_t* blur = NULL;
cairo_t *cr_surface;
cairo_surface_t *surface;
- int bradius = 20;
+ int bradius = 30;
MurrineRGB fill;
murrine_shade (&colors->bg[0], 0.1, &fill);
@@ -2809,7 +2809,7 @@ murrine_draw_radiobutton (cairo_t *cr,
murrine_invert_text (dot, &outline);
cairo_arc (cr, (double)width/2, (double)height/2, (double)(width+height)/4-4, 0, G_PI*2);
- murrine_set_color_rgba (cr, &outline, 0.3*trans);
+ murrine_set_color_rgba (cr, &outline, 0.3*trans*(widget->state_type == GTK_STATE_INSENSITIVE? 0.2 : 1.0));
cairo_fill (cr);
cairo_arc (cr, (double)width/2, (double)height/2, (double)(width+height)/4-5, 0, G_PI*2);
@@ -2961,7 +2961,7 @@ murrine_draw_checkbox (cairo_t *cr,
cairo_line_to (cr, 2.95, 7.65);
cairo_close_path (cr);
- murrine_set_color_rgba (cr, &outline, 0.5*trans);
+ murrine_set_color_rgba (cr, &outline, 0.5*trans*(widget->state_type == GTK_STATE_INSENSITIVE ? 0.2 : 1.0));
cairo_fill (cr);
cairo_translate (cr, 4.0, 2.0);
diff --git a/src/murrine_draw_rgba.c b/src/murrine_draw_rgba.c
index 73bbd3f..5b932e3 100644
--- a/src/murrine_draw_rgba.c
+++ b/src/murrine_draw_rgba.c
@@ -2045,7 +2045,7 @@ murrine_rgba_draw_radiobutton (cairo_t *cr,
murrine_invert_text (dot, &outline);
cairo_arc (cr, (double)width/2, (double)height/2, (double)(width+height)/4-4, 0, G_PI*2);
- murrine_set_color_rgba (cr, &outline, 0.3*trans);
+ murrine_set_color_rgba (cr, &outline, 0.3*trans*(widget->state_type == GTK_STATE_INSENSITIVE ? 0.2 : 1.0));
cairo_fill (cr);
cairo_arc (cr, (double)width/2, (double)height/2, (double)(width+height)/4-5, 0, G_PI*2);
@@ -2198,7 +2198,7 @@ murrine_rgba_draw_checkbox (cairo_t *cr,
cairo_line_to (cr, 2.95, 7.65);
cairo_close_path (cr);
- murrine_set_color_rgba (cr, &outline, 0.5*trans);
+ murrine_set_color_rgba (cr, &outline, 0.5*trans*(widget->state_type == GTK_STATE_INSENSITIVE ? 0.2 : 1.0));
cairo_fill (cr);
cairo_translate (cr, 4.0, 2.0);
diff --git a/src/murrine_rc_style.c b/src/murrine_rc_style.c
index 4b491a0..96786d4 100644
--- a/src/murrine_rc_style.c
+++ b/src/murrine_rc_style.c
@@ -214,7 +214,7 @@ murrine_rc_style_init (MurrineRcStyle *murrine_rc)
murrine_rc->spinbuttonstyle = 0;
murrine_rc->stepperstyle = 0;
murrine_rc->textstyle = 0;
- murrine_rc->text_shade = 1.06;
+ murrine_rc->text_shade = 1.12;
murrine_rc->toolbarstyle = 0;
murrine_rc->trough_border_shades[0] = 1.0;
murrine_rc->trough_border_shades[1] = 1.0;
diff --git a/src/murrine_style.c b/src/murrine_style.c
index 6d7beb5..25fb3d6 100644
--- a/src/murrine_style.c
+++ b/src/murrine_style.c
@@ -2061,7 +2061,7 @@ murrine_style_draw_layout (GtkStyle *style,
if (state_type == GTK_STATE_INSENSITIVE)
{
- shade_level = 1.12;
+ shade_level = 1.24;
xos = 1;
yos = 1;
}
@@ -2114,17 +2114,16 @@ murrine_style_draw_layout (GtkStyle *style,
etched.green = (int) (temp.g*65535);
etched.blue = (int) (temp.b*65535);
- gdk_draw_layout_with_colors (window, gc, x+xos, y+yos, layout, &etched, NULL);
+/* gdk_draw_layout_with_colors (window, gc, x+xos, y+yos, layout, &etched, NULL);*/
/* with cairo *
*/
-/* cairo_t *cr; */
-/* cr = murrine_begin_paint (window, area); */
-/* cairo_translate (cr, x+xos, y+yos); */
-/* murrine_set_color_rgb (cr, &temp); */
-/* murrine_set_color_rgba (cr, &temp, 0.5);*/
-/* pango_cairo_show_layout (cr, layout);*/
-/* cairo_destroy (cr);*/
+ cairo_t *cr;
+ cr = murrine_begin_paint (window, area);
+ cairo_translate (cr, x+xos, y+yos);
+ murrine_set_color_rgba (cr, &temp, 0.5);
+ pango_cairo_show_layout (cr, layout);
+ cairo_destroy (cr);
/* printf( "draw_layout: %s %s\n", detail, G_OBJECT_TYPE_NAME (widget->parent));*/
}
@@ -2141,7 +2140,7 @@ murrine_style_draw_layout (GtkStyle *style,
GdkColor etched;
MurrineRGB temp;
- murrine_mix_color (&colors->fg[state_type], ¶ms.parentbg, 0.4, &temp);
+ murrine_mix_color (&colors->fg[state_type], ¶ms.parentbg, state_type != GTK_STATE_PRELIGHT ? 0.4 : 0.2, &temp);
etched.red = (int) (temp.r*65535);
etched.green = (int) (temp.g*65535);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]