make waveforms centered when height hits NAME_HIGHLIGHT_THRESHOLD

git-svn-id: svn://localhost/ardour2/trunk@678 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2006-07-11 15:45:19 +00:00
parent e7efb38fc5
commit f535b0f491
3 changed files with 5 additions and 1 deletions

View file

@ -518,7 +518,7 @@ AudioRegionView::set_height (gdouble height)
for (uint32_t n=0; n < wcnt; ++n) {
gdouble ht;
if ((height) < NAME_HIGHLIGHT_THRESH) {
if ((height) <= NAME_HIGHLIGHT_THRESH) {
ht = ((height-2*wcnt) / (double) wcnt);
} else {
ht = (((height-2*wcnt) - NAME_HIGHLIGHT_SIZE) / (double) wcnt);

View file

@ -948,6 +948,8 @@ TimeAxisView::compute_controls_size_info ()
hSmaller = req.height + extra_height;
cerr << "hSmaller = " << hSmaller << endl;
window.remove ();
window.add (two_row_table);

View file

@ -93,6 +93,8 @@ TimeAxisViewItem::TimeAxisViewItem(const string & it_name, ArdourCanvas::Group&
NAME_HIGHLIGHT_SIZE = height + 6;
NAME_HIGHLIGHT_THRESH = NAME_HIGHLIGHT_SIZE * 2;
cerr << "name highlight threshold = " << NAME_HIGHLIGHT_THRESH << endl;
have_name_font = true;
}