mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
Flip MIDI region view's verbose canvas cursor to above the mouse pointer if it is near the bottom of the canvas (#3842).
git-svn-id: svn://localhost/ardour2/branches/3.0@9603 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d6be900da0
commit
135e064fbb
2 changed files with 10 additions and 0 deletions
|
|
@ -3434,6 +3434,15 @@ MidiRegionView::show_verbose_cursor (string const & text, double xoffset, double
|
||||||
wx += xoffset;
|
wx += xoffset;
|
||||||
wy += yoffset;
|
wy += yoffset;
|
||||||
|
|
||||||
|
/* Flip the cursor above the mouse pointer if it would overlap the bottom of the canvas */
|
||||||
|
|
||||||
|
double x1, y1, x2, y2;
|
||||||
|
trackview.editor().verbose_cursor()->canvas_item()->get_bounds (x1, y1, x2, y2);
|
||||||
|
|
||||||
|
if ((wy + y2 - y1) > trackview.editor().canvas_height()) {
|
||||||
|
wy -= (y2 - y1) + 2 * yoffset;
|
||||||
|
}
|
||||||
|
|
||||||
trackview.editor().verbose_cursor()->set (text, wx, wy);
|
trackview.editor().verbose_cursor()->set (text, wx, wy);
|
||||||
trackview.editor().verbose_cursor()->show ();
|
trackview.editor().verbose_cursor()->show ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible {
|
||||||
virtual void show_window () = 0;
|
virtual void show_window () = 0;
|
||||||
virtual framepos_t leftmost_position() const = 0;
|
virtual framepos_t leftmost_position() const = 0;
|
||||||
virtual framecnt_t current_page_frames() const = 0;
|
virtual framecnt_t current_page_frames() const = 0;
|
||||||
|
virtual double canvas_height () const = 0;
|
||||||
virtual void temporal_zoom_step (bool coarser) = 0;
|
virtual void temporal_zoom_step (bool coarser) = 0;
|
||||||
virtual void scroll_tracks_down_line () = 0;
|
virtual void scroll_tracks_down_line () = 0;
|
||||||
virtual void scroll_tracks_up_line () = 0;
|
virtual void scroll_tracks_up_line () = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue