View Issue Details

IDProjectCategoryView StatusLast Update
0003224ardourotherpublic2020-04-19 20:14
Reporterlincoln Assigned Tocth103  
PrioritynormalSeveritytweakReproducibilityN/A
Status closedResolutionfixed 
Target Version3.0-beta1 
Summary0003224: [PATCH] Re-introduce colour handler in Midi Stream View
DescriptionThe attached patch re-introduces the colour handle for the Midi Stream View. This gives Midi tracks a nicer background.
TagsNo tags attached.

Activities

2010-06-05 10:00

 

midi-stream-view-color-handler.patch (1,726 bytes)   
Index: gtk2_ardour/midi_streamview.cc
===================================================================
--- gtk2_ardour/midi_streamview.cc	(revision 7233)
+++ gtk2_ardour/midi_streamview.cc	(working copy)
@@ -64,11 +64,7 @@
 	, _data_note_min(60)
 	, _data_note_max(71)
 {
-	if (tv.is_track()) {
-		stream_base_color = ARDOUR_UI::config()->canvasvar_MidiTrackBase.get();
-	} else {
-		stream_base_color = ARDOUR_UI::config()->canvasvar_MidiBusBase.get();
-	}
+	color_handler();
 
 	/* use a group dedicated to MIDI underlays. Audio underlays are not in this group. */
 	midi_underlay_group = new ArdourCanvas::Group (*_canvas_group);
@@ -298,8 +294,8 @@
 {
 	StreamView::update_contents_height();
 	_note_lines->property_y2() = height;
-
-        apply_note_range (lowest_note(), highest_note(), true);
+	
+	apply_note_range( lowest_note(), highest_note(), true);
 }
 
 void
@@ -366,7 +362,7 @@
 	int range = _highest_note - _lowest_note;  
 	int pixels_per_note = floor (height/range);
 	
-	/* do not grow note display beyont 10 pixels */
+	/* do not grow note height beyond 10 pixels */
 	if (pixels_per_note > 10){
 		
 		int available_note_range = floor ((height)/10);
@@ -705,12 +701,12 @@
 {
 	//case cMidiTrackBase:
 	if (_trackview.is_midi_track()) {
-		//canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiTrackBase.get();
+		canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiTrackBase.get();
 	}
 
 	//case cMidiBusBase:
 	if (!_trackview.is_midi_track()) {
-		//canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiBusBase.get();;
+		canvas_rect->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_MidiBusBase.get();;
 	}
 }
 

cth103

2010-06-06 00:57

administrator   ~0008172

Applied to SVN. Thanks!

system

2020-04-19 20:14

developer   ~0022119

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 10:00 lincoln New Issue
2010-06-05 10:00 lincoln File Added: midi-stream-view-color-handler.patch
2010-06-05 10:10 cth103 cost => 0.00
2010-06-05 10:10 cth103 Status new => acknowledged
2010-06-05 10:10 cth103 Target Version => 3.0-beta1
2010-06-05 10:10 cth103 Summary Re-introduce colour handler in Midi Stream View => [PATCH] Re-introduce colour handler in Midi Stream View
2010-06-06 00:57 cth103 Note Added: 0008172
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: 0022119
2020-04-19 20:14 system Status resolved => closed