summaryrefslogtreecommitdiff
path: root/gtk2_ardour/stereo_panner.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-02-07 17:28:37 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-02-07 17:28:37 +0000
commit9b17f35576a74d971b2c86558cf1cf1dec2750e0 (patch)
treefc21685ad2ecfbe665fc975038c76887b7c54c2d /gtk2_ardour/stereo_panner.cc
parentbf476d4a588fdceb24caffb8677ceb956592edbc (diff)
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
Diffstat (limited to 'gtk2_ardour/stereo_panner.cc')
-rw-r--r--gtk2_ardour/stereo_panner.cc11
1 files changed, 6 insertions, 5 deletions
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;