Refine track colors.
This commit is contained in:
parent
1a89c40d7b
commit
d178a08152
|
@ -333,6 +333,7 @@ public:
|
|||
|
||||
ADD( int, "%d", v );
|
||||
ADD( nframes_t, "%lu", (unsigned long)v );
|
||||
ADD( unsigned long, "%lu", v );
|
||||
ADD( const char *, "\"%s\"", v ? v : "" );
|
||||
ADD( Loggable *, "0x%X", v ? v->id() : 0 );
|
||||
ADD( float, "%f", v );
|
||||
|
|
|
@ -42,6 +42,7 @@ using namespace std;
|
|||
extern Timeline *timeline;
|
||||
|
||||
|
||||
bool Region::inherit_track_color = true;
|
||||
|
||||
Fl_Boxtype Region::_box = FL_UP_BOX;
|
||||
|
||||
|
@ -556,7 +557,9 @@ Region::draw_box( void )
|
|||
fl_push_clip( x(), y(), w(), h() );
|
||||
|
||||
Fl_Color selection_color = _selection_color;
|
||||
Fl_Color color = _box_color;
|
||||
|
||||
|
||||
Fl_Color color = Region::inherit_track_color ? track()->track()->color() : _box_color;
|
||||
|
||||
|
||||
if ( this == ((Audio_Sequence*)track())->capture() )
|
||||
|
|
|
@ -35,6 +35,7 @@ class Region : public Sequence_Widget
|
|||
|
||||
public:
|
||||
|
||||
static bool inherit_track_color;
|
||||
|
||||
struct Fade
|
||||
{
|
||||
|
|
|
@ -96,11 +96,11 @@ protected:
|
|||
e.get( i, &s, &v );
|
||||
|
||||
if ( ! strcmp( s, ":x" ) )
|
||||
_r->offset = atol( v );
|
||||
_r->offset = atoll( v );
|
||||
else if ( ! strcmp( s, ":l" ) )
|
||||
_r->start = atol( v );
|
||||
_r->start = atoll( v );
|
||||
else if ( ! strcmp( s, ":r" ) )
|
||||
_r->end = atol( v );
|
||||
_r->end = atoll( v );
|
||||
else if ( ! strcmp( s, ":s" ) )
|
||||
{
|
||||
if ( atoi( v ) )
|
||||
|
|
|
@ -23,6 +23,9 @@ decl {\#include "Audio_File.H" // for supported formats} {}
|
|||
|
||||
decl {\#include "Waveform.H" // for options} {}
|
||||
|
||||
decl {\#include "Region.H" // for options} {selected
|
||||
}
|
||||
|
||||
decl {\#include "Control_Sequence.H" // for options} {}
|
||||
|
||||
decl {\#include <FL/fl_ask.H>} {}
|
||||
|
@ -54,8 +57,7 @@ free( path );
|
|||
|
||||
// save unjournaled state
|
||||
|
||||
// Loggable::save_unjournaled( state_filename );} {selected
|
||||
}
|
||||
// Loggable::save_unjournaled( state_filename );} {}
|
||||
}
|
||||
Function {capture_format_cb( Fl_Widget *w, void *v )} {open private return_type {static void}
|
||||
} {
|
||||
|
@ -106,7 +108,7 @@ free( path );} {}
|
|||
} {
|
||||
Fl_Window main_window {
|
||||
label {Non-DAW - Timeline} open
|
||||
xywh {522 141 1024 768} type Double resizable xclass {Non-DAW} visible
|
||||
xywh {577 27 1024 768} type Double resizable xclass {Non-DAW} visible
|
||||
} {
|
||||
Fl_Menu_Bar menubar {open
|
||||
xywh {0 0 1024 25}
|
||||
|
@ -263,7 +265,7 @@ exit( 0 );}
|
|||
} {}
|
||||
}
|
||||
Submenu {} {
|
||||
label {&Options}
|
||||
label {&Options} open
|
||||
xywh {0 0 74 25} divider
|
||||
} {
|
||||
Submenu {} {
|
||||
|
@ -316,6 +318,13 @@ timeline->redraw();}
|
|||
label {Filled fades}
|
||||
xywh {30 30 40 25} type Toggle value 1
|
||||
}
|
||||
MenuItem {} {
|
||||
label {Inherit track color}
|
||||
callback {Region::inherit_track_color = menu_picked_value( o );
|
||||
|
||||
timeline->redraw();}
|
||||
xywh {40 40 40 25} type Toggle value 1
|
||||
}
|
||||
}
|
||||
Submenu {} {
|
||||
label {&Control Sequence} open
|
||||
|
|
|
@ -142,7 +142,7 @@ public:
|
|||
configure_outputs( atoi( v ) );
|
||||
else if ( ! strcmp( s, ":c" ) )
|
||||
{
|
||||
color( (Fl_Color)atol( v ) );
|
||||
color( (Fl_Color)atoll( v ) );
|
||||
redraw();
|
||||
}
|
||||
else if ( ! strcmp( s, ":t" ) )
|
||||
|
@ -177,7 +177,7 @@ public:
|
|||
e.add( ":h", size() );
|
||||
e.add( ":i", input.size() );
|
||||
e.add( ":o", output.size() );
|
||||
e.add( ":c", color() );
|
||||
e.add( ":c", (unsigned long)color());
|
||||
}
|
||||
|
||||
/* for loggable */
|
||||
|
|
Loading…
Reference in New Issue