Author: acimitan
Date: Fri Feb 15 08:39:48 2008
New Revision: 8
URL: http://svn.gnome.org/viewvc/murrine?rev=8&view=rev
Log:
2008-02-15 Andrea Cimitan <[EMAIL PROTECTED]>
* src/cairo-support.c: (murrine_draw_innerborder),
(murrine_set_gradient):
* src/murrine_draw.c: (murrine_draw_tab):
* src/murrine_draw_rgba.c: (murrine_rgba_draw_tab):
* src/murrine_style.c: (murrine_set_widget_parameters):
* src/murrine_types.h:
Simplified gradients's code, I hope that nothing got broken :)
Modified:
trunk/ChangeLog
trunk/src/cairo-support.c
trunk/src/murrine_draw.c
trunk/src/murrine_draw_rgba.c
trunk/src/murrine_style.c
trunk/src/murrine_types.h
Modified: trunk/src/cairo-support.c
==============================================================================
--- trunk/src/cairo-support.c (original)
+++ trunk/src/cairo-support.c Fri Feb 15 08:39:48 2008
@@ -472,22 +472,11 @@
if (gradients)
{
- if (mrn_gradient.has_gradient_stop)
- {
- murrine_shade (highlight_color,
mrn_gradient.gradient_stop_1, &shade1);
- murrine_shade (highlight_color,
mrn_gradient.gradient_stop_2, &shade2);
- murrine_shade (highlight_color,
mrn_gradient.gradient_stop_3, &shade3);
- murrine_shade (highlight_color,
mrn_gradient.gradient_stop_4, &shade4);
- murrine_shade (fill, mrn_gradient.gradient_stop_4,
&fill_shade);
- }
- else
- {
- murrine_shade (highlight_color, 1.1, &shade1);
- murrine_shade (highlight_color, 1.0, &shade2);
- murrine_shade (highlight_color, 1.0, &shade3);
- murrine_shade (highlight_color, 1.1, &shade4);
- murrine_shade (fill, 1.1, &fill_shade);
- }
+ murrine_shade (highlight_color, mrn_gradient.gradient_stop_1,
&shade1);
+ murrine_shade (highlight_color, mrn_gradient.gradient_stop_2,
&shade2);
+ murrine_shade (highlight_color, mrn_gradient.gradient_stop_3,
&shade3);
+ murrine_shade (highlight_color, mrn_gradient.gradient_stop_4,
&shade4);
+ murrine_shade (fill, mrn_gradient.gradient_stop_4, &fill_shade);
}
else
{
@@ -549,20 +538,10 @@
cairo_pattern_t *pattern;
MurrineRGB shade1, shade2, shade3, shade4;
- if (mrn_gradient.has_gradient_stop)
- {
- murrine_shade (color, mrn_gradient.gradient_stop_1,
&shade1);
- murrine_shade (color, mrn_gradient.gradient_stop_2,
&shade2);
- murrine_shade (color, mrn_gradient.gradient_stop_3,
&shade3);
- murrine_shade (color, mrn_gradient.gradient_stop_4,
&shade4);
- }
- else
- {
- murrine_shade (color, 1.1, &shade1);
- murrine_shade (color, 1.0, &shade2);
- murrine_shade (color, 1.0, &shade3);
- murrine_shade (color, 1.1, &shade4);
- }
+ murrine_shade (color, mrn_gradient.gradient_stop_1, &shade1);
+ murrine_shade (color, mrn_gradient.gradient_stop_2, &shade2);
+ murrine_shade (color, mrn_gradient.gradient_stop_3, &shade3);
+ murrine_shade (color, mrn_gradient.gradient_stop_4, &shade4);
pattern = cairo_pattern_create_linear (x, y, width+x, height+y);
if (mrn_gradient.use_rgba)
Modified: trunk/src/murrine_draw.c
==============================================================================
--- trunk/src/murrine_draw.c (original)
+++ trunk/src/murrine_draw.c Fri Feb 15 08:39:48 2008
@@ -1032,30 +1032,10 @@
double custom_highlight_ratio = widget->highlight_ratio;
custom_highlight_ratio = get_decreased_ratio
(widget->highlight_ratio, 2.0);
- if (mrn_gradient_custom.gradients)
- {
- if (mrn_gradient_custom.has_gradient_stop)
- {
- murrine_shade (fill,
mrn_gradient_custom.gradient_stop_1*custom_highlight_ratio, &shade1);
- murrine_shade (fill,
mrn_gradient_custom.gradient_stop_2*custom_highlight_ratio, &shade2);
- murrine_shade (fill,
mrn_gradient_custom.gradient_stop_3, &shade3);
- murrine_shade (fill,
mrn_gradient_custom.gradient_stop_4, &shade4);
- }
- else
- {
- murrine_shade (fill,
1.1*custom_highlight_ratio, &shade1);
- murrine_shade (fill,
1.0*custom_highlight_ratio, &shade2);
- murrine_shade (fill, 1.0, &shade3);
- murrine_shade (fill, 1.1, &shade4);;
- }
- }
- else
- {
- murrine_shade (fill, 1.0*custom_highlight_ratio,
&shade1);
- murrine_shade (fill, 1.0*custom_highlight_ratio,
&shade2);
- murrine_shade (fill, 1.0, &shade3);
- murrine_shade (fill, 1.0, &shade4);
- }
+ murrine_shade (fill,
mrn_gradient_custom.gradient_stop_1*custom_highlight_ratio, &shade1);
+ murrine_shade (fill,
mrn_gradient_custom.gradient_stop_2*custom_highlight_ratio, &shade2);
+ murrine_shade (fill, mrn_gradient_custom.gradient_stop_3,
&shade3);
+ murrine_shade (fill, mrn_gradient_custom.gradient_stop_4,
&shade4);
switch (tab->gap_side)
{
Modified: trunk/src/murrine_draw_rgba.c
==============================================================================
--- trunk/src/murrine_draw_rgba.c (original)
+++ trunk/src/murrine_draw_rgba.c Fri Feb 15 08:39:48 2008
@@ -1136,30 +1136,10 @@
double custom_highlight_ratio = widget->highlight_ratio;
custom_highlight_ratio = get_decreased_ratio
(widget->highlight_ratio, 2.0);
- if (mrn_gradient_custom.gradients)
- {
- if (mrn_gradient_custom.has_gradient_stop)
- {
- murrine_shade (fill,
mrn_gradient_custom.gradient_stop_1*custom_highlight_ratio, &shade1);
- murrine_shade (fill,
mrn_gradient_custom.gradient_stop_2*custom_highlight_ratio, &shade2);
- murrine_shade (fill,
mrn_gradient_custom.gradient_stop_3, &shade3);
- murrine_shade (fill,
mrn_gradient_custom.gradient_stop_4, &shade4);
- }
- else
- {
- murrine_shade (fill,
1.1*custom_highlight_ratio, &shade1);
- murrine_shade (fill,
1.0*custom_highlight_ratio, &shade2);
- murrine_shade (fill, 1.0, &shade3);
- murrine_shade (fill, 1.1, &shade4);;
- }
- }
- else
- {
- murrine_shade (fill, 1.0*custom_highlight_ratio,
&shade1);
- murrine_shade (fill, 1.0*custom_highlight_ratio,
&shade2);
- murrine_shade (fill, 1.0, &shade3);
- murrine_shade (fill, 1.0, &shade4);
- }
+ murrine_shade (fill,
mrn_gradient_custom.gradient_stop_1*custom_highlight_ratio, &shade1);
+ murrine_shade (fill,
mrn_gradient_custom.gradient_stop_2*custom_highlight_ratio, &shade2);
+ murrine_shade (fill, mrn_gradient_custom.gradient_stop_3,
&shade3);
+ murrine_shade (fill, mrn_gradient_custom.gradient_stop_4,
&shade4);
switch (tab->gap_side)
{
Modified: trunk/src/murrine_style.c
==============================================================================
--- trunk/src/murrine_style.c (original)
+++ trunk/src/murrine_style.c Fri Feb 15 08:39:48 2008
@@ -138,11 +138,27 @@
params->highlight_ratio = murrine_style->highlight_ratio;
MurrineGradients mrn_gradient;
- mrn_gradient.has_gradient_stop = murrine_style->has_gradient_stop;
- mrn_gradient.gradient_stop_1 = murrine_style->gradient_stop_1;
- mrn_gradient.gradient_stop_2 = murrine_style->gradient_stop_2;
- mrn_gradient.gradient_stop_3 = murrine_style->gradient_stop_3;
- mrn_gradient.gradient_stop_4 = murrine_style->gradient_stop_4;
+ if (murrine_style->has_gradient_stop)
+ {
+ mrn_gradient.gradient_stop_1 = murrine_style->gradient_stop_1;
+ mrn_gradient.gradient_stop_2 = murrine_style->gradient_stop_2;
+ mrn_gradient.gradient_stop_3 = murrine_style->gradient_stop_3;
+ mrn_gradient.gradient_stop_4 = murrine_style->gradient_stop_4;
+ }
+ else if (murrine_style->gradients)
+ {
+ mrn_gradient.gradient_stop_1 = 1.1;
+ mrn_gradient.gradient_stop_2 = 1.0;
+ mrn_gradient.gradient_stop_3 = 1.0;
+ mrn_gradient.gradient_stop_4 = 1.1;
+ }
+ else
+ {
+ mrn_gradient.gradient_stop_1 = 1.0;
+ mrn_gradient.gradient_stop_2 = 1.0;
+ mrn_gradient.gradient_stop_3 = 1.0;
+ mrn_gradient.gradient_stop_4 = 1.0;
+ }
mrn_gradient.gradients = murrine_style->gradients;
mrn_gradient.use_rgba = (murrine_widget_is_rgba ((GtkWidget*) widget)
&& murrine_style->rgba);
mrn_gradient.rgba_opacity = GRADIENT_OPACITY;
@@ -150,7 +166,6 @@
MurrineDrawStyles drawstyle = MRN_DRAW_STYLE_MURRINE;
if (mrn_gradient.use_rgba)
{
- //params->highlight_ratio = get_increased_ratio
(params->highlight_ratio, 1.4);
drawstyle = MRN_DRAW_STYLE_RGBA;
}
params->mrn_gradient = mrn_gradient;
Modified: trunk/src/murrine_types.h
==============================================================================
--- trunk/src/murrine_types.h (original)
+++ trunk/src/murrine_types.h Fri Feb 15 08:39:48 2008
@@ -182,7 +182,6 @@
double rgba_opacity;
boolean gradients;
- boolean has_gradient_stop;
boolean use_rgba;
} MurrineGradients;
_______________________________________________
SVN-commits-list mailing list (read only)
http://mail.gnome.org/mailman/listinfo/svn-commits-list
Want to limit the commits to a few modules? Go to above URL, log in to edit
your options and select the modules ('topics') you want.
Module maintainer? It is possible to set the reply-to to your development
mailing list. Email [EMAIL PROTECTED] if interested.