Refine clock.

pull/3/head
Jonathan Moore Liles 2008-04-22 17:07:25 -05:00
parent ad1462d61d
commit 8aa8005782
2 changed files with 12 additions and 2 deletions

View File

@ -53,6 +53,9 @@ public:
_when = 0;
box( FL_BORDER_BOX );
type( HMS );
/* force size */
size( 170, 40 );
}
void set ( nframes_t frame )
@ -95,7 +98,14 @@ public:
const int dw = w() - Fl::box_dw( box() );
const int dh = h() - Fl::box_dh( box() );
fl_draw( buf, dx, dy, dw, dh, FL_ALIGN_CENTER );
fl_draw( buf, dx, dy, dw, dh, (Fl_Align)(FL_ALIGN_CENTER | FL_ALIGN_TOP) );
for ( int i = strlen( buf ); i--; )
if ( isdigit( buf[ i ] ) )
buf[ i ] = ' ';
fl_color( fl_darker( c ) );
fl_draw( buf, dx, dy, dw, dh, (Fl_Align)(FL_ALIGN_CENTER | FL_ALIGN_TOP) );
fl_font( FL_HELVETICA, 9 );
fl_color( FL_RED );

View File

@ -115,7 +115,7 @@ main ( int argc, char **argv )
o->callback( cb_undo, 0 );
{
Clock *o = new Clock( 400, 0, 200, 50, "PLAYHEAD" );
Clock *o = new Clock( 400, 0, 170, 40, "PLAYHEAD" );
o->color( fl_darker( FL_GRAY ) );
Fl::add_timeout( UPDATE_FREQ, clock_update_cb, o );