#include "ardour/profile.h"
#include "ardour/session.h"
+#include "gtkmm2ext/colors.h"
+
#include "canvas/polygon.h"
#include "canvas/debug.h"
#include "canvas/pixbuf.h"
#include "canvas/text.h"
#include "canvas/line.h"
-#include "canvas/utils.h"
-#include "canvas/colors.h"
#include "streamview.h"
#include "region_view.h"
if (what_changed.contains (ARDOUR::Properties::name)) {
region_renamed ();
}
+ if (what_changed.contains (ARDOUR::Properties::position_lock_style)) {
+ region_renamed ();
+ }
if (what_changed.contains (ARDOUR::Properties::sync_position)) {
region_sync_changed ();
}
RegionView::set_sync_mark_color ()
{
if (sync_mark) {
- ArdourCanvas::Color c = UIConfiguration::instance().color ("sync mark");
+ Gtkmm2ext::Color c = UIConfiguration::instance().color ("sync mark");
sync_mark->set_fill_color (c);
sync_mark->set_outline_color (c);
sync_line->set_outline_color (c);
uint32_t
RegionView::get_fill_color () const
{
- ArdourCanvas::Color f = TimeAxisViewItem::get_fill_color();
+ Gtkmm2ext::Color f = TimeAxisViewItem::get_fill_color();
char const *modname;
if (_region->opaque() && (!ARDOUR::Profile->get_mixbus() || (!_dragging && !_region->muted ()))) {
modname = "transparent region base";
}
- return HSV(f).mod (UIConfiguration::instance().modifier (modname)).color ();
+ return Gtkmm2ext::HSV(f).mod (UIConfiguration::instance().modifier (modname)).color ();
}
void
std::string str;
// XXX nice to have some good icons for this
+ if (_region->position_lock_style() == MusicTime) {
+ str += "\u266B"; // BEAMED EIGHTH NOTES
+ }
if (_region->locked()) {
- str += '>';
+ str += "\u2629"; // CROSS OF JERUSALEM
str += _region->name();
- str += '<';
} else if (_region->position_locked()) {
- str += '{';
+ str += "\u21B9"; // LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR
str += _region->name();
- str += '}';
} else if (_region->video_locked()) {
str += '[';
str += _region->name();
str += ']';
} else {
- str = _region->name();
+ str += _region->name();
}
if (_region->muted()) {
return false;
}
- RouteTimeAxisView& rtv = dynamic_cast<RouteTimeAxisView&> (trackview);
- double const speed = rtv.track()->speed ();
-
framepos_t const pre_trim_first_frame = _region->first_frame();
- const framepos_t speed_bound = (framepos_t) (new_bound * speed);
-
- if (_region->position() == speed_bound) {
+ if (_region->position() == new_bound) {
return false;
}
- _region->trim_front (speed_bound, sub_num);
+ _region->trim_front (new_bound, sub_num);
if (no_overlap) {
// Get the next region on the left of this region and shrink/expand it.
return false;
}
- RouteTimeAxisView& rtv = dynamic_cast<RouteTimeAxisView&> (trackview);
- double const speed = rtv.track()->speed ();
-
framepos_t const pre_trim_last_frame = _region->last_frame();
- _region->trim_end ((framepos_t) (new_bound * speed), sub_num);
+ _region->trim_end (new_bound, sub_num);
if (no_overlap) {
// Get the next region on the right of this region and shrink/expand it.