mal content wrote:
> I don't really understand how Styles work. Without
> sounding to much like a troll: what's the simplest
> way (ie, the way that involves the least code) to get
> away from that drab Win32 grey look?
> 
> I was going to attempt to make two styles, a flat, white
> theme and a flat, black theme and allow the user to select
> them (perhaps in addition to the default greyish theme).
> 
> I suppose I'm looking for a globally_apply_theme() function
> to apply colours to all widgets that haven't explicitly set
> their own, or something similar.

     Not sure about 'styles', but under fltk 1.1.x I found that
     I could force the WinXP 'tan' color scheme to all platforms
     just by calling this function just before calling Fl::run()
     to change the colors of my entire interface.

     Affects both the normal and Fl::scheme("plastic") scheme.
     Probably affects the newer gtk scheme too, though I haven't checked.

// CHANGE THE GRAYSCALE RAMP TO A 'WINXP' STYLE TAN RAMP
void TanColormap_FLTKSUBS(void)
{
     // WIN XP 24 COLOR GRAY SCALE (32-56)
     int c = 32;
     Fl::set_color(Fl_Color(c),0  ,0  ,0   ); c++;
     Fl::set_color(Fl_Color(c),114,100,46  ); c++;
     Fl::set_color(Fl_Color(c),120,107,56  ); c++;
     Fl::set_color(Fl_Color(c),127,114,65  ); c++;
     Fl::set_color(Fl_Color(c),133,121,75  ); c++;
     Fl::set_color(Fl_Color(c),140,128,84  ); c++;
     Fl::set_color(Fl_Color(c),146,135,94  ); c++;
     Fl::set_color(Fl_Color(c),152,142,103 ); c++;
     Fl::set_color(Fl_Color(c),159,149,113 ); c++;
     Fl::set_color(Fl_Color(c),165,156,122 ); c++;
     Fl::set_color(Fl_Color(c),172,163,132 ); c++;
     Fl::set_color(Fl_Color(c),178,170,141 ); c++;
     Fl::set_color(Fl_Color(c),185,178,151 ); c++;
     Fl::set_color(Fl_Color(c),191,185,160 ); c++;
     Fl::set_color(Fl_Color(c),197,192,170 ); c++;
     Fl::set_color(Fl_Color(c),204,199,179 ); c++;
     Fl::set_color(Fl_Color(c),210,206,189 ); c++;
     Fl::set_color(Fl_Color(c),217,213,198 ); c++;
     Fl::set_color(Fl_Color(c),223,220,208 ); c++;
     Fl::set_color(Fl_Color(c),229,227,217 ); c++;
     Fl::set_color(Fl_Color(c),236,234,227 ); c++;
     Fl::set_color(Fl_Color(c),242,241,236 ); c++;
     Fl::set_color(Fl_Color(c),249,248,246 ); c++;
     Fl::set_color(Fl_Color(c),255,255,255 ); c++;
     Fl::reload_scheme();                // if plastic, update with new colors
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to