summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2003-07-12 04:20:48 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2003-07-12 04:20:48 +0000
commit1251b4213058fad9e55c93e05d29bf85cf8b5f28 (patch)
tree63f68be96b3ff447b4b83b46466633b4cd6f2ad3 /src
parent0341822a56660c140bbc61632cce72fa31c68d5b (diff)
Fix Xft2 usage (still need to do a final fix that loads the proper X
font...) Fix Fl_Window/Fl_Double_Window in FLUID. Fix background tile coloring for plastic scheme. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3045 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_get_system_colors.cxx13
-rw-r--r--src/fl_font_xft.cxx11
2 files changed, 17 insertions, 7 deletions
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx
index 43d998aee..69fea0086 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.7.2.20 2003/05/21 16:12:14 easysw Exp $"
+// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.21 2003/07/12 04:20:48 easysw Exp $"
//
// System color support for the Fast Light Tool Kit (FLTK).
//
@@ -258,17 +258,20 @@ int Fl::reload_scheme() {
get_color(FL_GRAY, r, g, b);
+// printf("FL_GRAY = 0x%02x 0x%02x 0x%02x\n", r, g, b);
+
for (i = 0; i < 3; i ++) {
- nr = levels[i] * r / 0xd8;
+ nr = levels[i] * r / 0xe8;
if (nr > 255) nr = 255;
- ng = levels[i] * g / 0xd8;
+ ng = levels[i] * g / 0xe8;
if (ng > 255) ng = 255;
- nb = levels[i] * b / 0xd8;
+ nb = levels[i] * b / 0xe8;
if (nb > 255) nb = 255;
sprintf(tile_cmap[i], "%c c #%02x%02x%02x", "Oo."[i], nr, ng, nb);
+// puts(tile_cmap[i]);
}
tile.uncache();
@@ -320,5 +323,5 @@ int Fl::reload_scheme() {
//
-// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.20 2003/05/21 16:12:14 easysw Exp $".
+// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.21 2003/07/12 04:20:48 easysw Exp $".
//
diff --git a/src/fl_font_xft.cxx b/src/fl_font_xft.cxx
index 07b65a84e..aeeae3c11 100644
--- a/src/fl_font_xft.cxx
+++ b/src/fl_font_xft.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_font_xft.cxx,v 1.4.2.11 2003/05/04 21:58:59 easysw Exp $"
+// "$Id: fl_font_xft.cxx,v 1.4.2.12 2003/07/12 04:20:48 easysw Exp $"
//
// Xft font code for the Fast Light Tool Kit (FLTK).
//
@@ -169,11 +169,18 @@ double fl_width(uchar c) {
#if HAVE_GL
// This call is used by opengl to get a bitmapped font.
XFontStruct* fl_xxfont() {
+# if XFT_MAJOR > 1
+ // kludge!
+ static XFontStruct* fixed = 0;
+ if (!fixed) fixed = XLoadQueryFont(fl_display, "fixed");
+ return fixed;
+# else
if (current_font->core) return current_font->u.core.font;
static XftFont* xftfont;
if (xftfont) XftFontClose (fl_display, xftfont);
xftfont = fontopen(fl_fonts[fl_font_].name, true);
return xftfont->u.core.font;
+# endif // XFT_MAJOR > 1
}
#endif // HAVE_GL
@@ -240,5 +247,5 @@ void fl_draw(const char *str, int n, int x, int y) {
}
//
-// End of "$Id: fl_font_xft.cxx,v 1.4.2.11 2003/05/04 21:58:59 easysw Exp $"
+// End of "$Id: fl_font_xft.cxx,v 1.4.2.12 2003/07/12 04:20:48 easysw Exp $"
//