mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Shift-click on a mixer width button toggles width of all
strips (#4510). git-svn-id: svn://localhost/ardour2/branches/3.0@10822 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
e355b5df27
commit
e5dd712ac4
2 changed files with 35 additions and 12 deletions
|
|
@ -150,8 +150,13 @@ MixerStrip::init ()
|
||||||
img = manage (new Gtk::Image (::get_icon("strip_width")));
|
img = manage (new Gtk::Image (::get_icon("strip_width")));
|
||||||
img->show ();
|
img->show ();
|
||||||
|
|
||||||
|
string t = _("Click to toggle the width of this mixer strip.");
|
||||||
|
if (_mixer_owned) {
|
||||||
|
t += string_compose (_("\n%1-click to toggle the width of all strips."), Keyboard::tertiary_modifier_name ());
|
||||||
|
}
|
||||||
|
|
||||||
width_button.add (*img);
|
width_button.add (*img);
|
||||||
ARDOUR_UI::instance()->set_tip (&width_button, _("Toggle the width of this mixer strip"));
|
ARDOUR_UI::instance()->set_tip (width_button, t);
|
||||||
|
|
||||||
img = manage (new Gtk::Image (::get_icon("hide")));
|
img = manage (new Gtk::Image (::get_icon("hide")));
|
||||||
img->show ();
|
img->show ();
|
||||||
|
|
@ -278,7 +283,7 @@ MixerStrip::init ()
|
||||||
hide_button.set_name ("MixerHideButton");
|
hide_button.set_name ("MixerHideButton");
|
||||||
top_event_box.set_name ("MixerTopEventBox");
|
top_event_box.set_name ("MixerTopEventBox");
|
||||||
|
|
||||||
width_button.signal_clicked().connect (sigc::mem_fun(*this, &MixerStrip::width_clicked));
|
width_button.signal_button_press_event().connect (sigc::mem_fun(*this, &MixerStrip::width_button_pressed), false);
|
||||||
hide_button.signal_clicked().connect (sigc::mem_fun(*this, &MixerStrip::hide_clicked));
|
hide_button.signal_clicked().connect (sigc::mem_fun(*this, &MixerStrip::hide_clicked));
|
||||||
|
|
||||||
width_hide_box.pack_start (width_button, false, true);
|
width_hide_box.pack_start (width_button, false, true);
|
||||||
|
|
@ -1532,17 +1537,35 @@ MixerStrip::name_changed ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
bool
|
||||||
MixerStrip::width_clicked ()
|
MixerStrip::width_button_pressed (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
switch (_width) {
|
if (ev->button != 1) {
|
||||||
case Wide:
|
return false;
|
||||||
set_width_enum (Narrow, this);
|
|
||||||
break;
|
|
||||||
case Narrow:
|
|
||||||
set_width_enum (Wide, this);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Keyboard::modifier_state_contains (ev->state, Keyboard::ModifierMask (Keyboard::TertiaryModifier)) && _mixer_owned) {
|
||||||
|
switch (_width) {
|
||||||
|
case Wide:
|
||||||
|
_mixer.set_strip_width (Narrow);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Narrow:
|
||||||
|
_mixer.set_strip_width (Wide);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch (_width) {
|
||||||
|
case Wide:
|
||||||
|
set_width_enum (Narrow, this);
|
||||||
|
break;
|
||||||
|
case Narrow:
|
||||||
|
set_width_enum (Wide, this);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
||||||
Gtk::EventBox* spacer;
|
Gtk::EventBox* spacer;
|
||||||
|
|
||||||
void hide_clicked();
|
void hide_clicked();
|
||||||
void width_clicked ();
|
bool width_button_pressed (GdkEventButton *);
|
||||||
|
|
||||||
Gtk::Frame global_frame;
|
Gtk::Frame global_frame;
|
||||||
Gtk::VBox global_vpacker;
|
Gtk::VBox global_vpacker;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue