Updated the default background color on OSX to provide better contrast.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2978 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2003-05-16 02:19:46 +00:00
parent ea324d25c4
commit 4d705c92a8
3 changed files with 22 additions and 19 deletions
+2
View File
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.4 CHANGES IN FLTK 1.1.4
- Updated the default background color on OSX to provide
better contrast.
- Fl_Text_Display and friends now look for the next - Fl_Text_Display and friends now look for the next
non-punctuation/space character for word boundaries non-punctuation/space character for word boundaries
(STR #26) (STR #26)
+12 -11
View File
@@ -1,5 +1,5 @@
// //
// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.17 2003/01/30 21:43:06 easysw Exp $" // "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.18 2003/05/16 02:19:46 easysw Exp $"
// //
// System color support for the Fast Light Tool Kit (FLTK). // System color support for the Fast Light Tool Kit (FLTK).
// //
@@ -148,8 +148,8 @@ void Fl::get_system_colors()
fl_open_display(); fl_open_display();
foreground(0, 0, 0); foreground(0, 0, 0);
background(0xe8, 0xe8, 0xe8); background(0xd8, 0xd8, 0xd8);
background2(0xf0, 0xf0, 0xf0); background2(0xff, 0xff, 0xff);
set_selection_color(0x80, 0x80, 0x80); set_selection_color(0x80, 0x80, 0x80);
} }
#else #else
@@ -253,22 +253,23 @@ int Fl::reload_scheme() {
// Update the tile image to match the background color... // Update the tile image to match the background color...
uchar r, g, b; uchar r, g, b;
int nr, ng, nb; int nr, ng, nb;
int i;
static uchar levels[3] = { 0xff, 0xef, 0xe8 };
get_color(FL_GRAY, r, g, b); get_color(FL_GRAY, r, g, b);
nr = 0xf0 * r / 0xe0; for (i = 0; i < 3; i ++) {
nr = levels[i] * r / 0xd8;
if (nr > 255) nr = 255; if (nr > 255) nr = 255;
ng = 0xf0 * g / 0xe0; ng = levels[i] * g / 0xd8;
if (ng > 255) ng = 255; if (ng > 255) ng = 255;
nb = 0xf0 * b / 0xe0; nb = levels[i] * b / 0xd8;
if (nb > 255) nb = 255; if (nb > 255) nb = 255;
sprintf(tile_cmap[0], "O c #%02x%02x%02x", nr, ng, nb); sprintf(tile_cmap[i], "%c c #%02x%02x%02x", "Oo."[i], 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(); tile.uncache();
@@ -319,5 +320,5 @@ int Fl::reload_scheme() {
// //
// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.17 2003/01/30 21:43:06 easysw Exp $". // End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.18 2003/05/16 02:19:46 easysw Exp $".
// //
+5 -5
View File
@@ -1,14 +1,15 @@
/* XPM */ /* XPM */
static char tile_cmap[3][32] = { static char tile_cmap[3][32] = {
"O c #F0F0F0", "O c #FFFFFF",
"o c #E0E0E0", "o c #EFEFEF",
". c #D8D8D8" ". c #E8E8E8"
}; };
static const char * tile_xpm[] = { static const char * tile_xpm[] = {
"16 16 3 1", "16 16 3 1",
tile_cmap[0], tile_cmap[0],
tile_cmap[1], tile_cmap[1],
tile_cmap[2], tile_cmap[2],
"oooooooooooooooo",
"................", "................",
"oooooooooooooooo", "oooooooooooooooo",
"OOOOOOOOOOOOOOOO", "OOOOOOOOOOOOOOOO",
@@ -23,5 +24,4 @@ tile_cmap[2],
"oooooooooooooooo", "oooooooooooooooo",
"................", "................",
"oooooooooooooooo", "oooooooooooooooo",
"OOOOOOOOOOOOOOOO", "OOOOOOOOOOOOOOOO"};
"oooooooooooooooo"};