Browse Source

Timeline: Make coloration of tracks optional.

tags/non-daw-v1.2.0
Jonathan Moore Liles 12 years ago
parent
commit
ada46d215b
3 changed files with 26 additions and 0 deletions
  1. +12
    -0
      timeline/src/TLE.fl
  2. +12
    -0
      timeline/src/Track.C
  3. +2
    -0
      timeline/src/Track.H

+ 12
- 0
timeline/src/TLE.fl View File

@@ -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}


+ 12
- 0
timeline/src/Track.C 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();
}



+ 2
- 0
timeline/src/Track.H View File

@@ -68,6 +68,8 @@ public:

static const char *capture_format;

static bool colored_tracks;

struct Capture
{
Audio_File *audio_file;


Loading…
Cancel
Save