panner visual tweaks
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 9 Feb 2011 14:28:18 +0000 (14:28 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 9 Feb 2011 14:28:18 +0000 (14:28 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8802 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/mono_panner.cc
gtk2_ardour/panner_ui.cc
gtk2_ardour/stereo_panner.cc

index 8b3cbc73b2e4aaf2b24dd360f92ca120d1761159..9f2103925080355c7ce9b0d31a99d1b6989c7217 100644 (file)
@@ -216,13 +216,17 @@ MonoPanner::on_expose_event (GdkEventExpose* ev)
         /* 2 lines that connect them both */
         context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
         context->set_line_width (1.0);
         /* 2 lines that connect them both */
         context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
         context->set_line_width (1.0);
-        context->move_to (left + half_lr_box, half_lr_box+step_down);
-        context->line_to (right - half_lr_box, half_lr_box+step_down);
+
+        /* make the lines a little longer than they need to be, because the corners of
+           the boxes are rounded and we don't want a gap
+        */
+        context->move_to (left + half_lr_box - corner_radius, half_lr_box+step_down);
+        context->line_to (right - half_lr_box + corner_radius, half_lr_box+step_down);
         context->stroke ();
 
 
         context->stroke ();
 
 
-        context->move_to (left + half_lr_box, half_lr_box+step_down+lr_box_size);
-        context->line_to (right - half_lr_box, half_lr_box+step_down+lr_box_size);
+        context->move_to (left + half_lr_box - corner_radius, half_lr_box+step_down+lr_box_size);
+        context->line_to (right - half_lr_box + corner_radius, half_lr_box+step_down+lr_box_size);
         context->stroke ();
 
         /* draw the position indicator */
         context->stroke ();
 
         /* draw the position indicator */
index af207c20c13a6a43cb0fbcf8c77a2e9f7bdeba1b..49720d781e5480723ef74627a73a97a3bb47b834 100644 (file)
@@ -47,7 +47,7 @@ using namespace PBD;
 using namespace Gtkmm2ext;
 using namespace Gtk;
 
 using namespace Gtkmm2ext;
 using namespace Gtk;
 
-const int PannerUI::pan_bar_height = 40;
+const int PannerUI::pan_bar_height = 35;
 
 PannerUI::PannerUI (Session* s)
        : _current_nouts (-1)
 
 PannerUI::PannerUI (Session* s)
        : _current_nouts (-1)
index 128bfe6c77d567f35288a44f0c0203d520accb15..cff4ebd898a4b536bf85dc5616e6edd811852253 100644 (file)
@@ -192,6 +192,14 @@ StereoPanner::on_expose_event (GdkEventExpose* ev)
         left = center - pan_spread;  // center of left box
         right = center + pan_spread; // center of right box
 
         left = center - pan_spread;  // center of left box
         right = center + pan_spread; // center of right box
 
+        /* center line */
+
+        context->set_line_width (1.0);
+        context->move_to ((usable_width + lr_box_size)/2.0, 0);
+        context->rel_line_to (0, height);
+        context->set_source_rgba (UINT_RGBA_R_FLT(o), UINT_RGBA_G_FLT(o), UINT_RGBA_B_FLT(o), UINT_RGBA_A_FLT(o));
+        context->stroke ();
+
         /* compute & draw the line through the box */
         
         context->set_line_width (2);
         /* compute & draw the line through the box */
         
         context->set_line_width (2);