Timeline: Make coloration of tracks optional.
This commit is contained in:
parent
ee063e003b
commit
ada46d215b
|
@ -573,6 +573,18 @@ timeline->redraw();}
|
||||||
xywh {55 55 40 25} type Toggle value 1
|
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 {} {
|
Submenu {} {
|
||||||
label {&Behavior} open
|
label {&Behavior} open
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
int Track::_soloing = 0;
|
int Track::_soloing = 0;
|
||||||
|
|
||||||
const char *Track::capture_format = "Wav 24";
|
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_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 )
|
if ( _selected )
|
||||||
{
|
{
|
||||||
Fl_Color c = color();
|
Fl_Color c = color();
|
||||||
|
@ -877,6 +886,9 @@ Track::draw ( void )
|
||||||
else
|
else
|
||||||
Fl_Group::draw();
|
Fl_Group::draw();
|
||||||
|
|
||||||
|
if ( ! Track::colored_tracks )
|
||||||
|
color( saved_color );
|
||||||
|
|
||||||
fl_pop_clip();
|
fl_pop_clip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,8 @@ public:
|
||||||
|
|
||||||
static const char *capture_format;
|
static const char *capture_format;
|
||||||
|
|
||||||
|
static bool colored_tracks;
|
||||||
|
|
||||||
struct Capture
|
struct Capture
|
||||||
{
|
{
|
||||||
Audio_File *audio_file;
|
Audio_File *audio_file;
|
||||||
|
|
Loading…
Reference in New Issue