mixer: ui: consistent interaction with foldback bus number label (context menu on press instead of release)

This commit is contained in:
jean-emmanuel 2023-12-13 14:52:31 +01:00 committed by Robin Gareus
parent 33a9664748
commit ef160dd24e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 6 additions and 1 deletions

View File

@ -529,7 +529,7 @@ FoldbackStrip::init ()
_global_frame.set_name ("MixerStripFrame");
add (_global_frame);
_number_label.signal_button_release_event().connect (sigc::mem_fun (*this, &FoldbackStrip::number_button_press), false);
_number_label.signal_button_press_event().connect (sigc::mem_fun (*this, &FoldbackStrip::number_button_press), false);
_name_button.signal_button_press_event ().connect (sigc::mem_fun (*this, &FoldbackStrip::name_button_button_press), false);
_previous_button.signal_clicked.connect (sigc::bind (sigc::mem_fun (*this, &FoldbackStrip::cycle_foldbacks), false));
_next_button.signal_clicked.connect (sigc::bind (sigc::mem_fun (*this, &FoldbackStrip::cycle_foldbacks), true));
@ -875,6 +875,11 @@ FoldbackStrip::name_button_button_press (GdkEventButton* ev)
bool
FoldbackStrip::number_button_press (GdkEventButton* ev)
{
if (ev->type == GDK_2BUTTON_PRESS) {
choose_color ();
return true;
}
if (Keyboard::is_context_menu_event (ev)) {
return name_button_button_press (ev);
}