Tweek colors for plastic scheme so they better match OSX.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2895 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
56b465073b
commit
6e4cdc0978
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
||||
CHANGES IN FLTK 1.1.3
|
||||
|
||||
- Documentation updates.
|
||||
- Tweeked the plastic scheme under MacOSX to better
|
||||
match the colors.
|
||||
- The Fl_Image.H always included the x.H header file,
|
||||
which included many system headers that could
|
||||
interfere with normal GUI applications. It now uses
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.15 2003/01/10 19:29:09 easysw Exp $"
|
||||
// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.16 2003/01/11 14:19:17 easysw Exp $"
|
||||
//
|
||||
// System color support for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -148,7 +148,7 @@ void Fl::get_system_colors()
|
||||
fl_open_display();
|
||||
|
||||
foreground(0, 0, 0);
|
||||
background(0xe0, 0xe0, 0xe0);
|
||||
background(0xe8, 0xe8, 0xe8);
|
||||
background2(0xf0, 0xf0, 0xf0);
|
||||
set_selection_color(0x80, 0x80, 0x80);
|
||||
}
|
||||
@ -252,13 +252,23 @@ int Fl::reload_scheme() {
|
||||
if (scheme_ && !strcasecmp(scheme_, "plastic")) {
|
||||
// Update the tile image to match the background color...
|
||||
uchar r, g, b;
|
||||
int nr, ng, nb;
|
||||
|
||||
get_color(FL_GRAY, r, g, b);
|
||||
sprintf(tile_cmap[0], "O c #%02x%02x%02x", r, g, b);
|
||||
sprintf(tile_cmap[1], "o c #%02x%02x%02x", 0xe0 * (int)r / 0xf0,
|
||||
0xe0 * (int)g / 0xf0, 0xe0 * (int)b / 0xf0);
|
||||
sprintf(tile_cmap[2], ". c #%02x%02x%02x", 0xd8 * (int)r / 0xf0,
|
||||
0xd8 * (int)g / 0xf0, 0xd8 * (int)b / 0xf0);
|
||||
|
||||
nr = 0xf0 * r / 0xe0;
|
||||
if (nr > 255) nr = 255;
|
||||
|
||||
ng = 0xf0 * g / 0xe0;
|
||||
if (ng > 255) ng = 255;
|
||||
|
||||
nb = 0xf0 * b / 0xe0;
|
||||
if (nb > 255) nb = 255;
|
||||
|
||||
sprintf(tile_cmap[0], "O c #%02x%02x%02x", nr, ng, nb);
|
||||
sprintf(tile_cmap[1], "o c #%02x%02x%02x", r, g, b);
|
||||
sprintf(tile_cmap[2], ". c #%02x%02x%02x", 0xd8 * (int)r / 0xe0,
|
||||
0xd8 * (int)g / 0xe0, 0xd8 * (int)b / 0xe0);
|
||||
|
||||
tile.uncache();
|
||||
|
||||
@ -309,5 +319,5 @@ int Fl::reload_scheme() {
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.15 2003/01/10 19:29:09 easysw Exp $".
|
||||
// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.16 2003/01/11 14:19:17 easysw Exp $".
|
||||
//
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: fl_plastic.cxx,v 1.1.2.13 2002/05/16 02:16:17 easysw Exp $"
|
||||
// "$Id: fl_plastic.cxx,v 1.1.2.14 2003/01/11 14:19:17 easysw Exp $"
|
||||
//
|
||||
// "Plastic" drawing routines for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -136,12 +136,14 @@ static void shade_rect(int x, int y, int w, int h, const char *c, Fl_Color bc)
|
||||
|
||||
|
||||
static void up_frame(int x, int y, int w, int h, Fl_Color c) {
|
||||
shade_frame(x, y, w, h - 1, "MNFKKLNO", c);
|
||||
// shade_frame(x, y, w, h - 1, "MNFKKLNO", c);
|
||||
shade_frame(x, y, w, h - 1, "KLDIIJLM", c);
|
||||
}
|
||||
|
||||
|
||||
static void up_box(int x, int y, int w, int h, Fl_Color c) {
|
||||
shade_rect(x + 2, y + 2, w - 4, h - 5, "TXSPPQQRSSTTUVS", c);
|
||||
// shade_rect(x + 2, y + 2, w - 4, h - 5, "TXSPPQQRSSTTUVS", c);
|
||||
shade_rect(x + 2, y + 2, w - 4, h - 5, "RVQNNOOPQQRRSTQ", c);
|
||||
|
||||
up_frame(x, y, w, h, c);
|
||||
}
|
||||
@ -173,5 +175,5 @@ Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX() {
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: fl_plastic.cxx,v 1.1.2.13 2002/05/16 02:16:17 easysw Exp $".
|
||||
// End of "$Id: fl_plastic.cxx,v 1.1.2.14 2003/01/11 14:19:17 easysw Exp $".
|
||||
//
|
||||
|
||||
@ -9,8 +9,6 @@ static const char * tile_xpm[] = {
|
||||
tile_cmap[0],
|
||||
tile_cmap[1],
|
||||
tile_cmap[2],
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"oooooooooooooooo",
|
||||
"................",
|
||||
"oooooooooooooooo",
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
@ -24,4 +22,6 @@ tile_cmap[2],
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"oooooooooooooooo",
|
||||
"................",
|
||||
"oooooooooooooooo",
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"oooooooooooooooo"};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user