View Issue Details

IDProjectCategoryView StatusLast Update
0003225ardourotherpublic2020-04-19 20:14
Reporterlincoln Assigned Tocth103  
PrioritynormalSeveritytweakReproducibilityN/A
Status closedResolutionfixed 
Target Version3.0-beta1 
Summary0003225: [PATCH] Make Crossfades pretty again
DescriptionCrossfades need a bit of attention to make them render nice. Attached is a patch to address this.
TagsNo tags attached.

Activities

2010-06-05 12:17

 

crossfade-view-tweaks.patch (1,706 bytes)   
Index: gtk2_ardour/crossfade_view.cc
===================================================================
--- gtk2_ardour/crossfade_view.cc	(revision 7233)
+++ gtk2_ardour/crossfade_view.cc	(working copy)
@@ -55,7 +55,7 @@
 			    xf->length(), false, TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowFrame)),
 	  crossfade (xf),
 	  left_view (lview),
-	  right_view (rview)	
+	  right_view (rview)
 {
 	_valid = true;
 	_visible = true;
@@ -81,6 +81,7 @@
 	PropertyChange all_crossfade_properties;
 	all_crossfade_properties.add (ARDOUR::Properties::active);
 	all_crossfade_properties.add (ARDOUR::Properties::follow_overlap);
+	
 	crossfade_changed (all_crossfade_properties);
 
 	crossfade->PropertyChanged.connect (*this, invalidator (*this), ui_bind (&CrossfadeView::crossfade_changed, this, _1), gui_context());
@@ -108,10 +109,8 @@
 void
 CrossfadeView::set_height (double h)
 {
-	if (h <= TimeAxisView::preset_height (HeightSmall)) {
-		h -= 3.0;
-	} else {
-		h -= NAME_HIGHLIGHT_SIZE + 3.0;
+	if (h > TimeAxisView::preset_height (HeightSmall)) {
+		h -= NAME_HIGHLIGHT_SIZE;
 	}
 
 	TimeAxisViewItem::set_height (h);
@@ -183,8 +182,8 @@
 
 	for (int i = 0, pci = 0; i < npoints; ++i) {
 		Art::Point &p = (*points)[pci++];
-		p.set_x(i);
-		p.set_y(2.0 + _height - (_height * vec[i]));
+		p.set_x(i + 1.0);
+		p.set_y(_height - ((_height - 2.0) * vec[i]));
 	}
 	
 	fade_in->property_points() = *points;
@@ -193,8 +192,8 @@
 
 	for (int i = 0, pci = 0; i < npoints; ++i) {
 		Art::Point &p = (*points)[pci++];
-		p.set_x(i);
-		p.set_y(2.0 + _height - (_height * vec[i]));
+		p.set_x(i + 1.0);
+		p.set_y(_height - ((_height - 2.0) * vec[i]));
 	}
 	
 	fade_out->property_points() = *points;
crossfade-view-tweaks.patch (1,706 bytes)   

cth103

2010-06-06 00:57

administrator   ~0008171

Applied to SVN. Thanks!

system

2020-04-19 20:14

developer   ~0022120

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2010-06-05 12:17 lincoln New Issue
2010-06-05 12:17 lincoln File Added: crossfade-view-tweaks.patch
2010-06-05 15:50 cth103 cost => 0.00
2010-06-05 15:50 cth103 Status new => acknowledged
2010-06-05 15:50 cth103 Target Version => 3.0-beta1
2010-06-05 15:50 cth103 Summary Make Crossfades pretty again => [PATCH] Make Crossfades pretty again
2010-06-06 00:57 cth103 Note Added: 0008171
2010-06-06 00:57 cth103 Status acknowledged => resolved
2010-06-06 00:57 cth103 Resolution open => fixed
2010-06-06 00:57 cth103 Assigned To => cth103
2020-04-19 20:14 system Note Added: 0022120
2020-04-19 20:14 system Status resolved => closed