Browse Source

Use an Fl_Box for status line instead of Fl_Output.

tags/non-sequencer-v1.9.4
Jonathan Moore Liles 17 years ago
parent
commit
530960e14d
2 changed files with 23 additions and 21 deletions
  1. +17
    -17
      src/gui/draw.C
  2. +6
    -4
      src/gui/ui.fl

+ 17
- 17
src/gui/draw.C View File

@@ -34,15 +34,15 @@ struct color_table {
}; };


struct color_table color_defs[] = { struct color_table color_defs[] = {
{ EMPTY, 38, 38, 38 },
{ FULL, 255, 69, 0 },
{ PARTIAL, 0, 0, 0 },
{ CONTINUED, 80, 80, 80 },
{ LINE, 26, 26, 26 },
{ HIT, 255, 255, 255 },
{ PLAYHEAD, 10, 69, 10 },
{ SELECTED, 255, 10, 255 },
};
{ EMPTY, 38, 38, 38 },
{ FULL, 255, 69, 0 },
{ PARTIAL, 0, 0, 0 },
{ CONTINUED, 80, 80, 80 },
{ LINE, 26, 26, 26 },
{ HIT, 255, 255, 255 },
{ PLAYHEAD, 10, 69, 10 },
{ SELECTED, 255, 10, 255 },
};


Fl_Color *state_colors; Fl_Color *state_colors;


@@ -225,7 +225,7 @@ static
void void
clear_status ( void * ) clear_status ( void * )
{ {
ui->status->value( "" );
ui->status->label( NULL );
} }


/** inform the user of something via a status bar */ /** inform the user of something via a status bar */
@@ -236,14 +236,14 @@ gui_status ( const char *fmt, ... )


static char pat[256]; static char pat[256];


if ( fmt )
{
va_start( args, fmt );
vsnprintf( pat, 256, fmt, args );
va_end( args );
}
if ( fmt )
{
va_start( args, fmt );
vsnprintf( pat, 256, fmt, args );
va_end( args );
}


ui->status->value( pat );
ui->status->label( pat );


Fl::add_timeout( 5.0f, clear_status ); Fl::add_timeout( 5.0f, clear_status );
} }

+ 6
- 4
src/gui/ui.fl View File

@@ -341,7 +341,7 @@ else


pattern_c->row_compact( val ? Canvas::ON : Canvas::OFF ); pattern_c->row_compact( val ? Canvas::ON : Canvas::OFF );


pattern_canvas_widget->redraw();} selected
pattern_canvas_widget->redraw();}
xywh {10 10 40 25} type Toggle value 1 xywh {10 10 40 25} type Toggle value 1
} }
MenuItem {} { MenuItem {} {
@@ -966,8 +966,10 @@ else
Fl_Group {} {open Fl_Group {} {open
xywh {-1 772 869 33} xywh {-1 772 869 33}
} { } {
Fl_Output status {
xywh {-1 776 783 25} box UP_BOX color 32 labeltype NO_LABEL textcolor 55 resizable
Fl_Box status {
label status selected
xywh {0 776 783 25} box UP_BOX align 84
code0 {o->label( NULL );}
} }
Fl_Box transport_state { Fl_Box transport_state {
label state label state
@@ -986,7 +988,7 @@ if ( s != o->label() )
else else
o->color( FL_GREEN ); o->color( FL_GREEN );
}} }}
xywh {781 776 87 25} box UP_BOX
xywh {781 776 87 25} box UP_BOX align 64
} }
} }
} }


Loading…
Cancel
Save