Motif and Athena recognize the 'ToolTip' highlight group, and will
change the fonts and colors of the balloons popped up over toolbar
entries.  However, the colors aren't used for the balloons popped up as
a result of a balloonexpr.

This patch fixes that issue.

~Matt

diff --git a/runtime/doc/debugger.txt b/runtime/doc/debugger.txt
index 3b599ad..28a7b9c 100644
--- a/runtime/doc/debugger.txt
+++ b/runtime/doc/debugger.txt
@@ -92,7 +92,9 @@ could be used for displaying other information as well.
 
 The Balloon Evaluation has some settable parameters too.  For Motif the font
 list and colors can be set via X resources (XmNballoonEvalFontList,
-XmNballoonEvalBackground, and XmNballoonEvalForeground).
+XmNballoonEvalBackground, and XmNballoonEvalForeground).  For Motif and
+Athena, you can set the foreground color, background color, and font to be
+used by changing the ToolTip highlight group.
 The 'balloondelay' option sets the delay before an attempt is made to show a
 balloon.
 The 'ballooneval' option needs to be set to switch it on.
diff --git a/src/gui_beval.c b/src/gui_beval.c
index 7adde4e..c3d1d66 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -1292,6 +1292,24 @@ drawBalloon(beval)
                NULL);
 #endif
 
+       /* Set tooltip colors */
+       {
+           Arg args[2];
+
+#ifdef FEAT_GUI_MOTIF
+           args[0].name = XmNbackground;
+           args[0].value = gui.tooltip_bg_pixel;
+           args[1].name = XmNforeground;
+           args[1].value = gui.tooltip_fg_pixel;
+#else /* Athena */
+           args[0].name = XtNbackground;
+           args[0].value = gui.tooltip_bg_pixel;
+           args[1].name = XtNforeground;
+           args[1].value = gui.tooltip_fg_pixel;
+#endif
+           XtSetValues(beval->balloonLabel, &args[0], XtNumber(args));
+       }
+
        XtPopup(beval->balloonShell, XtGrabNone);
 
        beval->showState = ShS_SHOWING;

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui