mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
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:
parent
abbaaeba02
commit
14bf40cfe3
1 changed files with 52 additions and 45 deletions
|
|
@ -346,19 +346,17 @@ ExportReport::ExportReport (Session* session, StatusPtr s)
|
||||||
cr->set_line_width (1.0);
|
cr->set_line_width (1.0);
|
||||||
|
|
||||||
if (p->loudness_hist_max > 0 && i->second->have_loudness) {
|
if (p->loudness_hist_max > 0 && i->second->have_loudness) {
|
||||||
|
// draw data
|
||||||
for (size_t x = 0 ; x < 510; ++x) {
|
for (size_t x = 0 ; x < 510; ++x) {
|
||||||
cr->move_to (x - .5, hh);
|
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->line_to (x - .5, (float) hh * (1.0 - p->loudness_hist[x] / (float) p->loudness_hist_max));
|
||||||
cr->stroke ();
|
cr->stroke ();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// TODO print "Not Avail"
|
|
||||||
}
|
|
||||||
|
|
||||||
layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
|
layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
|
||||||
layout->set_alignment (Pango::ALIGN_CENTER);
|
layout->set_alignment (Pango::ALIGN_CENTER);
|
||||||
|
|
||||||
// Label
|
// y-axis label
|
||||||
layout->set_text (_("LUFS\n(short)"));
|
layout->set_text (_("LUFS\n(short)"));
|
||||||
layout->get_pixel_size (w, h);
|
layout->get_pixel_size (w, h);
|
||||||
Gtkmm2ext::rounded_rectangle (cr, 5, rint (.5 * (hh - w) - 1), h + 2, w + 2, 4);
|
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);
|
layout->show_in_cairo_context (cr);
|
||||||
cr->restore ();
|
cr->restore ();
|
||||||
|
|
||||||
// x-Axis
|
// x-Axis labels
|
||||||
layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
|
layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
|
||||||
layout->set_alignment (Pango::ALIGN_LEFT);
|
layout->set_alignment (Pango::ALIGN_LEFT);
|
||||||
for (int g = -53; g <= -8; g += 5) {
|
for (int g = -53; g <= -8; g += 5) {
|
||||||
|
|
@ -406,6 +404,15 @@ ExportReport::ExportReport (Session* session, StatusPtr s)
|
||||||
cr->restore ();
|
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)
|
// add normalization gain factor here (for want of a better place)
|
||||||
if (p->normalized) {
|
if (p->normalized) {
|
||||||
const float ndb = accurate_coefficient_to_dB (p->norm_gain_factor);
|
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"));
|
layout->set_text (_("Time"));
|
||||||
cr->set_source_rgba (.9, .9, .9, 1.0);
|
cr->set_source_rgba (.9, .9, .9, 1.0);
|
||||||
layout->get_pixel_size (w, h);
|
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);
|
layout->show_in_cairo_context (cr);
|
||||||
|
|
||||||
ytme->flush ();
|
ytme->flush ();
|
||||||
|
|
@ -576,7 +583,7 @@ ExportReport::ExportReport (Session* session, StatusPtr s)
|
||||||
layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
|
layout->set_font_description (UIConfiguration::instance ().get_SmallerFont ());
|
||||||
layout->set_text (_("Hz"));
|
layout->set_text (_("Hz"));
|
||||||
layout->get_pixel_size (w, h);
|
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->set_source_rgba (.9, .9, .9, 1.0);
|
||||||
cr->save ();
|
cr->save ();
|
||||||
cr->rotate (M_PI / -2.0);
|
cr->rotate (M_PI / -2.0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue