mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Processor box interaction:
Allow to toggle inline display with tertiary + double-click. also fix tooltip and fix inconsistent modifiers on inline display.
This commit is contained in:
parent
115bc84c27
commit
389cacab11
2 changed files with 22 additions and 4 deletions
|
|
@ -510,7 +510,7 @@ ProcessorEntry::setup_tooltip ()
|
||||||
}
|
}
|
||||||
if (pi->plugin()->has_editor()) {
|
if (pi->plugin()->has_editor()) {
|
||||||
ARDOUR_UI_UTILS::set_tooltip (_button,
|
ARDOUR_UI_UTILS::set_tooltip (_button,
|
||||||
string_compose (_("<b>%1</b>\nDouble-click to show GUI.\n%2+double-click to show generic GUI.%3"), name (Wide), Keyboard::primary_modifier_name (), postfix));
|
string_compose (_("<b>%1</b>\nDouble-click to show GUI.\n%2+double-click to show generic GUI.%3"), name (Wide), Keyboard::secondary_modifier_name (), postfix));
|
||||||
} else {
|
} else {
|
||||||
ARDOUR_UI_UTILS::set_tooltip (_button,
|
ARDOUR_UI_UTILS::set_tooltip (_button,
|
||||||
string_compose (_("<b>%1</b>\nDouble-click to show generic GUI.%2"), name (Wide), postfix));
|
string_compose (_("<b>%1</b>\nDouble-click to show generic GUI.%2"), name (Wide), postfix));
|
||||||
|
|
@ -1569,11 +1569,20 @@ ProcessorEntry::PluginDisplay::on_button_press_event (GdkEventButton *ev)
|
||||||
{
|
{
|
||||||
assert (_entry.processor ());
|
assert (_entry.processor ());
|
||||||
|
|
||||||
|
boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (_entry.processor());
|
||||||
|
// duplicated code :(
|
||||||
// consider some tweaks to pass this up to the DnDVBox somehow:
|
// consider some tweaks to pass this up to the DnDVBox somehow:
|
||||||
// select processor, then call (private)
|
// select processor, then call (private)
|
||||||
//_entry._parent->processor_button_press_event (ev, &_entry);
|
//_entry._parent->processor_button_press_event (ev, &_entry);
|
||||||
if (Keyboard::is_edit_event (ev) || (ev->button == 1 && ev->type == GDK_2BUTTON_PRESS)) {
|
if (pi && pi->plugin() && pi->plugin()->has_inline_display()
|
||||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
&& Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)
|
||||||
|
&& ev->button == 1
|
||||||
|
&& ev->type == GDK_2BUTTON_PRESS) {
|
||||||
|
_entry.toggle_inline_display_visibility ();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (Keyboard::is_edit_event (ev) || (ev->button == 1 && ev->type == GDK_2BUTTON_PRESS)) {
|
||||||
|
if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
|
||||||
_entry._parent->generic_edit_processor (_entry.processor ());
|
_entry._parent->generic_edit_processor (_entry.processor ());
|
||||||
} else {
|
} else {
|
||||||
_entry._parent->edit_processor (_entry.processor ());
|
_entry._parent->edit_processor (_entry.processor ());
|
||||||
|
|
@ -2341,6 +2350,15 @@ ProcessorBox::processor_button_press_event (GdkEventButton *ev, ProcessorEntry*
|
||||||
int ret = false;
|
int ret = false;
|
||||||
bool selected = processor_display.selected (child);
|
bool selected = processor_display.selected (child);
|
||||||
|
|
||||||
|
boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (processor);
|
||||||
|
if (pi && pi->plugin() && pi->plugin()->has_inline_display()
|
||||||
|
&& Keyboard::modifier_state_equals (ev->state, Keyboard::TertiaryModifier)
|
||||||
|
&& ev->button == 1
|
||||||
|
&& ev->type == GDK_2BUTTON_PRESS) {
|
||||||
|
child->toggle_inline_display_visibility ();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (processor && (Keyboard::is_edit_event (ev) || (ev->button == 1 && ev->type == GDK_2BUTTON_PRESS))) {
|
if (processor && (Keyboard::is_edit_event (ev) || (ev->button == 1 && ev->type == GDK_2BUTTON_PRESS))) {
|
||||||
|
|
||||||
if (_session->engine().connected()) {
|
if (_session->engine().connected()) {
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,7 @@ public:
|
||||||
/** Hide any widgets that should be hidden */
|
/** Hide any widgets that should be hidden */
|
||||||
virtual void hide_things ();
|
virtual void hide_things ();
|
||||||
|
|
||||||
|
void toggle_inline_display_visibility ();
|
||||||
void show_all_controls ();
|
void show_all_controls ();
|
||||||
void hide_all_controls ();
|
void hide_all_controls ();
|
||||||
void add_control_state (XMLNode *) const;
|
void add_control_state (XMLNode *) const;
|
||||||
|
|
@ -236,7 +237,6 @@ private:
|
||||||
|
|
||||||
std::list<Control*> _controls;
|
std::list<Control*> _controls;
|
||||||
|
|
||||||
void toggle_inline_display_visibility ();
|
|
||||||
void toggle_control_visibility (Control *);
|
void toggle_control_visibility (Control *);
|
||||||
void toggle_panner_link ();
|
void toggle_panner_link ();
|
||||||
void toggle_allow_feedback ();
|
void toggle_allow_feedback ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue