murrine r6 - in trunk: . src
- From: acimitan svn gnome org
- To: svn-commits-list gnome org
- Subject: murrine r6 - in trunk: . src
- Date: Wed, 13 Feb 2008 17:15:17 +0000 (GMT)
Author: acimitan
Date: Wed Feb 13 17:15:16 2008
New Revision: 6
URL: http://svn.gnome.org/viewvc/murrine?rev=6&view=rev
Log:
2008-02-13 Andrea Cimitan <andrea cimitan gmail com>
* src/cairo-support.c: (murrine_shade), (murrine_draw_innerborder),
(murrine_set_gradient):
* src/cairo-support.h:
* src/murrine_draw.c: (murrine_draw_inset),
(murrine_draw_highlight_and_shade), (murrine_draw_button),
(murrine_draw_entry), (murrine_draw_spinbutton_down),
(murrine_draw_slider_handle), (murrine_draw_progressbar_fill),
(murrine_draw_menubar), (murrine_draw_frame), (murrine_draw_tab),
(murrine_draw_separator), (murrine_draw_list_view_header),
(murrine_draw_toolbar), (murrine_draw_menuitem),
(murrine_draw_scrollbar_stepper), (murrine_draw_scrollbar_slider),
(murrine_draw_selected_cell), (murrine_draw_statusbar),
(murrine_draw_menu_frame), (murrine_draw_tooltip),
(murrine_draw_radiobutton), (murrine_draw_checkbox),
(murrine_draw_resize_grip):
* src/murrine_draw_rgba.c: (murrine_draw_inset),
(murrine_draw_highlight_and_shade), (murrine_rgba_draw_button),
(murrine_rgba_draw_entry), (murrine_rgba_draw_progressbar_fill),
(murrine_rgba_draw_menubar), (murrine_rgba_draw_toolbar),
(murrine_rgba_draw_frame), (murrine_rgba_draw_tab),
(murrine_rgba_draw_scrollbar_stepper),
(murrine_rgba_draw_scrollbar_slider),
(murrine_rgba_draw_radiobutton), (murrine_rgba_draw_checkbox),
(murrine_rgba_draw_menu_frame):
* src/murrine_style.c: (murrine_style_draw_layout),
(murrine_style_realize):
Nothing new, just changed the syntax for murrine_shade
Modified:
trunk/ChangeLog
trunk/src/cairo-support.c
trunk/src/cairo-support.h
trunk/src/murrine_draw.c
trunk/src/murrine_draw_rgba.c
trunk/src/murrine_style.c
Modified: trunk/src/cairo-support.c
==============================================================================
--- trunk/src/cairo-support.c (original)
+++ trunk/src/cairo-support.c Wed Feb 13 17:15:16 2008
@@ -178,7 +178,7 @@
}
void
-murrine_shade (const MurrineRGB * a, MurrineRGB * b, float k)
+murrine_shade (const MurrineRGB * a, float k, MurrineRGB * b)
{
double red;
double green;
@@ -474,28 +474,28 @@
{
if (mrn_gradient.has_gradient_stop)
{
- murrine_shade (highlight_color, &shade1, mrn_gradient.gradient_stop_1);
- murrine_shade (highlight_color, &shade2, mrn_gradient.gradient_stop_2);
- murrine_shade (highlight_color, &shade3, mrn_gradient.gradient_stop_3);
- murrine_shade (highlight_color, &shade4, mrn_gradient.gradient_stop_4);
- murrine_shade (fill, &fill_shade, mrn_gradient.gradient_stop_4);
+ 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, &shade1, 1.1);
- murrine_shade (highlight_color, &shade2, 1.0);
- murrine_shade (highlight_color, &shade3, 1.0);
- murrine_shade (highlight_color, &shade4, 1.1);
- murrine_shade (fill, &fill_shade, 1.1);
+ 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);
}
}
else
{
- murrine_shade (highlight_color, &shade1, 1.0);
- murrine_shade (highlight_color, &shade2, 1.0);
- murrine_shade (highlight_color, &shade3, 1.0);
- murrine_shade (highlight_color, &shade4, 1.0);
- murrine_shade (fill, &fill_shade, 1.0);
+ murrine_shade (highlight_color, 1.0, &shade1);
+ murrine_shade (highlight_color, 1.0, &shade2);
+ murrine_shade (highlight_color, 1.0, &shade3);
+ murrine_shade (highlight_color, 1.0, &shade4);
+ murrine_shade (fill, 1.0, &fill_shade);
}
double fill_pos = 1.0-(1.0/(!horizontal ? (double)(width) : (double)(height)));
@@ -551,17 +551,17 @@
if (mrn_gradient.has_gradient_stop)
{
- murrine_shade (color, &shade1, mrn_gradient.gradient_stop_1);
- murrine_shade (color, &shade2, mrn_gradient.gradient_stop_2);
- murrine_shade (color, &shade3, mrn_gradient.gradient_stop_3);
- murrine_shade (color, &shade4, mrn_gradient.gradient_stop_4);
+ 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, &shade1, 1.1);
- murrine_shade (color, &shade2, 1.0);
- murrine_shade (color, &shade3, 1.0);
- murrine_shade (color, &shade4, 1.1);
+ murrine_shade (color, 1.1, &shade1);
+ murrine_shade (color, 1.0, &shade2);
+ murrine_shade (color, 1.0, &shade3);
+ murrine_shade (color, 1.1, &shade4);
}
pattern = cairo_pattern_create_linear (x, y, width+x, height+y);
Modified: trunk/src/cairo-support.h
==============================================================================
--- trunk/src/cairo-support.h (original)
+++ trunk/src/cairo-support.h Wed Feb 13 17:15:16 2008
@@ -23,8 +23,7 @@
#include "murrine_types.h"
-G_GNUC_INTERNAL void murrine_shade (const MurrineRGB *a, MurrineRGB *b,
- float k);
+G_GNUC_INTERNAL void murrine_shade (const MurrineRGB *a, float k, MurrineRGB *b);
G_GNUC_INTERNAL void murrine_mix_color (const MurrineRGB *color1, const MurrineRGB *color2,
gdouble mix_factor, MurrineRGB *composite);
Modified: trunk/src/murrine_draw.c
==============================================================================
--- trunk/src/murrine_draw.c (original)
+++ trunk/src/murrine_draw.c Wed Feb 13 17:15:16 2008
@@ -39,8 +39,8 @@
MurrineRGB highlight;
/* not really sure of shading ratios... we will think */
- murrine_shade (bg_color, &shadow, 0.6);
- murrine_shade (bg_color, &highlight, 1.4);
+ murrine_shade (bg_color, 0.6, &shadow);
+ murrine_shade (bg_color, 1.4, &highlight);
/* highlight */
cairo_move_to (cr, x + w + (radius * -0.2928932188), y - (radius * -0.2928932188)); /* 0.2928932... 1-sqrt(2)/2 gives middle of curve */
@@ -97,8 +97,8 @@
double x = 1.0;
double y = 1.0;
- murrine_shade (&colors->bg[0], &highlight, 1.04);
- murrine_shade (&colors->bg[0], &shadow, 0.96);
+ murrine_shade (&colors->bg[0], 1.04, &highlight);
+ murrine_shade (&colors->bg[0], 0.96, &shadow);
width -= 3;
height -= 3;
@@ -172,8 +172,8 @@
if (!horizontal)
murrine_exchange_axis (cr, &x, &y, &width, &height);
- murrine_shade (&colors->shade[6], &border_normal, 0.95);
- murrine_shade (&fill, &highlight, custom_highlight_ratio);
+ murrine_shade (&colors->shade[6], 0.95, &border_normal);
+ murrine_shade (&fill, custom_highlight_ratio, &highlight);
cairo_translate (cr, x, y);
cairo_set_line_width (cr, 1.0);
@@ -202,7 +202,7 @@
murrine_rounded_rectangle (cr, xoffset, yoffset, width-(xoffset*2), height-(yoffset*2), widget->roundness, widget->corners);
murrine_set_color_rgba (cr, &colors->spot[1], 0.5);
cairo_stroke (cr);
- murrine_shade (&border_normal, &border_normal, 0.8);
+ murrine_shade (&border_normal, 0.8, &border_normal);
}
/* Draw the bg */
@@ -243,7 +243,7 @@
{
murrine_draw_curved_highlight_bottom (cr, curve_pos, width, height);
MurrineRGB shadow;
- murrine_shade (&fill, &shadow, 1.0/custom_highlight_ratio);
+ murrine_shade (&fill, 1.0/custom_highlight_ratio, &shadow);
murrine_set_gradient (cr, &shadow, mrn_gradient_custom, xoffset+1, yoffset+1, 0, height-(yoffset*2)-2, widget->mrn_gradient.gradients, TRUE);
cairo_fill (cr);
}
@@ -251,7 +251,7 @@
/* Draw the white inner border */
if (widget->glazestyle != 4 && !widget->active)
{
- murrine_shade (&fill, &highlight, widget->innerborder_ratio*custom_highlight_ratio);
+ murrine_shade (&fill, widget->innerborder_ratio*custom_highlight_ratio, &highlight);
if (horizontal)
{
murrine_draw_innerborder (cr, &highlight, &fill, mrn_gradient_custom,
@@ -279,7 +279,7 @@
cairo_pattern_t *pattern;
MurrineRGB shadow;
- murrine_shade (&fill, &shadow, 0.94);
+ murrine_shade (&fill, 0.94, &shadow);
cairo_save (cr);
@@ -356,7 +356,7 @@
else
{
MurrineRGB shadow;
- murrine_shade (border, &shadow, 0.925);
+ murrine_shade (border, 0.925, &shadow);
cairo_move_to (cr, 2, height-3);
cairo_line_to (cr, 2, 2);
@@ -379,7 +379,7 @@
int x, int y, int width, int height)
{
MurrineRGB shadow;
- murrine_shade (&colors->bg[0], &shadow, 0.8);
+ murrine_shade (&colors->bg[0], 0.8, &shadow);
cairo_pattern_t *pattern;
@@ -489,7 +489,7 @@
boolean horizontal)
{
MurrineRGB handle;
- murrine_shade (&colors->shade[6], &handle, 0.95);
+ murrine_shade (&colors->shade[6], 0.95, &handle);
murrine_mix_color (&handle, &colors->bg[widget->state_type], 0.4, &handle);
@@ -558,7 +558,7 @@
const MurrineRGB *border = &colors->spot[2];
MurrineRGB highlight;
- murrine_shade (fill, &highlight, widget->highlight_ratio);
+ murrine_shade (fill, widget->highlight_ratio, &highlight);
cairo_rectangle (cr, x, y, width, height);
@@ -618,12 +618,12 @@
{
murrine_draw_curved_highlight_bottom (cr, 1, width, height+1);
MurrineRGB shadow;
- murrine_shade (fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_gradient (cr, &shadow, widget->mrn_gradient, 1.5, 0.5, 0, height-1, widget->mrn_gradient.gradients, TRUE);
cairo_fill (cr);
}
- murrine_shade (fill, &highlight, widget->highlight_ratio*widget->innerborder_ratio);
+ murrine_shade (fill, widget->highlight_ratio*widget->innerborder_ratio, &highlight);
murrine_draw_innerborder (cr, &highlight, fill, widget->mrn_gradient,
2.5, 1.5,
width-5, height-3,
@@ -694,7 +694,7 @@
{
MurrineRGB highlight;
murrine_set_gradient (cr, fill, widget->mrn_gradient, 0, 0, 0, height, widget->mrn_gradient.gradients, FALSE);
- murrine_shade (fill, &highlight, widget->highlight_ratio);
+ murrine_shade (fill, widget->highlight_ratio, &highlight);
/* The glass effect */
if (widget->glazestyle > 0)
{
@@ -717,7 +717,7 @@
{
murrine_draw_curved_highlight_bottom (cr, 0, width, height);
MurrineRGB shadow;
- murrine_shade (fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_color_rgb (cr, &shadow);
cairo_fill (cr);
}
@@ -735,7 +735,7 @@
{
cairo_pattern_t *pattern;
MurrineRGB lower;
- murrine_shade (fill, &lower, 0.95);
+ murrine_shade (fill, 0.95, &lower);
pattern = cairo_pattern_create_linear (0, 0, 0, height);
if (!widget->mrn_gradient.use_rgba)
{
@@ -755,8 +755,8 @@
{
cairo_pattern_t *pattern;
MurrineRGB low, top;
- murrine_shade (fill, &top, 0.9);
- murrine_shade (fill, &low, 1.1);
+ murrine_shade (fill, 0.9, &top);
+ murrine_shade (fill, 1.1, &low);
pattern = cairo_pattern_create_linear (0, 0, 0, height);
cairo_pattern_add_color_stop_rgb (pattern, 0.0, top.r, top.g, top.b);
cairo_pattern_add_color_stop_rgb (pattern, 1.0, low.r, low.g, low.b);
@@ -765,7 +765,7 @@
cairo_pattern_destroy (pattern);
int counter = -height;
cairo_set_line_width (cr, 1.0);
- murrine_shade (&low, &low, 0.9);
+ murrine_shade (&low, 0.9, &low);
murrine_set_color_rgb (cr, &low);
while (counter < width)
{
@@ -846,8 +846,8 @@
const MurrineRGB *dark = &colors->shade[3];
MurrineRGB highlight, shadow_color;
- murrine_shade (&colors->bg[0], &highlight, 1.04);
- murrine_shade (&colors->bg[0], &shadow_color, 0.96);
+ murrine_shade (&colors->bg[0], 1.04, &highlight);
+ murrine_shade (&colors->bg[0], 0.96, &shadow_color);
if (frame->shadow == MRN_SHADOW_NONE)
return;
@@ -1036,25 +1036,25 @@
{
if (mrn_gradient_custom.has_gradient_stop)
{
- murrine_shade (fill, &shade1, mrn_gradient_custom.gradient_stop_1*custom_highlight_ratio);
- murrine_shade (fill, &shade2, mrn_gradient_custom.gradient_stop_2*custom_highlight_ratio);
- murrine_shade (fill, &shade3, mrn_gradient_custom.gradient_stop_3);
- murrine_shade (fill, &shade4, mrn_gradient_custom.gradient_stop_4);
+ 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, &shade1, 1.1*custom_highlight_ratio);
- murrine_shade (fill, &shade2, 1.0*custom_highlight_ratio);
- murrine_shade (fill, &shade3, 1.0);
- murrine_shade (fill, &shade4, 1.1);;
+ 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, &shade1, 1.0*custom_highlight_ratio);
- murrine_shade (fill, &shade2, 1.0*custom_highlight_ratio);
- murrine_shade (fill, &shade3, 1.0);
- murrine_shade (fill, &shade4, 1.0);
+ 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);
}
switch (tab->gap_side)
@@ -1172,7 +1172,7 @@
{
const MurrineRGB *dark = &colors->shade[3];
MurrineRGB highlight;
- murrine_shade (dark, &highlight, 1.3);
+ murrine_shade (dark, 1.3, &highlight);
if (separator->horizontal)
{
@@ -1237,7 +1237,7 @@
const MurrineRGB *fill = &colors->bg[widget->state_type];
const MurrineRGB *border = &colors->shade[3];
MurrineRGB highlight;
- murrine_shade (border, &highlight, 1.3);
+ murrine_shade (border, 1.3, &highlight);
cairo_translate (cr, x, y);
cairo_set_line_width (cr, 1.0);
@@ -1258,7 +1258,7 @@
if (header->style > 0)
{
MurrineRGB highlight_header;
- murrine_shade (fill, &highlight_header, widget->highlight_ratio);
+ murrine_shade (fill, widget->highlight_ratio, &highlight_header);
/* Glassy header */
if (header->style == 1)
{
@@ -1286,7 +1286,7 @@
{
murrine_draw_curved_highlight_bottom (cr, 0, width, height);
MurrineRGB shadow;
- murrine_shade (fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_gradient (cr, &shadow, widget->mrn_gradient, 0, 0, 0, height, widget->mrn_gradient.gradients, TRUE);
cairo_fill (cr);
}
@@ -1305,7 +1305,7 @@
{
border = (MurrineRGB*)&colors->shade[4];
MurrineRGB shadow_header;
- murrine_shade (fill, &shadow_header, 0.925);
+ murrine_shade (fill, 0.925, &shadow_header);
if (!widget->mrn_gradient.gradients)
{
@@ -1366,7 +1366,7 @@
const MurrineRGB *dark = &colors->shade[3];
const MurrineRGB *fill = &colors->bg[0];
MurrineRGB top;
- murrine_shade (dark, &top, 1.3);
+ murrine_shade (dark, 1.3, &top);
cairo_set_line_width (cr, 1.0);
cairo_translate (cr, x, y);
@@ -1381,7 +1381,7 @@
{
MurrineRGB highlight;
murrine_set_gradient (cr, fill, widget->mrn_gradient, 0, 0, 0, height, widget->mrn_gradient.gradients, FALSE);
- murrine_shade (fill, &highlight, widget->highlight_ratio);
+ murrine_shade (fill, widget->highlight_ratio, &highlight);
/* Glass effect */
if (widget->glazestyle > 0)
{
@@ -1404,7 +1404,7 @@
{
murrine_draw_curved_highlight_bottom (cr, 0, width, height);
MurrineRGB shadow;
- murrine_shade (fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_color_rgb (cr, &shadow);
cairo_fill (cr);
}
@@ -1413,7 +1413,7 @@
{
cairo_pattern_t *pattern;
MurrineRGB lower;
- murrine_shade (fill, &lower, 0.95);
+ murrine_shade (fill, 0.95, &lower);
pattern = cairo_pattern_create_linear (0, 0, 0, height);
cairo_pattern_add_color_stop_rgb (pattern, 0.0, fill->r, fill->g, fill->b);
cairo_pattern_add_color_stop_rgb (pattern, 1.0, lower.r, lower.g, lower.b);
@@ -1453,7 +1453,7 @@
const MurrineRGB *fill = &colors->spot[1];
const MurrineRGB *border = &colors->spot[2];
MurrineRGB highlight;
- murrine_shade (fill, &highlight, widget->highlight_ratio);
+ murrine_shade (fill, widget->highlight_ratio, &highlight);
cairo_translate (cr, x, y);
cairo_set_line_width (cr, 1.0);
@@ -1513,7 +1513,7 @@
{
murrine_draw_curved_highlight_bottom (cr, 0, width, height);
MurrineRGB shadow;
- murrine_shade (&colors->spot[1], &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (&colors->spot[1], 1.0/widget->highlight_ratio, &shadow);
murrine_set_gradient (cr, &shadow, widget->mrn_gradient, 0, 0, 0, height, widget->mrn_gradient.gradients, TRUE);
cairo_fill (cr);
}
@@ -1585,8 +1585,8 @@
MurrineRGB border_normal;
MurrineRGB highlight;
- murrine_shade (&colors->shade[6], &border_normal, 0.95);
- murrine_shade (fill, &highlight, widget->highlight_ratio);
+ murrine_shade (&colors->shade[6], 0.95, &border_normal);
+ murrine_shade (fill, widget->highlight_ratio, &highlight);
if (!scrollbar->horizontal)
murrine_exchange_axis (cr, &x, &y, &width, &height);
@@ -1632,7 +1632,7 @@
{
murrine_draw_curved_highlight_bottom (cr, curve_pos, width, height);
MurrineRGB shadow;
- murrine_shade (fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_gradient (cr, &shadow, widget->mrn_gradient, 1, 1, 0, height-2, widget->mrn_gradient.gradients, TRUE);
cairo_fill (cr);
}
@@ -1640,7 +1640,7 @@
/* Draw the white inner border */
if (widget->glazestyle != 4)
{
- murrine_shade (fill, &highlight, widget->innerborder_ratio*widget->highlight_ratio);
+ murrine_shade (fill, widget->innerborder_ratio*widget->highlight_ratio, &highlight);
murrine_draw_innerborder (cr, &highlight, fill, widget->mrn_gradient,
1.5, 1.5,
width-3, height-3,
@@ -1696,13 +1696,13 @@
fill = colors->bg[0];
MurrineRGB border;
- murrine_shade (&colors->shade[6], &border, 0.95);
+ murrine_shade (&colors->shade[6], 0.95, &border);
MurrineRGB highlight;
if (widget->prelight)
- murrine_shade (&fill, &fill, 1.06);
+ murrine_shade (&fill, 1.06, &fill);
- murrine_shade (&fill, &highlight, widget->highlight_ratio);
+ murrine_shade (&fill, widget->highlight_ratio, &highlight);
/* Draw the border */
murrine_mix_color (&border, &fill, 0.4, &border);
@@ -1748,14 +1748,14 @@
{
murrine_draw_curved_highlight_bottom (cr, 1, width, height);
MurrineRGB shadow;
- murrine_shade (&fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (&fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_color_rgb (cr, &shadow);
cairo_fill (cr);
}
if (widget->glazestyle != 4)
{
- murrine_shade (&fill, &highlight, widget->innerborder_ratio*widget->highlight_ratio);
+ murrine_shade (&fill, widget->innerborder_ratio*widget->highlight_ratio, &highlight);
murrine_draw_innerborder (cr, &highlight, &fill, widget->mrn_gradient,
1.5, 1.5,
width-3, height-3,
@@ -1766,7 +1766,7 @@
/* Draw the options */
MurrineRGB style;
if (scrollbar->style > 0)
- murrine_shade (&fill, &style, 0.55);
+ murrine_shade (&fill, 0.55, &style);
/* Draw the circles */
if (scrollbar->style == 1)
@@ -1868,7 +1868,7 @@
cairo_fill (cr);
MurrineRGB border;
- murrine_shade (&fill, &border, (!widget->mrn_gradient.gradients ? 0.9 : 0.95));
+ murrine_shade (&fill, (!widget->mrn_gradient.gradients ? 0.9 : 0.95), &border);
cairo_move_to (cr, 0, 0.5);
cairo_rel_line_to (cr, width, 0);
@@ -1889,7 +1889,7 @@
{
const MurrineRGB *dark = &colors->shade[3];
MurrineRGB highlight;
- murrine_shade (dark, &highlight, 1.3);
+ murrine_shade (dark, 1.3, &highlight);
cairo_set_line_width (cr, 1);
cairo_translate (cr, x, y+0.5);
@@ -1924,7 +1924,7 @@
{
MurrineRGB *fill = (MurrineRGB*)&colors->spot[1];
MurrineRGB border2;
- murrine_shade (fill, &border2, 0.5);
+ murrine_shade (fill, 0.5, &border2);
cairo_rectangle (cr, 0.5, 0.5, 3, height-1);
murrine_set_color_rgb (cr, &border2);
@@ -1950,8 +1950,8 @@
mrn_gradient_custom.gradient_stop_3 = get_decreased_ratio (widget->mrn_gradient.gradient_stop_3, 2.0);
mrn_gradient_custom.gradient_stop_4 = get_decreased_ratio (widget->mrn_gradient.gradient_stop_4, 2.0);
- murrine_shade (&colors->bg[widget->state_type], &border, 0.6);
- murrine_shade (&colors->bg[widget->state_type], &highlight, 1.0);
+ murrine_shade (&colors->bg[widget->state_type], 0.6, &border);
+ murrine_shade (&colors->bg[widget->state_type], 1.0, &highlight);
cairo_save (cr);
@@ -2150,7 +2150,7 @@
dot = &colors->text[widget->state_type];
}
MurrineRGB shadow;
- murrine_shade (border, &shadow, 0.9);
+ murrine_shade (border, 0.9, &shadow);
cairo_translate (cr, x, y);
@@ -2171,7 +2171,7 @@
if (widget->glazestyle != 2)
{
MurrineRGB highlight;
- murrine_shade (bg, &highlight, widget->highlight_ratio);
+ murrine_shade (bg, widget->highlight_ratio, &highlight);
murrine_set_gradient (cr, &highlight, widget->mrn_gradient, 0, 0, 0, 14, widget->mrn_gradient.gradients, FALSE);
}
else
@@ -2195,7 +2195,7 @@
if (widget->glazestyle == 2)
{
MurrineRGB highlight;
- murrine_shade (bg, &highlight, widget->highlight_ratio);
+ murrine_shade (bg, widget->highlight_ratio, &highlight);
murrine_set_gradient (cr, &highlight, widget->mrn_gradient, 0, 0, 0, 14, widget->mrn_gradient.gradients, FALSE);
}
else
@@ -2241,7 +2241,7 @@
dot = &colors->text[widget->state_type];
}
MurrineRGB shadow;
- murrine_shade (border, &shadow, 0.9);
+ murrine_shade (border, 0.9, &shadow);
cairo_translate (cr, x, y);
cairo_set_line_width (cr, 1.0);
@@ -2270,7 +2270,7 @@
if (widget->glazestyle == 2)
{
MurrineRGB highlight;
- murrine_shade (bg, &highlight, widget->highlight_ratio);
+ murrine_shade (bg, widget->highlight_ratio, &highlight);
murrine_set_gradient (cr, &highlight, widget->mrn_gradient, 0, 0, 0, 14, widget->mrn_gradient.gradients, FALSE);
}
else
@@ -2288,7 +2288,7 @@
bg = &colors->spot[1];
MurrineRGB highlight;
- murrine_shade (bg, &highlight, widget->highlight_ratio);
+ murrine_shade (bg, widget->highlight_ratio, &highlight);
if (widget->xthickness > 2 && widget->ythickness > 2)
cairo_rectangle (cr, 2, 2, width-4, (height-4)/2);
else
@@ -2297,7 +2297,7 @@
if (widget->glazestyle != 2)
{
MurrineRGB highlight;
- murrine_shade (bg, &highlight, widget->highlight_ratio);
+ murrine_shade (bg, widget->highlight_ratio, &highlight);
murrine_set_gradient (cr, &highlight, widget->mrn_gradient, 0, 0, 0, 14, widget->mrn_gradient.gradients, FALSE);
}
else
@@ -2342,7 +2342,7 @@
{
const MurrineRGB *dark = &colors->shade[3];
MurrineRGB highlight;
- murrine_shade (dark, &highlight, 1.3);
+ murrine_shade (dark, 1.3, &highlight);
int lx, ly;
cairo_set_line_width (cr, 1.0);
Modified: trunk/src/murrine_draw_rgba.c
==============================================================================
--- trunk/src/murrine_draw_rgba.c (original)
+++ trunk/src/murrine_draw_rgba.c Wed Feb 13 17:15:16 2008
@@ -37,8 +37,8 @@
{
MurrineRGB highlight, shadow;
- murrine_shade (bg_color, &highlight, 1.15);
- murrine_shade (bg_color, &shadow, 0.4);
+ murrine_shade (bg_color, 1.15, &highlight);
+ murrine_shade (bg_color, 0.4, &shadow);
/* highlight */
cairo_move_to (cr, x + w + (radius * -0.2928932188), y - (radius * -0.2928932188)); /* 0.2928932... 1-sqrt(2)/2 gives middle of curve */
@@ -95,8 +95,8 @@
double x = 1.0;
double y = 1.0;
- murrine_shade (&colors->bg[0], &highlight, 1.15);
- murrine_shade (&colors->bg[0], &shadow, 0.4);
+ murrine_shade (&colors->bg[0], 1.15, &highlight);
+ murrine_shade (&colors->bg[0], 0.4, &shadow);
width -= 3;
height -= 3;
@@ -170,8 +170,8 @@
if (!horizontal)
murrine_exchange_axis (cr, &x, &y, &width, &height);
- murrine_shade (&colors->shade[8], &border_normal, 0.95);
- murrine_shade (&fill, &highlight, custom_highlight_ratio);
+ murrine_shade (&colors->shade[8], 0.95, &border_normal);
+ murrine_shade (&fill, custom_highlight_ratio, &highlight);
cairo_translate (cr, x, y);
cairo_set_line_width (cr, 1.0);
@@ -200,7 +200,7 @@
murrine_rounded_rectangle (cr, xoffset, yoffset, width-(xoffset*2), height-(yoffset*2), widget->roundness, widget->corners);
murrine_set_color_rgba (cr, &colors->spot[1], 0.6);
cairo_stroke (cr);
- murrine_shade (&border_normal, &border_normal, 0.8);
+ murrine_shade (&border_normal, 0.8, &border_normal);
}
/* Draw the bg */
@@ -243,7 +243,7 @@
{
murrine_draw_curved_highlight_bottom (cr, curve_pos, width, height);
MurrineRGB shadow;
- murrine_shade (&fill, &shadow, 1.0/custom_highlight_ratio);
+ murrine_shade (&fill, 1.0/custom_highlight_ratio, &shadow);
murrine_set_gradient (cr, &shadow, mrn_gradient_custom, xoffset+1, yoffset+1, 0, height-(yoffset*2)-2, widget->mrn_gradient.gradients, TRUE);
cairo_fill (cr);
}
@@ -253,7 +253,7 @@
/* Draw the white inner border */
if (widget->glazestyle != 4 && !widget->active)
{
- murrine_shade (&fill, &highlight, widget->innerborder_ratio*custom_highlight_ratio);
+ murrine_shade (&fill, widget->innerborder_ratio*custom_highlight_ratio, &highlight);
if (horizontal)
{
murrine_draw_innerborder (cr, &highlight, &fill, mrn_gradient_custom,
@@ -282,7 +282,7 @@
cairo_pattern_t *pattern;
MurrineRGB shadow;
- murrine_shade (&fill, &shadow, 0.94);
+ murrine_shade (&fill, 0.94, &shadow);
cairo_save (cr);
@@ -337,7 +337,7 @@
if (widget->ythickness > 1)
yoffset = 1;
- murrine_shade (&border, &border, 0.92);
+ murrine_shade (&border, 0.92, &border);
cairo_translate (cr, x+0.5, y+0.5);
cairo_set_line_width (cr, 1.0);
@@ -373,7 +373,7 @@
else
{
MurrineRGB highlight;
- murrine_shade (base, &highlight, 1.15);
+ murrine_shade (base, 1.15, &highlight);
cairo_move_to (cr, 2, height-3);
cairo_line_to (cr, 2, 2);
@@ -522,7 +522,7 @@
const MurrineRGB *border = &colors->spot[2];
MurrineRGB highlight;
- murrine_shade (fill, &highlight, widget->highlight_ratio);
+ murrine_shade (fill, widget->highlight_ratio, &highlight);
cairo_rectangle (cr, x, y, width, height);
@@ -585,14 +585,14 @@
{
murrine_draw_curved_highlight_bottom (cr, 1, width, height+1);
MurrineRGB shadow;
- murrine_shade (fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_gradient (cr, &shadow, widget->mrn_gradient, 1.5, 0.5, 0, height-1, widget->mrn_gradient.gradients, TRUE);
cairo_fill (cr);
}
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
- murrine_shade (fill, &highlight, widget->highlight_ratio*widget->innerborder_ratio);
+ murrine_shade (fill, widget->highlight_ratio*widget->innerborder_ratio, &highlight);
murrine_draw_innerborder (cr, &highlight, fill, widget->mrn_gradient,
2.5, 1.5,
width-5, height-3,
@@ -641,7 +641,7 @@
/* XXX: should use another gradient rgba_opacity */
MurrineRGB highlight;
murrine_set_gradient (cr, fill, widget->mrn_gradient, 0, 0, 0, height, widget->mrn_gradient.gradients, FALSE);
- murrine_shade (fill, &highlight, widget->highlight_ratio);
+ murrine_shade (fill, widget->highlight_ratio, &highlight);
if (widget->glazestyle > 0)
{
@@ -664,7 +664,7 @@
{
murrine_draw_curved_highlight_bottom (cr, 0, width, height);
MurrineRGB shadow;
- murrine_shade (fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_color_rgb (cr, &shadow);
cairo_fill (cr);
}
@@ -684,7 +684,7 @@
{
cairo_pattern_t *pattern;
MurrineRGB lower;
- murrine_shade (fill, &lower, 0.95);
+ murrine_shade (fill, 0.95, &lower);
pattern = cairo_pattern_create_linear (0, 0, 0, height);
cairo_pattern_add_color_stop_rgba (pattern, 0.0, fill->r, fill->g, fill->b, MENUBAR_OPACITY);
cairo_pattern_add_color_stop_rgba (pattern, 1.0, lower.r, lower.g, lower.b, MENUBAR_OPACITY);
@@ -698,8 +698,8 @@
{
cairo_pattern_t *pattern;
MurrineRGB low, top;
- murrine_shade (fill, &top, 0.9);
- murrine_shade (fill, &low, 1.1);
+ murrine_shade (fill, 0.9, &top);
+ murrine_shade (fill, 1.1, &low);
pattern = cairo_pattern_create_linear (0, 0, 0, height);
cairo_pattern_add_color_stop_rgba (pattern, 0.0, top.r, top.g, top.b, MENUBAR_STRIPED_OPACITY);
cairo_pattern_add_color_stop_rgba (pattern, 1.0, low.r, low.g, low.b, MENUBAR_STRIPED_OPACITY);
@@ -711,7 +711,7 @@
cairo_pattern_destroy (pattern);
int counter = -height;
cairo_set_line_width (cr, 1.0);
- murrine_shade (&low, &low, 0.9);
+ murrine_shade (&low, 0.9, &low);
murrine_set_color_rgba (cr, &low, MENUBAR_STRIPED_OPACITY);
while (counter < width)
{
@@ -773,7 +773,7 @@
/* XXX: should use another gradient rgba_opacity */
MurrineRGB highlight;
murrine_set_gradient (cr, fill, widget->mrn_gradient, 0, 0, 0, height, widget->mrn_gradient.gradients, FALSE);
- murrine_shade (fill, &highlight, widget->highlight_ratio);
+ murrine_shade (fill, widget->highlight_ratio, &highlight);
/* Glass effect */
if (widget->glazestyle > 0)
@@ -797,7 +797,7 @@
{
murrine_draw_curved_highlight_bottom (cr, 0, width, height);
MurrineRGB shadow;
- murrine_shade (fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_color_rgb (cr, &shadow);
cairo_fill (cr);
}
@@ -808,7 +808,7 @@
{
cairo_pattern_t *pattern;
MurrineRGB lower;
- murrine_shade (fill, &lower, 0.95);
+ murrine_shade (fill, 0.95, &lower);
pattern = cairo_pattern_create_linear (0, 0, 0, height);
cairo_pattern_add_color_stop_rgba (pattern, 0.0, fill->r, fill->g, fill->b, TOOLBAR_OPACITY);
cairo_pattern_add_color_stop_rgba (pattern, 1.0, lower.r, lower.g, lower.b, TOOLBAR_OPACITY);
@@ -894,8 +894,8 @@
MurrineRGB highlight, shadow_color;
- murrine_shade (&colors->bg[0], &highlight, 1.15);
- murrine_shade (&colors->bg[0], &shadow_color, 0.4);
+ murrine_shade (&colors->bg[0], 1.15, &highlight);
+ murrine_shade (&colors->bg[0], 0.4, &shadow_color);
if (frame->shadow == MRN_SHADOW_NONE)
return;
@@ -1138,25 +1138,25 @@
{
if (mrn_gradient_custom.has_gradient_stop)
{
- murrine_shade (fill, &shade1, mrn_gradient_custom.gradient_stop_1*custom_highlight_ratio);
- murrine_shade (fill, &shade2, mrn_gradient_custom.gradient_stop_2*custom_highlight_ratio);
- murrine_shade (fill, &shade3, mrn_gradient_custom.gradient_stop_3);
- murrine_shade (fill, &shade4, mrn_gradient_custom.gradient_stop_4);
+ 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, &shade1, 1.1*custom_highlight_ratio);
- murrine_shade (fill, &shade2, 1.0*custom_highlight_ratio);
- murrine_shade (fill, &shade3, 1.0);
- murrine_shade (fill, &shade4, 1.1);;
+ 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, &shade1, 1.0*custom_highlight_ratio);
- murrine_shade (fill, &shade2, 1.0*custom_highlight_ratio);
- murrine_shade (fill, &shade3, 1.0);
- murrine_shade (fill, &shade4, 1.0);
+ 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);
}
switch (tab->gap_side)
@@ -1311,8 +1311,8 @@
MurrineRGB border_normal;
MurrineRGB highlight;
- murrine_shade (&colors->shade[7], &border_normal, 0.95);
- murrine_shade (fill, &highlight, widget->highlight_ratio);
+ murrine_shade (&colors->shade[7], 0.95, &border_normal);
+ murrine_shade (fill, widget->highlight_ratio, &highlight);
if (!scrollbar->horizontal)
murrine_exchange_axis (cr, &x, &y, &width, &height);
@@ -1360,7 +1360,7 @@
{
murrine_draw_curved_highlight_bottom (cr, curve_pos, width, height);
MurrineRGB shadow;
- murrine_shade (fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_gradient (cr, &shadow, widget->mrn_gradient, 1, 1, 0, height-2, widget->mrn_gradient.gradients, TRUE);
cairo_fill (cr);
}
@@ -1370,7 +1370,7 @@
/* Draw the white inner border */
if (widget->glazestyle != 4)
{
- murrine_shade (fill, &highlight, widget->innerborder_ratio*widget->highlight_ratio);
+ murrine_shade (fill, widget->innerborder_ratio*widget->highlight_ratio, &highlight);
murrine_draw_innerborder (cr, &highlight, fill, widget->mrn_gradient,
1.5, 1.5,
width-3, height-3,
@@ -1426,13 +1426,13 @@
fill = colors->bg[0];
MurrineRGB border;
- murrine_shade (&colors->shade[7], &border, 0.95);
+ murrine_shade (&colors->shade[7], 0.95, &border);
MurrineRGB highlight;
if (widget->prelight)
- murrine_shade (&fill, &fill, 1.06);
+ murrine_shade (&fill, 1.06, &fill);
- murrine_shade (&fill, &highlight, widget->highlight_ratio);
+ murrine_shade (&fill, widget->highlight_ratio, &highlight);
/* Draw the border */
murrine_mix_color (&border, &fill, 0.5, &border);
@@ -1479,7 +1479,7 @@
{
murrine_draw_curved_highlight_bottom (cr, 1, width, height);
MurrineRGB shadow;
- murrine_shade (&fill, &shadow, 1.0/widget->highlight_ratio);
+ murrine_shade (&fill, 1.0/widget->highlight_ratio, &shadow);
murrine_set_color_rgb (cr, &shadow);
cairo_fill (cr);
}
@@ -1488,7 +1488,7 @@
if (widget->glazestyle != 4)
{
- murrine_shade (&fill, &highlight, widget->innerborder_ratio*widget->highlight_ratio);
+ murrine_shade (&fill, widget->innerborder_ratio*widget->highlight_ratio, &highlight);
murrine_draw_innerborder (cr, &highlight, &fill, widget->mrn_gradient,
1.5, 1.5,
width-3, height-3,
@@ -1499,7 +1499,7 @@
/* Draw the options */
MurrineRGB style;
if (scrollbar->style > 0)
- murrine_shade (&fill, &style, 0.55);
+ murrine_shade (&fill, 0.55, &style);
/* Draw the circles */
if (scrollbar->style == 1)
@@ -1592,8 +1592,8 @@
mrn_gradient_custom.gradient_stop_3 = get_decreased_ratio (widget->mrn_gradient.gradient_stop_3, 2.0);
mrn_gradient_custom.gradient_stop_4 = get_decreased_ratio (widget->mrn_gradient.gradient_stop_4, 2.0);
- murrine_shade (&colors->bg[widget->state_type], &border, 0.6);
- murrine_shade (&colors->bg[widget->state_type], &highlight, 1.0);
+ murrine_shade (&colors->bg[widget->state_type], 0.6, &border);
+ murrine_shade (&colors->bg[widget->state_type], 1.0, &highlight);
cairo_save (cr);
@@ -1708,7 +1708,7 @@
if (widget->glazestyle != 2)
{
MurrineRGB highlight;
- murrine_shade (bg, &highlight, widget->highlight_ratio);
+ murrine_shade (bg, widget->highlight_ratio, &highlight);
murrine_set_gradient (cr, &highlight, widget->mrn_gradient, 0, 0, 0, 14, widget->mrn_gradient.gradients, FALSE);
}
else
@@ -1732,7 +1732,7 @@
if (widget->glazestyle == 2)
{
MurrineRGB highlight;
- murrine_shade (bg, &highlight, widget->highlight_ratio);
+ murrine_shade (bg, widget->highlight_ratio, &highlight);
murrine_set_gradient (cr, &highlight, widget->mrn_gradient, 0, 0, 0, 14, widget->mrn_gradient.gradients, FALSE);
}
else
@@ -1807,7 +1807,7 @@
if (widget->glazestyle == 2)
{
MurrineRGB highlight;
- murrine_shade (bg, &highlight, widget->highlight_ratio);
+ murrine_shade (bg, widget->highlight_ratio, &highlight);
murrine_set_gradient (cr, &highlight, widget->mrn_gradient, 0, 0, 0, 14, widget->mrn_gradient.gradients, FALSE);
}
else
@@ -1825,7 +1825,7 @@
bg = &colors->spot[1];
MurrineRGB highlight;
- murrine_shade (bg, &highlight, widget->highlight_ratio);
+ murrine_shade (bg, widget->highlight_ratio, &highlight);
if (widget->xthickness > 2 && widget->ythickness > 2)
cairo_rectangle (cr, 2, 2, width-4, (height-4)/2);
else
@@ -1834,7 +1834,7 @@
if (widget->glazestyle != 2)
{
MurrineRGB highlight;
- murrine_shade (bg, &highlight, widget->highlight_ratio);
+ murrine_shade (bg, widget->highlight_ratio, &highlight);
murrine_set_gradient (cr, &highlight, widget->mrn_gradient, 0, 0, 0, 14, widget->mrn_gradient.gradients, FALSE);
}
else
@@ -1900,7 +1900,7 @@
{
MurrineRGB *fill = (MurrineRGB*)&colors->spot[1];
MurrineRGB border2;
- murrine_shade (fill, &border2, 0.5);
+ murrine_shade (fill, 0.5, &border2);
cairo_rectangle (cr, 0.5, 0.5, 3, height-1);
murrine_set_color_rgb (cr, &border2);
Modified: trunk/src/murrine_style.c
==============================================================================
--- trunk/src/murrine_style.c (original)
+++ trunk/src/murrine_style.c Wed Feb 13 17:15:16 2008
@@ -1545,9 +1545,9 @@
MurrineRGB temp;
if (GTK_WIDGET_NO_WINDOW (widget))
- murrine_shade (¶ms.parentbg, &temp, 1.2);
+ murrine_shade (¶ms.parentbg, 1.2, &temp);
else
- murrine_shade (&colors->bg[widget->state], &temp, 1.2);
+ murrine_shade (&colors->bg[widget->state], 1.2, &temp);
etched.red = (int) (temp.r * 65535);
etched.green = (int) (temp.g * 65535);
@@ -1685,17 +1685,17 @@
/* Lighter to darker */
for (i = 0; i < 9; i++)
{
- murrine_shade (&bg_normal, &murrine_style->colors.shade[i],
- (shades[i]-0.9) * contrast + 0.9);
+ murrine_shade (&bg_normal, (shades[i]-0.9) * contrast + 0.9,
+ &murrine_style->colors.shade[i]);
}
spot_color.r = style->bg[GTK_STATE_SELECTED].red / 65535.0;
spot_color.g = style->bg[GTK_STATE_SELECTED].green / 65535.0;
spot_color.b = style->bg[GTK_STATE_SELECTED].blue / 65535.0;
- murrine_shade (&spot_color, &murrine_style->colors.spot[0], 1.42);
- murrine_shade (&spot_color, &murrine_style->colors.spot[1], 1.00);
- murrine_shade (&spot_color, &murrine_style->colors.spot[2], 0.65);
+ murrine_shade (&spot_color, 1.42, &murrine_style->colors.spot[0]);
+ murrine_shade (&spot_color, 1.00, &murrine_style->colors.spot[1]);
+ murrine_shade (&spot_color, 0.65, &murrine_style->colors.spot[2]);
for (i=0; i<5; i++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]