summaryrefslogtreecommitdiff
path: root/src/Fl_get_system_colors.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2000-02-25 03:44:22 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2000-02-25 03:44:22 +0000
commitaee4def606931c802d214db91360d5d3524544dd (patch)
tree1de97031d5736e71af4d6976ead778be678a35f6 /src/Fl_get_system_colors.cxx
parent42ebf79306f7840391bdcb2b363abcc09b591b0c (diff)
Updated version to 1.0.8.
Applied colors patch. Updated doco makefile for current version of HTMLDOC. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1015 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_get_system_colors.cxx')
-rw-r--r--src/Fl_get_system_colors.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx
index 3cae6e9a9..d69177d14 100644
--- a/src/Fl_get_system_colors.cxx
+++ b/src/Fl_get_system_colors.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_get_system_colors.cxx,v 1.6.2.1 1999/10/19 04:50:34 bill Exp $"
+// "$Id: Fl_get_system_colors.cxx,v 1.6.2.2 2000/02/25 03:44:22 mike Exp $"
//
// System color support for the Fast Light Tool Kit (FLTK).
//
@@ -121,16 +121,29 @@ getsyscolor(const char *arg, void (*func)(uchar,uchar,uchar)) {
}
}
+static const char *
+xdefaultcolor (const char *flcol, const char *key1, const char *key2)
+{
+ if (!flcol)
+ return XGetDefault (fl_display, key1, key2);
+ else
+ return flcol;
+}
+
void Fl::get_system_colors()
{
fl_open_display();
+
+ fl_bg2 = xdefaultcolor (fl_bg2, "Entry", "background");
getsyscolor(fl_bg2,Fl::background2);
+ fl_bg = xdefaultcolor (fl_bg, "*", "background");
getsyscolor(fl_fg, Fl::foreground);
+ fl_fg = xdefaultcolor (fl_fg, "*", "foreground");
getsyscolor(fl_bg, Fl::background);
}
#endif
//
-// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.1 1999/10/19 04:50:34 bill Exp $".
+// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.2 2000/02/25 03:44:22 mike Exp $".
//