Tooltips font fix



(setq tooltips-font "XXXX") is not work on Sawfish-1.3.

The patch below can fix. And moreover, it allows tooltips-foreground-
color and tooltips-background-color to be set "nil" to obey GTK+
default setting.

# I think I am happy to be able to set
#   (setq tooltips-font '("Xft" . "Sans 10"))
# but did not implemented on this patch for now.

Regards.
--
S. Tahara

diff -ru sawfish-1.3.orig/lisp/sawfish/wm/ext/tooltips.jl sawfish-1.3/lisp/sawfish/wm/ext/tooltips.jl
--- sawfish-1.3.orig/lisp/sawfish/wm/ext/tooltips.jl	2002-04-21 12:39:34.000000000 +0900
+++ sawfish-1.3/lisp/sawfish/wm/ext/tooltips.jl	2003-08-12 13:04:50.000000000 +0900
@@ -68,11 +68,11 @@
   (defvar tooltips-font nil
     "Font used to display tooltips, or nil for default.")
 
-  (defvar tooltips-background-color "grey85"
-    "Color used for the tooltips background")
+  (defvar tooltips-background-color nil
+    "Color used for the tooltips background, or nil for GTK+ default.")
 
-  (defvar tooltips-foreground-color "black"
-    "Color used for the tooltips foreground")
+  (defvar tooltips-foreground-color nil
+    "Color used for the tooltips foreground, or nil for GTK+ default.")
 
 ;;; displaying tooltips
 
@@ -89,11 +89,13 @@
       (rplacd pos (pos-fn (cdr pos) (screen-height) 16))
       (display-message (if (functionp text) (text) text)
 		       `((position . ,pos)
-			 (background . ,tooltips-background-color)
-			 (foreground . ,tooltips-foreground-color)
 			 (x-justify . left)
 			 (spacing . 2)
-			 ,@(and tooltips-font tooltips-font)))
+			 ,(and tooltips-foreground-color
+			       (cons 'foreground tooltips-foreground-color))
+			 ,(and tooltips-background-color
+			       (cons 'background tooltips-background-color))
+			 ,(and tooltips-font (cons 'font tooltips-font))))
       (setq tooltips-displayed (or win t))
       (setq tooltips-timer
 	    (make-timer remove-tooltip



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]