Timeline: Make coloration of tracks optional.

This commit is contained in:
Jonathan Moore Liles 2012-10-27 14:12:02 -07:00
parent ee063e003b
commit ada46d215b
3 changed files with 26 additions and 0 deletions

View File

@ -573,6 +573,18 @@ timeline->redraw();}
xywh {55 55 40 25} type Toggle value 1
}
}
Submenu {} {
label {&Track} open
xywh {15 15 74 25}
} {
MenuItem {} {
label {Colored tracks}
callback {Track::colored_tracks = menu_picked_value( o );
timeline->redraw();}
xywh {45 45 40 25} type Toggle value 1
}
}
}
Submenu {} {
label {&Behavior} open

View File

@ -46,6 +46,7 @@
int Track::_soloing = 0;
const char *Track::capture_format = "Wav 24";
bool Track::colored_tracks = true;
@ -864,6 +865,14 @@ Track::draw ( void )
fl_clip_box( x(), y(), w(), h(), X, Y, W, H );
Fl_Color saved_color;
if ( ! Track::colored_tracks )
{
saved_color = color();
color( FL_GRAY );
}
if ( _selected )
{
Fl_Color c = color();
@ -877,6 +886,9 @@ Track::draw ( void )
else
Fl_Group::draw();
if ( ! Track::colored_tracks )
color( saved_color );
fl_pop_clip();
}

View File

@ -68,6 +68,8 @@ public:
static const char *capture_format;
static bool colored_tracks;
struct Capture
{
Audio_File *audio_file;