partial response to note name display option
This commit is contained in:
@@ -139,10 +139,25 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess, ArdourCanva
|
||||
_midnam_model_selector.disable_scrolling();
|
||||
_midnam_custom_device_mode_selector.disable_scrolling();
|
||||
_midnam_channel_selector.disable_scrolling();
|
||||
|
||||
UIConfiguration::instance().ParameterChanged.connect (sigc::mem_fun (*this, &MidiTimeAxisView::parameter_changed));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MidiTimeAxisView::parameter_changed (string const & param)
|
||||
{
|
||||
if (param == X_("note-name-display")) {
|
||||
if (_piano_roll_header) {
|
||||
_piano_roll_header->queue_resize ();
|
||||
_stripable->gui_changed ("visible_tracks", (void *) 0); /* EMIT SIGNAL */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MidiTimeAxisView::set_note_highlight (uint8_t note) {
|
||||
MidiTimeAxisView::set_note_highlight (uint8_t note)
|
||||
{
|
||||
_piano_roll_header->set_note_highlight (note);
|
||||
}
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ private:
|
||||
void set_note_range (MidiStreamView::VisibleNoteRange range, bool apply_to_selection = false);
|
||||
void route_active_changed ();
|
||||
void note_range_changed ();
|
||||
void parameter_changed (std::string const &);
|
||||
|
||||
void update_scroomer_visbility (uint32_t, LayerDisplay);
|
||||
|
||||
|
||||
@@ -755,7 +755,14 @@ PianoRollHeader::invalidate_note_range (int lowest, int highest)
|
||||
void
|
||||
PianoRollHeader::on_size_request (Gtk::Requisition* r)
|
||||
{
|
||||
r->width = std::max (80.f, rintf (80.f * UIConfiguration::instance().get_ui_scale()));
|
||||
if (UIConfiguration::instance().get_note_name_display() == Editing::Never) {
|
||||
_scroomer_size = 15.f;
|
||||
} else {
|
||||
_scroomer_size = 60.f;
|
||||
}
|
||||
|
||||
float w = _scroomer_size + 20.f;
|
||||
r->width = std::max (w, rintf (w * UIConfiguration::instance().get_ui_scale()));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user