Skip to content

Commit

Permalink
Add tooltips to field buttons (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhielost committed Mar 8, 2024
1 parent b8a8c4d commit 78908d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions data/locale/en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ Message.PitchAdjust="Pitch Adjust"
Message.Velocity="Velocity"
Message.Value="Value"

MIDIButtons.Fixed="Fixed"
MIDIButtons.MIDI="0-127"
MIDIButtons.Custom="Custom"
MIDIButtons.Ignore="Ignore"
MIDIButtons.Toggle="Toggle"
MIDIButtons.Fixed="Fixed Value"
MIDIButtons.MIDI="Use Default MIDI Range"
MIDIButtons.Custom="Use Custom MIDI Range"
MIDIButtons.Ignore="Ignore Value"
MIDIButtons.Toggle="Toggle Between Values"

NumberDisplay.LowerBound="Lower Bound (corresponds to MIDI value of 0)"
NumberDisplay.UpperBound="Upper Bound (corresponds to MIDI value of 127)"
Expand Down
8 changes: 5 additions & 3 deletions src/ui/mmg-midi-buttons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,25 @@ MMGMIDIButtons::MMGMIDIButtons(QWidget *parent) : QWidget(parent)
layout->setContentsMargins(0, 0, 0, 0);

fixed_button = new QPushButton(this);
//fixed_button->setGeometry(0, 0, 30, 30);
fixed_button->setIcon(mmg_icon("fixed"));
fixed_button->setIconSize({12, 12});
fixed_button->setToolTip(mmgtr("MIDIButtons.Fixed"));

midi_button = new QPushButton(this);
//midi_button->setGeometry(40, 0, 30, 30);
midi_button->setIcon(mmg_icon("midi"));
midi_button->setIconSize({18, 18});
midi_button->setToolTip(mmgtr("MIDIButtons.MIDI"));

custom_button = new QPushButton(this);
//custom_button->setGeometry(80, 0, 30, 30);
custom_button->setIcon(mmg_icon("custom"));
custom_button->setToolTip(mmgtr("MIDIButtons.Custom"));

ignore_button = new QPushButton(this);
ignore_button->setIcon(mmg_icon("disable"));
ignore_button->setToolTip(mmgtr("MIDIButtons.Ignore"));

toggle_button = new QPushButton(this);
toggle_button->setToolTip(mmgtr("MIDIButtons.Toggle"));
connect(toggle_button, &QPushButton::toggled, this, &MMGMIDIButtons::setToggleIcon);

button_group = new QButtonGroup(this);
Expand Down

0 comments on commit 78908d9

Please sign in to comment.