coreaudio backend: SR/BS query for separate devices
[ardour.git] / libs / clearlooks-newer / clearlooks_draw.c
index e44610b4ee5e597e6c5f0d1133960a6bc0206322..fa0b3e078ba844b2475cc7dfe6913d81c209c264 100644 (file)
@@ -406,9 +406,9 @@ clearlooks_draw_entry (cairo_t *cr,
        /* Draw the inner shadow */
        if (params->focus)
        {
-               /* ge_cairo_rounded_rectangle (cr, 2, 2, width-5, height-5, RADIUS-1, params->corners); */
+               ge_cairo_rounded_rectangle (cr, 2, 2, width-5, height-5, radius, params->corners);
                ge_cairo_set_color (cr, &colors->spot[0]);
-               ge_cairo_stroke_rectangle (cr, 2, 2, width-5, height-5);
+               cairo_fill(cr);
        }
        else
        {
@@ -945,12 +945,12 @@ clearlooks_draw_menubar0 (cairo_t *cr,
                           const MenuBarParameters *menubar,
                           int x, int y, int width, int height)
 {
-       (void) params;
-       (void) menubar;
-       
 /*     const CairoColor *light = &colors->shade[0]; */
        const CairoColor *dark = &colors->shade[3];
 
+       (void) params;
+       (void) menubar;
+
        cairo_set_line_width (cr, 1);
        cairo_translate (cr, x, y+0.5);
 
@@ -972,12 +972,12 @@ clearlooks_draw_menubar2 (cairo_t *cr,
                           const MenuBarParameters *menubar,
                           int x, int y, int width, int height)
 {
-       (void) params;
-       (void) menubar;
-       
        CairoColor lower;
        cairo_pattern_t *pattern;
 
+       (void) params;
+       (void) menubar;
+
        ge_shade_color (&colors->bg[0], 0.96, &lower);
        
        cairo_translate (cr, x, y);
@@ -1096,8 +1096,14 @@ clearlooks_draw_frame            (cairo_t *cr,
 
        ge_shade_color (&colors->bg[GTK_STATE_NORMAL], 1.05, &hilight);
        
-       if (frame->shadow == CL_SHADOW_NONE)
+       if (frame->shadow == CL_SHADOW_NONE) {
+               const CairoColor *bg = &colors->bg[params->state_type];
+               ge_cairo_set_color (cr, bg);
+               cairo_rectangle (cr, x + 1.5, y + 1.5, width - 3, height - 3);
+               cairo_set_line_width (cr, 3.0);
+               cairo_stroke (cr);
                return;
+       }
        
        if (frame->gap_x != -1)
                clearlooks_get_frame_gap_clip (x, y, width, height,
@@ -1316,10 +1322,10 @@ clearlooks_draw_separator (cairo_t *cr,
                            const SeparatorParameters  *separator,
                            int x, int y, int width, int height)
 {
-       (void) widget;
-       
+       CairoColor hilight;
        CairoColor color = colors->shade[3];
-       CairoColor hilight; 
+
+       (void) widget;
        ge_shade_color (&color, 1.4, &hilight);
 
        cairo_save (cr);
@@ -1432,11 +1438,12 @@ clearlooks_draw_toolbar (cairo_t *cr,
                          const ToolbarParameters         *toolbar,
                          int x, int y, int width, int height)
 {
-       (void) widget;
-
-       const CairoColor *fill  = &colors->bg[GTK_STATE_NORMAL];
-       const CairoColor *dark  = &colors->shade[3];
        CairoColor light;
+       const CairoColor *dark;
+       const CairoColor *fill  = &colors->bg[GTK_STATE_NORMAL];
+
+       (void) widget;
+       dark  = &colors->shade[3];
        ge_shade_color (fill, 1.1, &light);
        
        cairo_set_line_width (cr, 1.0);
@@ -1575,13 +1582,13 @@ clearlooks_draw_scrollbar_trough (cairo_t *cr,
                                   const ScrollBarParameters        *scrollbar,
                                   int x, int y, int width, int height)
 {
-       (void) widget;
-
-       const CairoColor *bg     = &colors->shade[2];
-       const CairoColor *border = &colors->shade[5];
+       const CairoColor *bg;
        CairoColor        bg_shade;
-       cairo_pattern_t *pattern;
+       cairo_pattern_t  *pattern;
+       const CairoColor *border = &colors->shade[5];
        
+       (void) widget;
+       bg = &colors->shade[2];
        ge_shade_color (bg, 0.95, &bg_shade);
        
        cairo_set_line_width (cr, 1);
@@ -1809,11 +1816,11 @@ clearlooks_draw_statusbar (cairo_t *cr,
                            const WidgetParameters          *widget,
                            int x, int y, int width, int height)
 {
+       CairoColor hilight;
+       const CairoColor *dark = &colors->shade[3];
+
        (void) widget;
        (void) height;
-       
-       const CairoColor *dark = &colors->shade[3];
-       CairoColor hilight;
 
        ge_shade_color (dark, 1.4, &hilight);
 
@@ -1837,9 +1844,9 @@ clearlooks_draw_menu_frame (cairo_t *cr,
                             const WidgetParameters          *widget,
                             int x, int y, int width, int height)
 {
+       const CairoColor *border = &colors->shade[5];
        (void) widget;
 
-       const CairoColor *border = &colors->shade[5];
        cairo_translate      (cr, x, y);
        cairo_set_line_width (cr, 1);
 /*
@@ -1924,15 +1931,15 @@ clearlooks_draw_resize_grip (cairo_t *cr,
                              const ResizeGripParameters      *grip,
                              int x, int y, int width, int height)
 {
-       (void) widget;
-       
-       const CairoColor *dark   = &colors->shade[4];
        CairoColor hilight;
        int lx, ly;
        int x_down;
        int y_down;
        int dots;
-       
+       const CairoColor *dark   = &colors->shade[4];
+
+       (void) widget;
+
        ge_shade_color (dark, 1.5, &hilight);
 
        /* The number of dots fitting into the area. Just hardcoded to 4 right now. */
@@ -1996,17 +2003,18 @@ clearlooks_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;
        CairoColor highlight;
        cairo_pattern_t *pt;
        gboolean inconsistent;
+
        gboolean draw_bullet = (checkbox->shadow_type == GTK_SHADOW_IN);
 
+       (void) width;
+       (void) height;
+
        inconsistent = (checkbox->shadow_type == GTK_SHADOW_ETCHED_IN);
        draw_bullet |= inconsistent;