Re: Tooltips font fix

From: John Harper <jsh unfactored org>
Message-Id: <ag1cb1fu2u 6ss2swlx2j5k xebec unfactored org>

> |(setq tooltips-font "XXXX") is not work on Sawfish-1.3.
> that should look for the XLFD font called XXXX, e.g.:
>   (display-message "foo!" '((font . "fixed")))
> works fine for me (display-message is what the tooltips use to display
> the window). However, it's also possible for the font description to be
> a font object, not a font name, so this also works for me:
>   (display-message "foo!" `((font . ,(get-font-typed "xft" "Verdana-10"))))

I know. But in lisp/sawfish/wm/ext/tooltips.jl:

      (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)))

The problem is the part " ,@(and tooltips-font tooltips-font) ".
I think it does not work.

It must be " ,(and tooltips-font (cons 'font tooltips-font)) ", I

> |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 don't think that works. Not setting the colors defaults to white
> background, black foreground (see Fdisplay_message in functions.c).
> Gtk+ isn't involved in displaying the tooltips, it's just a window
> created using Xlib.

OK. I checked only in the environment where GTK+2 is available. If
sawfish linked with GTK+, the tooltips foreground and background
depends on GTK+ theme configuration (in those of GtkToolTips widget).

I understood that that patch doesn't work in the environment without

> |# 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.
> you should be able to do (setq tooltips-font (get-font-typed "Xft"
> "Sans 10")) to get that effect.

I didn't know this method. Thanks.
S. Tahara / jado flowernet gr jp

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