From 9b17f35576a74d971b2c86558cf1cf1dec2750e0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 7 Feb 2011 17:28:37 +0000 Subject: change appearance of panner data popup slightly (fixed width font so it doesn't bounce around during edits), and make dbl-clicks to set pos to max-L or max-R work even if width is reversed git-svn-id: svn://localhost/ardour2/branches/3.0@8746 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/stereo_panner.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gtk2_ardour/stereo_panner.cc') diff --git a/gtk2_ardour/stereo_panner.cc b/gtk2_ardour/stereo_panner.cc index 4889f02343..53f143d2d9 100644 --- a/gtk2_ardour/stereo_panner.cc +++ b/gtk2_ardour/stereo_panner.cc @@ -114,10 +114,11 @@ StereoPanner::set_drag_data () the center of the USA isn't Kansas, its (50LA, 50NY) and it will all make sense. */ - drag_data_label->set_markup (string_compose (_("L:%1 R:%2 Width: %3%%"), - (int) rint (100.0 * (1.0 - pos)), - (int) rint (100.0 * pos), - (int) floor (100.0 * width_control->get_value()))); + char buf[64]; + snprintf (buf, sizeof (buf), "L:%3d R:%3d Width:%d%%", (int) rint (100.0 * (1.0 - pos)), + (int) rint (100.0 * pos), + (int) floor (100.0 * width_control->get_value())); + drag_data_label->set_markup (buf); } void @@ -312,7 +313,7 @@ StereoPanner::on_button_press_event (GdkEventButton* ev) /* upper section: adjusts position, constrained by width */ - const double w = width_control->get_value (); + const double w = fabs (width_control->get_value ()); const double max_pos = 1.0 - (w/2.0); const double min_pos = w/2.0; -- cgit v1.2.3