murrine r117 - in trunk: . src
- From: acimitan svn gnome org
- To: svn-commits-list gnome org
- Subject: murrine r117 - in trunk: . src
- Date: Fri, 2 Jan 2009 22:41:42 +0000 (UTC)
Author: acimitan
Date: Fri Jan 2 22:41:42 2009
New Revision: 117
URL: http://svn.gnome.org/viewvc/murrine?rev=117&view=rev
Log:
2009-01-02 Andrea Cimitan <andrea cimitan gmail com>
* src/murrine_draw.c (murrine_draw_progressbar_trough),
(murrine_draw_progressbar_fill):
* src/murrine_draw_rgba.c (murrine_rgba_draw_progressbar_trough),
(murrine_rgba_draw_progressbar_fill):
Should fix roundness bugs on very small progressbar.
Modified:
trunk/ChangeLog
trunk/src/murrine_draw.c
trunk/src/murrine_draw_rgba.c
Modified: trunk/src/murrine_draw.c
==============================================================================
--- trunk/src/murrine_draw.c (original)
+++ trunk/src/murrine_draw.c Fri Jan 2 22:41:42 2009
@@ -459,16 +459,17 @@
{
const MurrineRGB *border = &colors->shade[4];
MurrineRGB fill;
+ int roundness = MIN (widget->roundness, MIN ((height-2.0)/2.0, (width-2.0)/2.0));
murrine_shade (&widget->parentbg, 0.95, &fill);
/* Create trough box */
- murrine_rounded_rectangle_closed (cr, x+1, y+1, width-2, height-2, widget->roundness, widget->corners);
+ murrine_rounded_rectangle_closed (cr, x+1, y+1, width-2, height-2, roundness, widget->corners);
murrine_set_color_rgba (cr, &fill, 0.44);
cairo_fill (cr);
/* Draw border */
- murrine_rounded_rectangle (cr, x+0.5, y+0.5, width-1, height-1, widget->roundness, widget->corners);
+ murrine_rounded_rectangle (cr, x+0.5, y+0.5, width-1, height-1, roundness, widget->corners);
murrine_set_color_rgba (cr, border, 0.74);
cairo_stroke (cr);
@@ -480,7 +481,7 @@
murrine_shade (border, 0.94, &shadow);
/* clip the corners of the shadows */
- murrine_rounded_rectangle_closed (cr, x+1, y+1, width-2, height-2, widget->roundness, widget->corners);
+ murrine_rounded_rectangle_closed (cr, x+1, y+1, width-2, height-2, roundness, widget->corners);
cairo_clip (cr);
/* Top shadow */
@@ -538,7 +539,7 @@
rotate_mirror_translate (cr, M_PI/2, x, y+width, TRUE, FALSE);
}
- roundness = MIN (widget->roundness, height / 2.0);
+ roundness = MIN (widget->roundness, (height-2.0)/2.0);
stroke_width = height*2;
x_step = (((float)stroke_width/10)*offset);
Modified: trunk/src/murrine_draw_rgba.c
==============================================================================
--- trunk/src/murrine_draw_rgba.c (original)
+++ trunk/src/murrine_draw_rgba.c Fri Jan 2 22:41:42 2009
@@ -413,16 +413,17 @@
{
const MurrineRGB *border = &colors->shade[4];
MurrineRGB fill;
+ int roundness = MIN (widget->roundness, MIN ((height-2.0)/2.0, (width-2.0)/2.0));
murrine_shade (&widget->parentbg, 0.95, &fill);
/* Create trough box */
- murrine_rounded_rectangle_closed (cr, x+1, y+1, width-2, height-2, widget->roundness, widget->corners);
+ murrine_rounded_rectangle_closed (cr, x+1, y+1, width-2, height-2, roundness, widget->corners);
murrine_set_color_rgba (cr, &fill, 0.8);
cairo_fill (cr);
/* Draw border */
- murrine_rounded_rectangle (cr, x+0.5, y+0.5, width-1, height-1, widget->roundness, widget->corners);
+ murrine_rounded_rectangle (cr, x+0.5, y+0.5, width-1, height-1, roundness, widget->corners);
murrine_set_color_rgba (cr, border, 0.8);
cairo_stroke (cr);
@@ -434,7 +435,7 @@
murrine_shade (border, 0.94, &shadow);
/* clip the corners of the shadows */
- murrine_rounded_rectangle_closed (cr, x+1, y+1, width-2, height-2, widget->roundness, widget->corners);
+ murrine_rounded_rectangle_closed (cr, x+1, y+1, width-2, height-2, roundness, widget->corners);
cairo_clip (cr);
/* Top shadow */
@@ -492,7 +493,7 @@
rotate_mirror_translate (cr, M_PI/2, x, y+width, TRUE, FALSE);
}
- roundness = MIN (widget->roundness, height / 2.0);
+ roundness = MIN (widget->roundness, (height-2.0)/2.0);
stroke_width = height*2;
x_step = (((float)stroke_width/10)*offset);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]