13
0

stereo panner tooltip tweaks & less debugging

git-svn-id: svn://localhost/ardour2/branches/3.0@8367 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-12-29 17:33:05 +00:00
parent d16bb0b8bc
commit f31e5b5d71

View File

@ -98,16 +98,15 @@ StereoPanner::set_tooltip ()
Gtkmm2ext::UI::instance()->set_tip (this,
string_compose (_("L:%1 R:%2 Width: %3%%\n\n0 -> set width to zero\n%4-uparrow -> set width to 1.0\n%4-downarrow -> set width to -1.0"),
(int) floor (100.0 * (1.0 - pos)),
(int) floor (100.0 * pos),
(int) floor (width_control->get_value()),
(int) rint (100.0 * (1.0 - pos)),
(int) rint (100.0 * pos),
(int) floor (100.0 * width_control->get_value()),
Keyboard::secondary_modifier_name()).c_str());
}
void
StereoPanner::value_change ()
{
cerr << this << " Value change, pos = " << position_control->get_value() << " w = " << width_control->get_value() << endl;
set_tooltip ();
queue_draw ();
}
@ -156,9 +155,6 @@ StereoPanner::on_expose_event (GdkEventExpose* ev)
int left = lrint (center - (fswidth * usable_width / 2.0)); // center of leftmost box
int right = lrint (center + (fswidth * usable_width / 2.0)); // center of rightmost box
cerr << this << " pos " << pos << " width = " << width << " swidth = " << swidth << " center @ " << center << " L = " << left << " R = " << right << endl;
/* compute & draw the line through the box */
cairo_set_line_width (cr, 2);
@ -253,10 +249,8 @@ StereoPanner::on_button_press_event (GdkEventButton* ev)
if (ev->type == GDK_2BUTTON_PRESS) {
if (dragging_position) {
cerr << "Reset pos\n";
position_control->set_value (0.5); // reset position to center
} else {
cerr << "Reset width\n";
width_control->set_value (1.0); // reset position to full, LR
}
dragging = false;