along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <algorithm>
#include "public_editor.h"
#include "rgb_macros.h"
#include "gui_thread.h"
+#include "ardour_ui.h"
#include "i18n.h"
: _trackview (tv)
{
region_color = _trackview.color();
- stream_base_color = color_map[cMarkerTrackBase];
+ stream_base_color = ARDOUR_UI::config()->canvasvar_MarkerTrack.get();
canvas_group = new ArdourCanvas::Group (*_trackview.canvas_display);
canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
canvas_rect->property_x1() = 0.0;
canvas_rect->property_y1() = 0.0;
- canvas_rect->property_x2() = 1000000.0;
+ canvas_rect->property_x2() = max_frames;
canvas_rect->property_y2() = (double)20;
- canvas_rect->property_outline_color_rgba() = color_map[cMarkerTrackOutline];
+ canvas_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_MarkerTrack.get();
canvas_rect->property_fill_color_rgba() = stream_base_color;
canvas_rect->signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview));
iter = next ;
}
- if(canvas_rect)
- {
- delete canvas_rect;
- canvas_rect = 0 ;
- }
-
- if(canvas_group)
- {
- delete canvas_group;
- canvas_group = 0 ;
- }
+ delete canvas_rect;
+ canvas_rect = 0 ;
+
+ delete canvas_group;
+ canvas_group = 0 ;
}
int
MarkerTimeAxisView::set_height(gdouble h)
{
- if (h < 10.0 || h > 1000.0)
- {
- return -1 ;
+ if (h < 10.0 || h > 1000.0) {
+ return -1;
}
canvas_rect->property_y2() = h;
- for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i)
- {
- (*i)->set_height(h) ;
+ for (MarkerViewList::iterator i = marker_view_list.begin(); i != marker_view_list.end(); ++i) {
+ (*i)->set_y_position_and_height(0, h);
}
return 0;