Timeline: Make coloration of tracks optional.
This commit is contained in:
parent
ee063e003b
commit
ada46d215b
|
@ -573,7 +573,19 @@ 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
|
||||
xywh {5 5 74 25}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,8 @@ public:
|
|||
|
||||
static const char *capture_format;
|
||||
|
||||
static bool colored_tracks;
|
||||
|
||||
struct Capture
|
||||
{
|
||||
Audio_File *audio_file;
|
||||
|
|
Loading…
Reference in New Issue