Browse Source

Fl_Dial: Use correct printf format for value display.

tags/v1.3.1000
Jonathan Moore Liles 11 years ago
parent
commit
d7f94164bc
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      src/Fl_Dial.cxx

+ 6
- 3
src/Fl_Dial.cxx View File

@@ -273,12 +273,15 @@ done:
if ( _mouse_inside == this )
{
/* TODO: Make this optional */
char s[10];
char s[128];
fl_font( FL_HELVETICA, 10 );
snprintf( s, sizeof( s ), "%.1f", value() );

char buf[128];
format(buf);
snprintf( s, sizeof( s ), buf, value() );
fl_color( FL_FOREGROUND_COLOR );
fl_draw( s, X, Y, S, S, FL_ALIGN_CENTER );
}


Loading…
Cancel
Save