#include "pbd/openuri.h"
#include "pbd/basename.h"
+
#include "gtkmm2ext/utils.h"
-#include "gtkmm2ext/utils.h"
-#include "canvas/utils.h"
-#include "canvas/colors.h"
+#include "gtkmm2ext/colors.h"
#include "audiographer/general/analyser.h"
#include "ardour/audioregion.h"
#include "ardour/auditioner.h"
#include "ardour/dB.h"
+#include "ardour/logmeter.h"
#include "ardour/region_factory.h"
#include "ardour/session.h"
#include "ardour/smf_source.h"
#include "ardour/source_factory.h"
#include "ardour/srcfilesource.h"
+#include "ardour/utils.h"
#include "audio_clock.h"
#include "export_report.h"
-#include "logmeter.h"
#include "ui_config.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace Gtk;
using namespace ARDOUR;
// TODO get max width of labels per column, right-align labels, x-align 1/3, 2/3 columns
const int lx0 = m_l;
- const int lx1 = m_l + png_w / 2;
+ const int lx1 = m_l + png_w * 2 / 3; // right-col is short (channels, SR, duration)
+ std::string sha1sum = ARDOUR::compute_sha1_of_file (path);
+ if (!sha1sum.empty()) {
+ sha1sum = " (sha1: " + sha1sum + ")";
+ }
- IMGLABEL (lx0, _("File:"), Glib::path_get_basename (path));
+ IMGLABEL (lx0, _("File:"), Glib::path_get_basename (path) + sha1sum);
IMGLABEL (lx1, _("Channels:"), string_compose ("%1", channels));
png_y0 += linesp;
rint ((g + 59.0) * 10.0 - h * .5), 5,
h + 2, w + 2, 4);
const float pk = (g + 59.0) / 54.0;
- ArdourCanvas::Color c = ArdourCanvas::hsva_to_color (252 - 260 * pk, .9, .3 + pk * .4, .6);
- ArdourCanvas::set_source_rgba (cr, c);
+ Gtkmm2ext::Color c = Gtkmm2ext::hsva_to_color (252 - 260 * pk, .9, .3 + pk * .4, .6);
+ Gtkmm2ext::set_source_rgba (cr, c);
cr->fill ();
cr->save ();
VBox *lrb = manage (new VBox());
ToggleButton *log = manage (new ToggleButton (S_("Logscale|Lg")));
ToggleButton *rec = manage (new ToggleButton (S_("Rectified|Rf")));
+ Gtkmm2ext::UI::instance()->set_tip (log, _("Logscale"));
+ Gtkmm2ext::UI::instance()->set_tip (rec, _("Rectified"));
+
lrb->pack_start (*log, false, false, 5);
lrb->pack_end (*rec, false, false, 5);
log->signal_toggled ().connect (sigc::bind (sigc::mem_fun (*this, &ExportReport::on_logscale_toggled), log));
for (size_t x = 0 ; x < width; ++x) {
for (size_t y = 0 ; y < height; ++y) {
const float pk = p->spectrum[x][y];
- ArdourCanvas::Color c = ArdourCanvas::hsva_to_color (252 - 260 * pk, .9, sqrt(pk));
- ArdourCanvas::set_source_rgba (cr, c);
+ Gtkmm2ext::Color c = Gtkmm2ext::hsva_to_color (252 - 260 * pk, .9, sqrt(pk));
+ Gtkmm2ext::set_source_rgba (cr, c);
cr->rectangle (m_l + x - .5, y - .5, 1, 1);
cr->fill ();
}
for (size_t y = 0 ; y < innerheight - 2; ++y) {
const float pk = 1.0 - (float) y / innerheight;
- ArdourCanvas::Color c = ArdourCanvas::hsva_to_color (252 - 260 * pk, .9, sqrt(pk));
- ArdourCanvas::set_source_rgba (cr, c);
+ Gtkmm2ext::Color c = Gtkmm2ext::hsva_to_color (252 - 260 * pk, .9, sqrt(pk));
+ Gtkmm2ext::set_source_rgba (cr, c);
cr->rectangle (2, innertop + y + .5, m_r - 4 - anw, 1);
cr->fill ();
}