Only call configure in surface subdirectories if the required deps are available
[ardour.git] / libs / clearlooks-newer / clearlooks_draw_glossy.c
index 8a5921efc2139f89a3e127122cd8abc8bd03359f..62f17f3f950e97e23e8033403070f524e12e8d29 100644 (file)
@@ -33,6 +33,9 @@
 
 #include <cairo.h>
 
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
 
 static void
 clearlooks_draw_glossy_gradient (cairo_t         *cr,
@@ -292,12 +295,13 @@ clearlooks_glossy_draw_button (cairo_t *cr,
                }
                
                /* if (!(params->enable_glow && !params->active && !params->disabled)) */
-               if (!(params->prelight && params->enable_glow && !params->active))
+               if (!(params->prelight && params->enable_glow && !params->active)) {
                        if (!(params->disabled))
                                params->style_functions->draw_inset (cr, &params->parentbg, 0, 0, width-1, height-1, params->radius+1, params->corners);
                        else
                                /*Draw a lighter inset */
                                clearlooks_glossy_draw_light_inset (cr, &params->parentbg, 0, 0, width-1, height-1, params->radius+1, params->corners);
+               }
                cairo_translate (cr, -0.5, -0.5);
        }
 
@@ -684,7 +688,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
        cairo_pattern_t     *pattern;
        
        double               radius;
-       double               strip_size;
 
        radius = MIN (params->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
 
@@ -703,7 +706,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
        if (tab->gap_side == CL_GAP_TOP || tab->gap_side == CL_GAP_BOTTOM)
        {
                height += 3.0;
-               strip_size = 2.0/height; /* 2 pixel high strip */
                
                if (tab->gap_side == CL_GAP_TOP)
                        cairo_translate (cr, 0.0, -3.0); /* gap at the other side */
@@ -711,7 +713,6 @@ clearlooks_glossy_draw_tab (cairo_t *cr,
        else
        {
                width += 3.0;
-               strip_size = 2.0/width;
                
                if (tab->gap_side == CL_GAP_LEFT) 
                        cairo_translate (cr, -3.0, 0.0); /* gap at the other side */
@@ -889,7 +890,6 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr,
        const CairoColor *border = &colors->shade[7];
        CairoColor  fill, s1, s2, s4;
        cairo_pattern_t *pattern;
-       ShadowParameters shadow;
        double radius = MIN (widget->radius, MIN ((width - 2.0) / 2.0, (height - 2.0) / 2.0));
        
        if (scrollbar->horizontal)
@@ -940,8 +940,6 @@ clearlooks_glossy_draw_scrollbar_stepper (cairo_t *cr,
        cairo_stroke (cr);
        
        cairo_translate (cr, 0.5, 0.5);
-       shadow.shadow  = CL_SHADOW_OUT;
-       shadow.corners = corners;
 }
 
 static void
@@ -1090,6 +1088,10 @@ clearlooks_glossy_draw_toolbar (cairo_t *cr,
                          const ToolbarParameters         *toolbar,
                          int x, int y, int width, int height)
 {
+       (void) widget;
+       (void) width;
+       (void) height;
+       
        const CairoColor *fill  = &colors->bg[GTK_STATE_NORMAL];
        const CairoColor *dark  = &colors->shade[3];
        CairoColor light;
@@ -1230,6 +1232,9 @@ clearlooks_glossy_draw_radiobutton (cairo_t *cr,
                              const CheckboxParameters *checkbox,
                              int x, int y, int width, int height)
 {
+       (void) width;
+       (void) height;
+       
        const CairoColor *border;
        const CairoColor *dot;
        CairoColor shadow;