Tweaking the a-comp inline display a bit. Make it more skinny.
authorJohannes Mueller <github@johannes-mueller.org>
Sat, 22 Jul 2017 08:17:17 +0000 (10:17 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 31 Jul 2017 19:31:23 +0000 (21:31 +0200)
libs/plugins/a-comp.lv2/a-comp.c

index f9518cd76fed65bfcc83552e82bcb920ac331cce..35598c3d51b4e2adbdc8a442ee7c8c35165c2d06 100644 (file)
@@ -743,16 +743,15 @@ render_inline_only_bars (cairo_t* cr, const AComp* self)
        cairo_set_source_rgba (cr, .2, .2, .2, 1.0);
        cairo_fill (cr);
 
-       cairo_set_line_width (cr, 1.0);
 
        cairo_save (cr);
 
-       const float ht = 0.333f * h;
+       const float ht = 0.25f * h;
 
        const float x1 = w*0.05;
        const float wd = w - 2.0f*x1;
 
-       const float y1 = 0.1*h;
+       const float y1 = 0.17*h;
        const float y2 = h - y1 - ht;
 
        cairo_set_source_rgba (cr, 0.5, 0.5, 0.5, 0.5);
@@ -783,7 +782,9 @@ render_inline_only_bars (cairo_t* cr, const AComp* self)
 
        cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0);
 
-       const float tck = 0.25*ht;
+       const float tck = 0.33*ht;
+
+       cairo_set_line_width (cr, .5);
 
        for (uint32_t d = 1; d < 7; ++d) {
                const float x = x1 + (d * wd * (10.f / 70.f));
@@ -801,7 +802,7 @@ render_inline_only_bars (cairo_t* cr, const AComp* self)
                cairo_line_to (cr, x, y2+ht-tck);
        }
 
-       cairo_set_line_width (cr, 2.0);
+       cairo_stroke (cr);
 
        const float x_0dB = x1 + wd*(60.f/70.f);
 
@@ -812,6 +813,8 @@ render_inline_only_bars (cairo_t* cr, const AComp* self)
        cairo_rectangle (cr, x1, y2, wd, ht);
        cairo_stroke (cr);
 
+       cairo_set_line_width (cr, 2.0);
+
        // visualize threshold
        const float tr = x1 + wd * (60.f+self->v_thresdb) / 70.f;
        cairo_set_source_rgba (cr, 0.95, 0.95, 0.0, 1.0);