diff src/toolbar-x.c @ 227:0e522484dd2a r20-5b12

Import from CVS: tag r20-5b12
author cvs
date Mon, 13 Aug 2007 10:12:37 +0200
parents 1f0dabaa0855
children c5d627a313b1
line wrap: on
line diff
--- a/src/toolbar-x.c	Mon Aug 13 10:11:42 2007 +0200
+++ b/src/toolbar-x.c	Mon Aug 13 10:12:37 2007 +0200
@@ -842,13 +842,26 @@
   unsigned long flags = (GCForeground | GCBackground | GCGraphicsExposures);
 
   /*
-   * If the user specified the global background resource, use it.
-   * Otherwise use the backgroundToolBarColor resource.
+   * If backgroundToolBarColor is specified, use it.
+   * Otherwise use the background resource.
    */
-  if (ef->emacs_frame.background_pixel != -1)
+  if (ef->emacs_frame.background_toolbar_pixel == -1)
     ef->emacs_frame.background_toolbar_pixel =
       ef->emacs_frame.background_pixel;
 
+  /*
+   * ####
+   * If foregroundToolBarColor is specified, use it.
+   * Otherwise use the foreground resource.
+   *
+   * The foreground pixel is currently unused, but will likely be
+   * used when toolbar captions are generated by the toolbar code
+   * instead being incorporated into the icon image.
+   */
+  if (ef->emacs_frame.foreground_toolbar_pixel == -1)
+    ef->emacs_frame.foreground_toolbar_pixel =
+      ef->emacs_frame.foreground_pixel;
+
   gcv.foreground = ef->emacs_frame.background_toolbar_pixel;
   gcv.background = ef->core.background_pixel;
   gcv.graphics_exposures = False;