pianoroll: ensure countdown digits are not scrolled out of sight

This commit is contained in:
Paul Davis
2025-12-01 13:27:11 -07:00
parent 21b2985c47
commit 04a1ed3c48
2 changed files with 3 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ PianorollMidiView::PianorollMidiView (std::shared_ptr<ARDOUR::MidiTrack> mt,
MidiViewBackground& bg,
uint32_t basic_color)
: MidiView (mt, parent, ec, bg, basic_color)
, _noscroll_parent (&noscroll_parent)
, overlay_text (nullptr)
, active_automation (nullptr)
, velocity_display (nullptr)
@@ -748,7 +749,7 @@ void
PianorollMidiView::set_overlay_text (std::string const & str)
{
if (!overlay_text) {
overlay_text = new ArdourCanvas::Text (_note_group->parent());
overlay_text = new ArdourCanvas::Text (_noscroll_parent);
Pango::FontDescription font ("Sans 200");
overlay_text->set_font_description (font);
overlay_text->set_color (0xff000088);

View File

@@ -95,6 +95,7 @@ class PianorollMidiView : public MidiView
protected:
bool scroll (GdkEventScroll* ev);
ArdourCanvas::Item* _noscroll_parent;
ArdourCanvas::Rectangle* automation_group;
ArdourCanvas::Text* overlay_text;