Apply patch from mantis 2761 from tinram to add padding and make a string translatable.
[ardour.git] / gtk2_ardour / canvas-note-event.h
index 060e4d9fa9627f5f8dea3d22b20e796476facf31..305988667dc3e11514b4f353bcd7ab03514cf054 100644 (file)
@@ -24,6 +24,8 @@
 #include <libgnomecanvasmm/text.h>
 #include <libgnomecanvasmm/widget.h>
 
+#include "ardour/midi_model.h"
+
 #include "rgb_macros.h"
 #include "ardour_ui.h"
 #include "ui_config.h"
@@ -49,9 +51,10 @@ namespace Canvas {
  *
  * A newer, better canvas should remove the need for all the ugly here.
  */
-class CanvasNoteEvent : public sigc::trackable, public InteractiveItem {
+class CanvasNoteEvent : virtual public sigc::trackable, public InteractiveItem {
 public:
-       typedef Evoral::Note<double> NoteType;
+       typedef Evoral::Note<ARDOUR::MidiModel::TimeType> NoteType;
+
        CanvasNoteEvent(
                        MidiRegionView&                   region,
                        Item*                             item,
@@ -92,8 +95,7 @@ public:
 
        const boost::shared_ptr<NoteType> note() const { return _note; }
        
-       inline static uint32_t meter_style_fill_color(uint8_t vel)
-       {
+       inline static uint32_t meter_style_fill_color(uint8_t vel) {
                if (vel < 64) {
                        return UINT_INTERPOLATE(
                                        ARDOUR_UI::config()->canvasvar_MidiNoteMeterColorBase.get(),
@@ -108,8 +110,7 @@ public:
        }
        
        /// calculate outline colors from fill colors of notes
-       inline static uint32_t calculate_outline(uint32_t color) 
-       {
+       inline static uint32_t calculate_outline(uint32_t color) {
                return UINT_INTERPOLATE(color, 0x000000ff, 0.5);
        }