mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 07:06:23 +01:00
use GDK event mask for Alt, rather than attempt platform-specific translation from ardour codebase meta-modifiers
This commit is contained in:
parent
da486905be
commit
52f77a562b
1 changed files with 3 additions and 8 deletions
|
|
@ -63,12 +63,6 @@ using namespace std;
|
|||
using Gtkmm2ext::Keyboard;
|
||||
using namespace ArdourMeter;
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#define ALT_OPTION (Keyboard::Level4Modifier)
|
||||
#elif defined(PLATFORM_WINDOWS)
|
||||
#define ALT_OPTION (Keyboard::SecondaryModifier)
|
||||
#endif
|
||||
|
||||
GainMeter::GainMeter (Session* s, const std::string& layout_script_file)
|
||||
: Gtk::VBox ()
|
||||
, WavesUI (layout_script_file, *this)
|
||||
|
|
@ -303,7 +297,8 @@ GainMeter::gain_display_button_press (GdkEventButton* ev)
|
|||
{
|
||||
switch (ev->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
if (Keyboard::modifier_state_contains (ev->state, ALT_OPTION)) {
|
||||
/* MOD1 == "Alt" */
|
||||
if (Keyboard::modifier_state_contains (ev->state, GDK_MOD1_MASK)) {
|
||||
_amp->set_gain (dB_to_coefficient(0.0), this);
|
||||
}
|
||||
break;
|
||||
|
|
@ -687,7 +682,7 @@ GainMeter::gain_slider_button_press (GdkEventButton* ev)
|
|||
{
|
||||
switch (ev->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
if (Keyboard::modifier_state_contains (ev->state, ALT_OPTION)) {
|
||||
if (Keyboard::modifier_state_contains (ev->state, GDK_MOD1_MASK)) {
|
||||
_amp->set_gain (dB_to_coefficient(0.0), this);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue