more Export Report GUI tweaks:

* properly indent y-axis labels
* show N/A if EBU-R128 is not available (mono/stereo only)
This commit is contained in:
Robin Gareus 2016-02-15 19:12:46 +01:00
parent abbaaeba02
commit 14bf40cfe3

View file

@ -346,19 +346,17 @@ ExportReport::ExportReport (Session* session, StatusPtr s)
cr->set_line_width (1.0);
if (p->loudness_hist_max > 0 && i->second->have_loudness) {
// draw data
for (size_t x = 0 ; x < 510; ++x) {
cr->move_to (x - .5, hh);
cr->line_to (x - .5, (float) hh * (1.0 - p->loudness_hist[x] / (float) p->loudness_hist_max));
cr->stroke ();
}
} else {
// TODO print "Not Avail"
}
layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
layout->set_alignment (Pango::ALIGN_CENTER);
// Label
// y-axis label
layout->set_text (_("LUFS\n(short)"));
layout->get_pixel_size (w, h);
Gtkmm2ext::rounded_rectangle (cr, 5, rint (.5 * (hh - w) - 1), h + 2, w + 2, 4);
@ -371,7 +369,7 @@ ExportReport::ExportReport (Session* session, StatusPtr s)
layout->show_in_cairo_context (cr);
cr->restore ();
// x-Axis
// x-Axis labels
layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
layout->set_alignment (Pango::ALIGN_LEFT);
for (int g = -53; g <= -8; g += 5) {
@ -406,6 +404,15 @@ ExportReport::ExportReport (Session* session, StatusPtr s)
cr->restore ();
}
} else {
layout->set_alignment (Pango::ALIGN_CENTER);
layout->set_font_description (UIConfiguration::instance ().get_LargeFont ());
layout->set_text (_("Not\nAvailable"));
layout->get_pixel_size (w, h);
cr->move_to (rint ((510 - w) * .5), rint ((hh - h) * .5));
layout->show_in_cairo_context (cr);
}
// add normalization gain factor here (for want of a better place)
if (p->normalized) {
const float ndb = accurate_coefficient_to_dB (p->norm_gain_factor);
@ -534,7 +541,7 @@ ExportReport::ExportReport (Session* session, StatusPtr s)
layout->set_text (_("Time"));
cr->set_source_rgba (.9, .9, .9, 1.0);
layout->get_pixel_size (w, h);
cr->move_to (rint (m_l - w - anw - 2), rint (.5 * (height - h)));
cr->move_to (rint (m_l - w - 8), rint (.5 * (height - h)));
layout->show_in_cairo_context (cr);
ytme->flush ();
@ -576,7 +583,7 @@ ExportReport::ExportReport (Session* session, StatusPtr s)
layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
layout->set_text (_("Hz"));
layout->get_pixel_size (w, h);
cr->move_to (rint (m_l - h - anw - 2), rint ((height + w) * .5));
cr->move_to (rint (m_l - h - anw - 10), rint ((height + w) * .5));
cr->set_source_rgba (.9, .9, .9, 1.0);
cr->save ();
cr->rotate (M_PI / -2.0);