Skip to content

Commit

Permalink
adjust how note mode button appears visually
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldavisthefirst committed Jan 3, 2025
1 parent 731d6e4 commit ed54b8e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gtk2_ardour/midi_cue_editor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,11 @@ MidiCueEditor::build_upper_toolbar ()

set_tooltip (full_zoom_button, _("Zoom to full clip"));
set_tooltip (note_mode_button, _("Toggle between drum and regular note drawing"));
note_mode_button.set_icon (ArdourIcon::Drum);

#define PX_SCALE(px) std::max((float)px, rintf((float)px * UIConfiguration::instance().get_ui_scale()))
note_mode_button.set_size_request (PX_SCALE(50), -1);
note_mode_button.set_active_color (UIConfiguration::instance().color ("alert:blue"));
note_mode_button.set_active_color (UIConfiguration::instance().color ("alert:yellow"));

_toolbar_outer->set_border_width (6);
_toolbar_outer->set_spacing (12);
Expand Down Expand Up @@ -2018,10 +2019,8 @@ MidiCueEditor::note_mode_clicked ()
assert (bg);

if (bg->note_mode() == Sustained) {
note_mode_button.set_icon (ArdourIcon::Drum);
set_note_mode (Percussive);
} else {
note_mode_button.remove_elements (ArdourButton::VectorIcon);
set_note_mode (Sustained);
}
}
Expand Down

0 comments on commit ed54b8e

Please sign in to comment.